Documentation
¶
Index ¶
- Constants
- Variables
- func NewCreateServiceEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDeleteEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewListEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewReadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewUpdateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedServiceListRT(res *ServiceListRT, view string) *serviceviews.ServiceListRT
- func NewViewedServiceStatusRT(res *ServiceStatusRT, view string) *serviceviews.ServiceStatusRT
- type Auther
- type BadRequestT
- type BasicWorkflowOptsT
- type CreateServicePayload
- type DeletePayload
- type DescribedByT
- type Endpoints
- type InvalidCredentialsT
- type InvalidParameterValue
- type InvalidScopesT
- type ListPayload
- type NavT
- type NotImplementedT
- type ParameterDefT
- type ParameterOptT
- type ParameterT
- type ReadPayload
- type RefT
- type ReferenceT
- type ResourceAlreadyCreatedT
- type ResourceMemoryT
- type ResourceNotFoundT
- type SelfT
- type Service
- type ServiceDescriptionT
- type ServiceListItem
- type ServiceListRT
- type ServiceStatusRT
- type UnauthorizedT
- type UpdatePayload
- type WorkflowT
Constants ¶
const ServiceName = "service"
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 = [5]string{"list", "create_service", "read", "update", "delete"}
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 NewCreateServiceEndpoint ¶ added in v0.27.2
func NewCreateServiceEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewCreateServiceEndpoint returns an endpoint function that calls the method "create_service" of service "service".
func NewDeleteEndpoint ¶ added in v0.27.2
func NewDeleteEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "service".
func NewListEndpoint ¶ added in v0.27.2
func NewListEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListEndpoint returns an endpoint function that calls the method "list" of service "service".
func NewReadEndpoint ¶ added in v0.27.2
func NewReadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewReadEndpoint returns an endpoint function that calls the method "read" of service "service".
func NewUpdateEndpoint ¶ added in v0.27.2
func NewUpdateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewUpdateEndpoint returns an endpoint function that calls the method "update" of service "service".
func NewViewedServiceListRT ¶
func NewViewedServiceListRT(res *ServiceListRT, view string) *serviceviews.ServiceListRT
NewViewedServiceListRT initializes viewed result type ServiceListRT from result type ServiceListRT using the given view.
func NewViewedServiceStatusRT ¶
func NewViewedServiceStatusRT(res *ServiceStatusRT, view string) *serviceviews.ServiceStatusRT
NewViewedServiceStatusRT initializes viewed result type ServiceStatusRT from result type ServiceStatusRT using the given view.
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 }
Bad arguments supplied.
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 BasicWorkflowOptsT ¶
type BasicWorkflowOptsT struct { // container image name Image string // Command to start the container - needed for some container runtimes Command []string // Defines memory resource requests and limits Memory *ResourceMemoryT // Defines cpu resource requests and limits // (see // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu) CPU *ResourceMemoryT // Defines ephemeral storage resource requests and limits // (see // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#local-ephemeral-storage) EphemeralStorage *ResourceMemoryT `json:"ephemeral-storage,omitempty"` }
type CreateServicePayload ¶ added in v0.27.0
type CreateServicePayload struct { // New services description Services *ServiceDescriptionT // JWT used for authentication JWT string }
CreateServicePayload is the payload type of the service service create_service method.
type DeletePayload ¶
type DeletePayload struct { // ID of services to update ID string // JWT used for authentication JWT string }
DeletePayload is the payload type of the service service delete method.
type DescribedByT ¶
type Endpoints ¶ added in v0.27.2
type Endpoints struct { List goa.Endpoint CreateService goa.Endpoint Read goa.Endpoint Update goa.Endpoint Delete goa.Endpoint }
Endpoints wraps the "service" service endpoints.
func NewEndpoints ¶ added in v0.27.2
NewEndpoints wraps the methods of the "service" service with endpoints.
type InvalidCredentialsT ¶
type InvalidCredentialsT struct { }
Provided credential is not valid.
func (*InvalidCredentialsT) Error ¶
func (e *InvalidCredentialsT) Error() string
Error returns an error description.
func (*InvalidCredentialsT) ErrorName
deprecated
func (e *InvalidCredentialsT) ErrorName() string
ErrorName returns "InvalidCredentialsT".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*InvalidCredentialsT) GoaErrorName ¶
func (e *InvalidCredentialsT) GoaErrorName() string
GoaErrorName returns "InvalidCredentialsT".
type InvalidParameterValue ¶
type InvalidParameterValue struct { // message describing expected type or pattern. Message string // name of parameter. Name string // provided parameter value. Value *string }
InvalidParameterValue is the error returned when a parameter has the wrong value.
func (*InvalidParameterValue) Error ¶
func (e *InvalidParameterValue) Error() string
Error returns an error description.
func (*InvalidParameterValue) ErrorName
deprecated
func (e *InvalidParameterValue) ErrorName() string
ErrorName returns "InvalidParameterValue".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*InvalidParameterValue) GoaErrorName ¶
func (e *InvalidParameterValue) GoaErrorName() string
GoaErrorName returns "InvalidParameterValue".
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 system query option requests the number of items in the queried // collection 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 default. 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 service 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 ParameterDefT ¶
type ParameterOptT ¶
type ParameterT ¶
type ReadPayload ¶
type ReadPayload struct { // ID of services to show ID string // JWT used for authentication JWT string }
ReadPayload is the payload type of the service service read method.
type ReferenceT ¶
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 ResourceMemoryT ¶
type ResourceMemoryT struct { // minimal requirements [0] Request *string // minimal requirements [system limit] Limit *string }
See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes for units
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 SelfT ¶
type SelfT struct { Self *string DescribedBy *DescribedByT }
type Service ¶
type Service interface { // list services List(context.Context, *ListPayload) (res *ServiceListRT, err error) // Create a new services and return its status. // The "view" return value must have one of the following views // - "default" // - "tiny" CreateService(context.Context, *CreateServicePayload) (res *ServiceStatusRT, view string, err error) // Show services by ID // The "view" return value must have one of the following views // - "default" // - "tiny" Read(context.Context, *ReadPayload) (res *ServiceStatusRT, view string, err error) // Update an existing services and return its status. // The "view" return value must have one of the following views // - "default" // - "tiny" Update(context.Context, *UpdatePayload) (res *ServiceStatusRT, view string, err error) // Delete an existing services. Delete(context.Context, *DeletePayload) (err error) }
Manage the life cycle of a service offered on the CRE marketplace.
type ServiceDescriptionT ¶
type ServiceDescriptionT struct { // Provider provided reference. Should to be a single string with punctuations // allowed. Might be changed, so please check result ProviderRef *string `json:"provider-ref,omitempty"` // Reference to service provider ProviderID string `json:"provider-id,omitempty"` // More detailed description of the service Description string // Optional provider provided meta tags Metadata []*ParameterT // Reference to account revenues for this service should be credited to References []*ReferenceT // Link to banner image oprionally used for this service Banner *string // Definition of the workflow to use for executing this service Workflow *WorkflowT // Reference to policy controlling access PolicyID *string `json:"policy-id,omitempty"` // Optional provider provided name Name *string // Optional provider provided tags Tags []string // Service parameter definitions Parameters []*ParameterDefT }
type ServiceListItem ¶
type ServiceListRT ¶
type ServiceListRT struct { // Services Services []*ServiceListItem // Time at which this list was valid AtTime string // Navigation links Links *NavT }
ServiceListRT is the result type of the service service list method.
func NewServiceListRT ¶
func NewServiceListRT(vres *serviceviews.ServiceListRT) *ServiceListRT
NewServiceListRT initializes result type ServiceListRT from viewed result type ServiceListRT.
type ServiceStatusRT ¶
type ServiceStatusRT struct { // Service ID ID string // Provider provided ID. Needs to be a single string with punctuations allowed. // Might have been changed ProviderRef *string // More detailed description of the service Description *string // Service status Status *string // Optional provider provided meta tags Metadata []*ParameterT // Reference to service provider Provider *RefT // Reference to billable account Account *RefT Links *SelfT // Optional provider provided name Name *string // Optional provider provided tags Tags []string // Service parameter definitions Parameters []*ParameterDefT }
ServiceStatusRT is the result type of the service service create_service method.
func NewServiceStatusRT ¶
func NewServiceStatusRT(vres *serviceviews.ServiceStatusRT) *ServiceStatusRT
NewServiceStatusRT initializes result type ServiceStatusRT from viewed result type ServiceStatusRT.
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 UpdatePayload ¶
type UpdatePayload struct { // ID of services to update ID *string // Create if not already exist ForceCreate *bool // Updated services description Services *ServiceDescriptionT // JWT used for authentication JWT string }
UpdatePayload is the payload type of the service service update method.
type WorkflowT ¶
type WorkflowT struct { // Type of workflow Type *string // Type of workflow Basic *BasicWorkflowOptsT // Defines the workflow using argo's WF schema Argo interface{} // Type specific options - left for backward compatibility, if possible use // type specific elements Opts interface{} }
Defines the workflow to use to execute this service. Currently supported 'types' are 'basic' and 'argo'. In case of 'basic', use the 'basic' element for further parameters. In the current implementation 'opts' is expected to contain the same schema as 'basic'