Documentation
¶
Index ¶
- Constants
- Variables
- func MakeInternalError(err error) *goa.ServiceError
- func MakeInvalidFilePath(err error) *goa.ServiceError
- func NewDownloadFileEndpoint(s Service) goa.Endpoint
- func NewDownloadFileSha256Endpoint(s Service) goa.Endpoint
- func NewListFilesEndpoint(s Service) goa.Endpoint
- type Client
- func (c *Client) DownloadFile(ctx context.Context, p *DownloadFilePayload) (res *DownloadFileResult, resp io.ReadCloser, err error)
- func (c *Client) DownloadFileSha256(ctx context.Context, p *DownloadFileSha256Payload) (res *DownloadFileSha256Result, resp io.ReadCloser, err error)
- func (c *Client) ListFiles(ctx context.Context, p *ListFilesPayload) (res []string, err error)
- type DownloadFilePayload
- type DownloadFileResponseData
- type DownloadFileResult
- type DownloadFileSha256Payload
- type DownloadFileSha256ResponseData
- type DownloadFileSha256Result
- type Endpoints
- type ListFilesPayload
- 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 = "oci"
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 = [3]string{"list-files", "download-file", "download-file-sha256"}
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 NewDownloadFileEndpoint ¶
NewDownloadFileEndpoint returns an endpoint function that calls the method "download-file" of service "oci".
func NewDownloadFileSha256Endpoint ¶
NewDownloadFileSha256Endpoint returns an endpoint function that calls the method "download-file-sha256" of service "oci".
func NewListFilesEndpoint ¶
NewListFilesEndpoint returns an endpoint function that calls the method "list-files" of service "oci".
Types ¶
type Client ¶
type Client struct { ListFilesEndpoint goa.Endpoint DownloadFileEndpoint goa.Endpoint DownloadFileSha256Endpoint goa.Endpoint }
Client is the "oci" service client.
func (*Client) DownloadFile ¶
func (c *Client) DownloadFile(ctx context.Context, p *DownloadFilePayload) (res *DownloadFileResult, resp io.ReadCloser, err error)
DownloadFile calls the "download-file" endpoint of the "oci" service. DownloadFile 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
func (*Client) DownloadFileSha256 ¶
func (c *Client) DownloadFileSha256(ctx context.Context, p *DownloadFileSha256Payload) (res *DownloadFileSha256Result, resp io.ReadCloser, err error)
DownloadFileSha256 calls the "download-file-sha256" endpoint of the "oci" service. DownloadFileSha256 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 DownloadFilePayload ¶
type DownloadFilePayload struct { // OCI artifact repository Repository string // OCI artifact tag Tag string // file name in OCI artifact File *string // file name regexp pattern FileRegex *string }
DownloadFilePayload is the payload type of the oci service download-file method.
type DownloadFileResponseData ¶
type DownloadFileResponseData struct { // Result is the method result. Result *DownloadFileResult // Body streams the HTTP response body. Body io.ReadCloser }
DownloadFileResponseData holds both the result and the HTTP response body reader of the "download-file" method.
type DownloadFileResult ¶
type DownloadFileResult struct { // Length is the downloaded content length in bytes. Length int64 // Content-Disposition header for downloading ContentDisposition string }
DownloadFileResult is the result type of the oci service download-file method.
type DownloadFileSha256Payload ¶
type DownloadFileSha256Payload struct { // OCI artifact repository Repository string // OCI artifact tag Tag string // file name in OCI artifact File string }
DownloadFileSha256Payload is the payload type of the oci service download-file-sha256 method.
type DownloadFileSha256ResponseData ¶
type DownloadFileSha256ResponseData struct { // Result is the method result. Result *DownloadFileSha256Result // Body streams the HTTP response body. Body io.ReadCloser }
DownloadFileSha256ResponseData holds both the result and the HTTP response body reader of the "download-file-sha256" method.
type DownloadFileSha256Result ¶
type DownloadFileSha256Result struct { // Length is the downloaded content length in bytes. Length int64 // Content-Disposition header for downloading ContentDisposition string }
DownloadFileSha256Result is the result type of the oci service download-file-sha256 method.
type Endpoints ¶
type Endpoints struct { ListFiles goa.Endpoint DownloadFile goa.Endpoint DownloadFileSha256 goa.Endpoint }
Endpoints wraps the "oci" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "oci" service with endpoints.
type ListFilesPayload ¶
type ListFilesPayload struct { // OCI artifact repository Repository string // OCI artifact tag Tag string }
ListFilesPayload is the payload type of the oci service list-files method.
type Service ¶
type Service interface { // ListFiles implements list-files. ListFiles(context.Context, *ListFilesPayload) (res []string, err error) // DownloadFile implements download-file. DownloadFile(context.Context, *DownloadFilePayload) (res *DownloadFileResult, body io.ReadCloser, err error) // DownloadFileSha256 implements download-file-sha256. DownloadFileSha256(context.Context, *DownloadFileSha256Payload) (res *DownloadFileSha256Result, body io.ReadCloser, err error) }
OCI artifacts download service