ks3

package
v0.0.0-...-76fa24c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const APIName = "dl"

APIName is the name of the API as defined in the design.

View Source
const APIVersion = "0.0.1"

APIVersion is the version of the API as defined in the design.

View Source
const ServiceName = "ks3"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [1]string{"download-object"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func MakeInternalError

func MakeInternalError(err error) *goa.ServiceError

MakeInternalError builds a goa.ServiceError from an error.

func MakeInvalidFilePath

func MakeInvalidFilePath(err error) *goa.ServiceError

MakeInvalidFilePath builds a goa.ServiceError from an error.

func NewDownloadObjectEndpoint

func NewDownloadObjectEndpoint(s Service) goa.Endpoint

NewDownloadObjectEndpoint returns an endpoint function that calls the method "download-object" of service "ks3".

Types

type Client

type Client struct {
	DownloadObjectEndpoint goa.Endpoint
}

Client is the "ks3" service client.

func NewClient

func NewClient(downloadObject goa.Endpoint) *Client

NewClient initializes a "ks3" service client given the endpoints.

func (*Client) DownloadObject

func (c *Client) DownloadObject(ctx context.Context, p *DownloadObjectPayload) (res *DownloadObjectResult, resp io.ReadCloser, err error)

DownloadObject calls the "download-object" endpoint of the "ks3" service. DownloadObject may return the following errors:

  • "invalid_file_path" (type *goa.ServiceError): Could not locate file for download
  • "internal_error" (type *goa.ServiceError): Fault while processing download.
  • error: internal error

type DownloadObjectPayload

type DownloadObjectPayload struct {
	// bucket name
	Bucket string
	// object key
	Key string
}

DownloadObjectPayload is the payload type of the ks3 service download-object method.

type DownloadObjectResponseData

type DownloadObjectResponseData struct {
	// Result is the method result.
	Result *DownloadObjectResult
	// Body streams the HTTP response body.
	Body io.ReadCloser
}

DownloadObjectResponseData holds both the result and the HTTP response body reader of the "download-object" method.

type DownloadObjectResult

type DownloadObjectResult struct {
	// Length is the downloaded content length in bytes.
	Length int64
	// Content-Disposition header for downloading
	ContentDisposition string
}

DownloadObjectResult is the result type of the ks3 service download-object method.

type Endpoints

type Endpoints struct {
	DownloadObject goa.Endpoint
}

Endpoints wraps the "ks3" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "ks3" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "ks3" service endpoints.

type Service

type Service interface {
	// DownloadObject implements download-object.
	DownloadObject(context.Context, *DownloadObjectPayload) (res *DownloadObjectResult, body io.ReadCloser, err error)
}

OCI artifacts download service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL