Documentation ¶
Index ¶
- Constants
- Variables
- func NewListEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewReadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewUploadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- type ArtifactListItem
- type ArtifactListRT
- type ArtifactStatusRT
- type ArtifactUploadRT
- type Auther
- type BadRequestT
- type Endpoints
- type InvalidParameterT
- type InvalidScopesT
- type LinkT
- type ListPayload
- type NotImplementedT
- type ReadPayload
- type ResourceNotFoundT
- type Service
- type ServiceNotAvailableT
- type UnauthorizedT
- type UploadPayload
- type UploadRequestData
Constants ¶
const APIName = "ivcap"
APIName is the name of the API as defined in the design.
const APIVersion = "0.43"
APIVersion is the version of the API as defined in the design.
const ServiceName = "artifact"
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", "read", "upload"}
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 NewListEndpoint ¶
func NewListEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListEndpoint returns an endpoint function that calls the method "list" of service "artifact".
func NewReadEndpoint ¶
func NewReadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewReadEndpoint returns an endpoint function that calls the method "read" of service "artifact".
func NewUploadEndpoint ¶
func NewUploadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewUploadEndpoint returns an endpoint function that calls the method "upload" of service "artifact".
Types ¶
type ArtifactListItem ¶
type ArtifactListRT ¶
type ArtifactListRT struct { // Artifacts Items []*ArtifactListItem // Time at which this list was valid AtTime *string Links []*LinkT }
ArtifactListRT is the result type of the artifact service list method.
type ArtifactStatusRT ¶
type ArtifactStatusRT struct { // Artifact ID ID string // Optional name Name *string // Artifact status Status string // Mime-type of data MimeType *string // Size of data Size *int64 // URL of object this artifact is caching CacheOf *string // ETAG of artifact Etag *string // DateTime artifact was created CreatedAt *string // DateTime artifact was last modified LastModifiedAt *string // Reference to policy used Policy *string // Reference to billable account Account *string DataHref *string Links []*LinkT }
ArtifactStatusRT is the result type of the artifact service read method.
type ArtifactUploadRT ¶ added in v0.30.0
type ArtifactUploadRT struct { // link back to record Location string // indicate version of TUS supported TusResumable *string // TUS offset for partially uploaded content TusOffset *int64 // Artifact ID ID string // Optional name Name *string // Artifact status Status string // Mime-type of data MimeType *string // Size of data Size *int64 // URL of object this artifact is caching CacheOf *string // ETAG of artifact Etag *string // DateTime artifact was created CreatedAt *string // DateTime artifact was last modified LastModifiedAt *string // Reference to policy used Policy *string // Reference to billable account Account *string DataHref *string Links []*LinkT }
ArtifactUploadRT is the result type of the artifact service upload method.
type Auther ¶
type Auther interface { // JWTAuth implements the authorization logic for the JWT security scheme. JWTAuth(ctx context.Context, token string, schema *security.JWTScheme) (context.Context, error) }
Auther defines the authorization functions to be implemented by the service.
type BadRequestT ¶
type BadRequestT struct { // Information message Message string }
Something wasn't right with this request
func (*BadRequestT) Error ¶
func (e *BadRequestT) Error() string
Error returns an error description.
func (*BadRequestT) ErrorName
deprecated
func (e *BadRequestT) ErrorName() string
ErrorName returns "BadRequestT".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*BadRequestT) GoaErrorName ¶
func (e *BadRequestT) GoaErrorName() string
GoaErrorName returns "BadRequestT".
type Endpoints ¶
Endpoints wraps the "artifact" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "artifact" service with endpoints.
type InvalidParameterT ¶ added in v0.39.0
type InvalidParameterT struct { // message describing expected type or pattern. Message string // name of parameter. Name string // provided parameter value. Value *string }
InvalidParameterT is the error returned when a parameter has the wrong value.
func (*InvalidParameterT) Error ¶ added in v0.39.0
func (e *InvalidParameterT) Error() string
Error returns an error description.
func (*InvalidParameterT) ErrorName
deprecated
added in
v0.39.0
func (e *InvalidParameterT) ErrorName() string
ErrorName returns "InvalidParameterT".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*InvalidParameterT) GoaErrorName ¶ added in v0.39.0
func (e *InvalidParameterT) GoaErrorName() string
GoaErrorName returns "InvalidParameterT".
type InvalidScopesT ¶
type InvalidScopesT struct { // ID of involved resource ID *string // Message of error Message string }
Caller not authorized to access required scope.
func (*InvalidScopesT) Error ¶
func (e *InvalidScopesT) Error() string
Error returns an error description.
func (*InvalidScopesT) ErrorName
deprecated
func (e *InvalidScopesT) ErrorName() string
ErrorName returns "InvalidScopesT".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*InvalidScopesT) GoaErrorName ¶
func (e *InvalidScopesT) GoaErrorName() string
GoaErrorName returns "InvalidScopesT".
type ListPayload ¶
type ListPayload struct { // The 'limit' query option sets the maximum number of items // to be included in the result. Limit int // The 'filter' system query option allows clients to filter a collection of // resources that are addressed by a request URL. The expression specified with // 'filter' // is evaluated for each resource in the collection, and only items where the // expression // evaluates to true are included in the response. Filter *string // The 'orderby' query option allows clients to request resources in either // ascending order using asc or descending order using desc. If asc or desc not // specified, // then the resources will be ordered in ascending order. The request below // orders Trips on // property EndsAt in descending order. OrderBy *string // When set order result in descending order. Ascending order is the lt. OrderDesc bool // Return the state of the respective resources at that time [now] AtTime *string // The content of 'page' is returned in the 'links' part of a previous query and // will when set, ALL other parameters, except for 'limit' are ignored. Page *string // JWT used for authentication JWT string }
ListPayload is the payload type of the artifact service list method.
type NotImplementedT ¶
type NotImplementedT struct { // Information message Message string }
Method is not yet implemented.
func (*NotImplementedT) Error ¶
func (e *NotImplementedT) Error() string
Error returns an error description.
func (*NotImplementedT) ErrorName
deprecated
func (e *NotImplementedT) ErrorName() string
ErrorName returns "NotImplementedT".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*NotImplementedT) GoaErrorName ¶
func (e *NotImplementedT) GoaErrorName() string
GoaErrorName returns "NotImplementedT".
type ReadPayload ¶
type ReadPayload struct { // ID of artifacts to show ID string // JWT used for authentication JWT string }
ReadPayload is the payload type of the artifact service read method.
type ResourceNotFoundT ¶
type ResourceNotFoundT struct { // ID of missing resource ID string // Message of error Message string }
NotFound is the type returned when attempting to manage a resource that does not exist.
func (*ResourceNotFoundT) Error ¶
func (e *ResourceNotFoundT) Error() string
Error returns an error description.
func (*ResourceNotFoundT) ErrorName
deprecated
func (e *ResourceNotFoundT) ErrorName() string
ErrorName returns "ResourceNotFoundT".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*ResourceNotFoundT) GoaErrorName ¶
func (e *ResourceNotFoundT) GoaErrorName() string
GoaErrorName returns "ResourceNotFoundT".
type Service ¶
type Service interface { // list artifacts List(context.Context, *ListPayload) (res *ArtifactListRT, err error) // Show artifacts by ID Read(context.Context, *ReadPayload) (res *ArtifactStatusRT, err error) // Upload content and create a artifacts. Upload(context.Context, *UploadPayload, io.ReadCloser) (res *ArtifactUploadRT, err error) }
Manage the life cycle of an artifact stored by this deployment.
type ServiceNotAvailableT ¶ added in v0.39.0
type ServiceNotAvailableT struct { }
Service necessary to fulfil the request is currently not available.
func (*ServiceNotAvailableT) Error ¶ added in v0.39.0
func (e *ServiceNotAvailableT) Error() string
Error returns an error description.
func (*ServiceNotAvailableT) ErrorName
deprecated
added in
v0.39.0
func (e *ServiceNotAvailableT) ErrorName() string
ErrorName returns "ServiceNotAvailableT".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*ServiceNotAvailableT) GoaErrorName ¶ added in v0.39.0
func (e *ServiceNotAvailableT) GoaErrorName() string
GoaErrorName returns "ServiceNotAvailableT".
type UnauthorizedT ¶
type UnauthorizedT struct { }
Unauthorized access to resource
func (*UnauthorizedT) Error ¶
func (e *UnauthorizedT) Error() string
Error returns an error description.
func (*UnauthorizedT) ErrorName
deprecated
func (e *UnauthorizedT) ErrorName() string
ErrorName returns "UnauthorizedT".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*UnauthorizedT) GoaErrorName ¶
func (e *UnauthorizedT) GoaErrorName() string
GoaErrorName returns "UnauthorizedT".
type UploadPayload ¶
type UploadPayload struct { // Content-Type header, MUST define type of uploaded content. ContentType *string `json:"content-type,omitempty"` // Content-Encoding header, MAY define encoding of content. ContentEncoding *string `json:"content-encoding,omitempty"` // Content-Length header, MAY define size of expected upload. ContentLength *int `json:"content-length,omitempty"` // X-Name header, MAY define a more human friendly name. Reusing a name will // NOT override an existing artifact with the same name Name *string // X-Collection header, MAY define an collection name as a simple way of // grouping artifacts Collection *string // X-Policy header, MAY define a specific policy to control access to this // artifact Policy *string // X-Content-Type header, used for initial, empty content creation requests. XContentType *string `json:"x-content-type,omitempty"` // X-Content-Length header, used for initial, empty content creation requests. XContentLength *int `json:"x-content-length,omitempty"` // Upload-Length header, sets the expected content size part of the TUS // protocol. UploadLength *int `json:"upload-length,omitempty"` // Tus-Resumable header, specifies TUS protocol version. TusResumable *string `json:"tus-resumable,omitempty"` // JWT used for authentication JWT string }
UploadPayload is the payload type of the artifact service upload method.
type UploadRequestData ¶
type UploadRequestData struct { // Payload is the method payload. Payload *UploadPayload // Body streams the HTTP request body. Body io.ReadCloser }
UploadRequestData holds both the payload and the HTTP request body reader of the "upload" method.