Documentation
¶
Index ¶
- Constants
- Variables
- func MakeInternalError(err error) *goa.ServiceError
- func MakeInvalidFilePath(err error) *goa.ServiceError
- func NewDownloadObjectEndpoint(s Service) goa.Endpoint
- type Client
- type DownloadObjectPayload
- type DownloadObjectResponseData
- type DownloadObjectResult
- type Endpoints
- type Service
Constants ¶
const APIName = "dl"
APIName is the name of the API as defined in the design.
const APIVersion = "0.0.1"
APIVersion is the version of the API as defined in the design.
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 ¶
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 ¶
NewDownloadObjectEndpoint returns an endpoint function that calls the method "download-object" of service "ks3".
Types ¶
type Client ¶
Client is the "ks3" service client.
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 ¶
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 ¶
Endpoints wraps the "ks3" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "ks3" service with 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