package_

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APIName = "ivcap"

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

View Source
const APIVersion = "0.43"

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

View Source
const ServiceName = "package"

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 = [5]string{"list", "pull", "push", "status", "remove"}

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 "package".

func NewPullEndpoint

func NewPullEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewPullEndpoint returns an endpoint function that calls the method "pull" of service "package".

func NewPushEndpoint

func NewPushEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewPushEndpoint returns an endpoint function that calls the method "push" of service "package".

func NewRemoveEndpoint

func NewRemoveEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewRemoveEndpoint returns an endpoint function that calls the method "remove" of service "package".

func NewStatusEndpoint

func NewStatusEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewStatusEndpoint returns an endpoint function that calls the method "status" of service "package".

Types

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

type Endpoints struct {
	List   goa.Endpoint
	Pull   goa.Endpoint
	Push   goa.Endpoint
	Status goa.Endpoint
	Remove goa.Endpoint
}

Endpoints wraps the "package" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

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

type InvalidParameterT

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

func (e *InvalidParameterT) Error() string

Error returns an error description.

func (*InvalidParameterT) ErrorName deprecated

func (e *InvalidParameterT) ErrorName() string

ErrorName returns "InvalidParameterT".

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (*InvalidParameterT) GoaErrorName

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 LinkT

type LinkT struct {
	// relation type
	Rel string
	// mime type
	Type string
	// web link
	Href string
}

type ListPayload

type ListPayload struct {
	// docker image tag
	Tag *string
	// maximum number of repository items, which can have multiple tags
	Limit *int
	// page url to list
	Page *string
	// JWT used for authentication
	JWT string
}

ListPayload is the payload type of the package service list method.

type ListResult

type ListResult struct {
	// docker image tags
	Items []string
	Links []*LinkT
}

ListResult is the result type of the package 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 PullPayload

type PullPayload struct {
	// docker image tag or layer digest
	Ref string
	// pull type, either be manifest, config or layer
	Type string
	// offset of the layer chunk
	Offset *int
	// JWT used for authentication
	JWT string
}

PullPayload is the payload type of the package service pull method.

type PullResponseData

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

PullResponseData holds both the result and the HTTP response body reader of the "pull" method.

type PullResultT

type PullResultT struct {
	// total size in bytes of layer
	Total int
	// available size in bytes of layer to read
	Available int
}

PullResultT is the result type of the package service pull method.

type PushPayload

type PushPayload struct {
	// docker image tag
	Tag string
	// force to override
	Force *bool
	// push type, either be manifest, config or layer
	Type string
	// digest of the push
	Digest string
	// start of the layer chunk
	Start *int
	// end of the layer chunk
	End *int
	// total size of the layer
	Total *int
	// JWT used for authentication
	JWT string
}

PushPayload is the payload type of the package service push method.

type PushRequestData

type PushRequestData struct {
	// Payload is the method payload.
	Payload *PushPayload
	// Body streams the HTTP request body.
	Body io.ReadCloser
}

PushRequestData holds both the payload and the HTTP request body reader of the "push" method.

type PushResult

type PushResult struct {
	// uploaded image digest or tag
	Digest string
	// layer exists or not
	Exists bool
}

PushResult is the result type of the package service push method.

type PushStatusT

type PushStatusT struct {
	// Push status
	Status string
	// Message
	Message string
}

PushStatusT is the result type of the package service status method.

type RemovePayload

type RemovePayload struct {
	// docker image tag
	Tag string
	// JWT used for authentication
	JWT string
}

RemovePayload is the payload type of the package service remove method.

type ResourceAlreadyCreatedT

type ResourceAlreadyCreatedT struct {
	// ID of already existing resource
	ID string
	// Message of error
	Message string
}

Will be returned when receiving a request to create and already existing resource.

func (*ResourceAlreadyCreatedT) Error

func (e *ResourceAlreadyCreatedT) Error() string

Error returns an error description.

func (*ResourceAlreadyCreatedT) ErrorName deprecated

func (e *ResourceAlreadyCreatedT) ErrorName() string

ErrorName returns "ResourceAlreadyCreatedT".

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (*ResourceAlreadyCreatedT) GoaErrorName

func (e *ResourceAlreadyCreatedT) GoaErrorName() string

GoaErrorName returns "ResourceAlreadyCreatedT".

type Service

type Service interface {
	// list ivcap service's docker images under account
	List(context.Context, *ListPayload) (res *ListResult, err error)
	// pull ivcap service's docker image
	Pull(context.Context, *PullPayload) (res *PullResultT, body io.ReadCloser, err error)
	// upload service's docker image to container registry
	Push(context.Context, *PushPayload, io.ReadCloser) (res *PushResult, err error)
	// check push status of a layer
	Status(context.Context, *StatusPayload) (res *PushStatusT, err error)
	// remove ivcap service's docker image
	Remove(context.Context, *RemovePayload) (err error)
}

Manage the life cycle of a service package.

type ServiceNotAvailableT

type ServiceNotAvailableT struct {
}

Service necessary to fulfil the request is currently not available.

func (*ServiceNotAvailableT) Error

func (e *ServiceNotAvailableT) Error() string

Error returns an error description.

func (*ServiceNotAvailableT) ErrorName deprecated

func (e *ServiceNotAvailableT) ErrorName() string

ErrorName returns "ServiceNotAvailableT".

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (*ServiceNotAvailableT) GoaErrorName

func (e *ServiceNotAvailableT) GoaErrorName() string

GoaErrorName returns "ServiceNotAvailableT".

type StatusPayload

type StatusPayload struct {
	// docker image tag
	Tag string
	// docker image layer digest
	Digest string
	// JWT used for authentication
	JWT string
}

StatusPayload is the payload type of the package service status method.

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".

Jump to

Keyboard shortcuts

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