Documentation ¶
Index ¶
- Constants
- Variables
- func NewCreateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewListEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewLogsEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewReadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewTopEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedOrderListRT(res *OrderListRT, view string) *orderviews.OrderListRT
- func NewViewedOrderStatusRT(res *OrderStatusRT, view string) *orderviews.OrderStatusRT
- func NewViewedOrderTopResultItemCollection(res OrderTopResultItemCollection, view string) orderviews.OrderTopResultItemCollection
- type Auther
- type BadRequestT
- type CreatePayload
- type DescribedByT
- type DownloadLogRequestT
- type Endpoints
- type InvalidCredentialsT
- type InvalidParameterValue
- type InvalidScopesT
- type ListPayload
- type LogsPayload
- type LogsResponseData
- type NavT
- type NotImplementedT
- type OrderListItem
- type OrderListRT
- type OrderRequestT
- type OrderStatusRT
- type OrderTopRequestT
- type OrderTopResultItem
- type OrderTopResultItemCollection
- type ParameterT
- type ProductT
- type ReadPayload
- type RefT
- type ResourceNotFoundT
- type SelfT
- type SelfWithDataT
- type Service
- type ServiceNotAvailableT
- type TopPayload
- type UnauthorizedT
Constants ¶
const ServiceName = "order"
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{"read", "list", "create", "logs", "top"}
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 NewCreateEndpoint ¶ added in v0.27.2
func NewCreateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewCreateEndpoint returns an endpoint function that calls the method "create" of service "order".
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 "order".
func NewLogsEndpoint ¶ added in v0.28.3
func NewLogsEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewLogsEndpoint returns an endpoint function that calls the method "logs" of service "order".
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 "order".
func NewTopEndpoint ¶ added in v0.28.5
func NewTopEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewTopEndpoint returns an endpoint function that calls the method "top" of service "order".
func NewViewedOrderListRT ¶
func NewViewedOrderListRT(res *OrderListRT, view string) *orderviews.OrderListRT
NewViewedOrderListRT initializes viewed result type OrderListRT from result type OrderListRT using the given view.
func NewViewedOrderStatusRT ¶
func NewViewedOrderStatusRT(res *OrderStatusRT, view string) *orderviews.OrderStatusRT
NewViewedOrderStatusRT initializes viewed result type OrderStatusRT from result type OrderStatusRT using the given view.
func NewViewedOrderTopResultItemCollection ¶ added in v0.28.5
func NewViewedOrderTopResultItemCollection(res OrderTopResultItemCollection, view string) orderviews.OrderTopResultItemCollection
NewViewedOrderTopResultItemCollection initializes viewed result type OrderTopResultItemCollection from result type OrderTopResultItemCollection 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 CreatePayload ¶
type CreatePayload struct { // New orders description Orders *OrderRequestT // JWT used for authentication JWT string }
CreatePayload is the payload type of the order service create method.
type DescribedByT ¶
type DownloadLogRequestT ¶ added in v0.28.3
type DownloadLogRequestT struct { // From unix time, seconds since 1970-01-01 From *int64 // To unix time, seconds since 1970-01-01 To *int64 // Reference to namespace name NamespaceName *string `json:"namespace-name,omitempty"` // Reference to container name ContainerName *string `json:"container-name,omitempty"` // Reference to order requested OrderID string `json:"order-id,omitempty"` // Policy to control access to record an all generated artifacts PolicyID *string `json:"policy-id,omitempty"` }
type Endpoints ¶ added in v0.27.2
type Endpoints struct { Read goa.Endpoint List goa.Endpoint Create goa.Endpoint Logs goa.Endpoint Top goa.Endpoint }
Endpoints wraps the "order" service endpoints.
func NewEndpoints ¶ added in v0.27.2
NewEndpoints wraps the methods of the "order" 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 order service list method.
type LogsPayload ¶ added in v0.28.3
type LogsPayload struct { // Download orders request DownloadLogRequest *DownloadLogRequestT // JWT used for authentication JWT string }
LogsPayload is the payload type of the order service logs method.
type LogsResponseData ¶ added in v0.28.3
type LogsResponseData struct { // Body streams the HTTP response body. Body io.ReadCloser }
LogsResponseData holds both the result and the HTTP response body reader of the "logs" 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 OrderListItem ¶
type OrderListItem struct { // Order ID ID *string // Optional customer provided name Name *string // Order status Status *string // DateTime order was placed OrderedAt *string // DateTime processing of order started StartedAt *string // DateTime order was finished FinishedAt *string // ID of ordered service ServiceID *string // ID of ordered service AccountID *string Links *SelfT }
type OrderListRT ¶
type OrderListRT struct { // Orders Orders []*OrderListItem // Time at which this list was valid AtTime string // Navigation links Links *NavT }
OrderListRT is the result type of the order service list method.
func NewOrderListRT ¶
func NewOrderListRT(vres *orderviews.OrderListRT) *OrderListRT
NewOrderListRT initializes result type OrderListRT from viewed result type OrderListRT.
type OrderRequestT ¶
type OrderRequestT struct { // Reference to service requested ServiceID string `json:"service-id,omitempty"` // Policy to control access to record an all generated artifacts PolicyID *string `json:"policy-id,omitempty"` // Optional customer provided name Name *string // Optional customer provided tags Tags []string // Service parameters Parameters []*ParameterT }
type OrderStatusRT ¶
type OrderStatusRT struct { // Order ID ID string // Order status Status *string // DateTime order was placed OrderedAt *string // DateTime order processing started StartedAt *string // DateTime order processing finished FinishedAt *string // Products delivered for this order Products []*ProductT // Reference to service requested Service *RefT // Reference to billable account Account *RefT Links *SelfT // Product metadata links ProductLinks *NavT // Optional customer provided name Name *string // Optional customer provided tags Tags []string // Service parameters Parameters []*ParameterT }
OrderStatusRT is the result type of the order service read method.
func NewOrderStatusRT ¶
func NewOrderStatusRT(vres *orderviews.OrderStatusRT) *OrderStatusRT
NewOrderStatusRT initializes result type OrderStatusRT from viewed result type OrderStatusRT.
type OrderTopRequestT ¶ added in v0.28.5
type OrderTopRequestT struct { // Reference to order requested OrderID string `json:"order-id,omitempty"` // Reference to namespace name NamespaceName *string `json:"namespace-name,omitempty"` // Policy to control access to record an all generated artifacts PolicyID *string `json:"policy-id,omitempty"` }
type OrderTopResultItem ¶ added in v0.28.5
type OrderTopResultItemCollection ¶ added in v0.28.5
type OrderTopResultItemCollection []*OrderTopResultItem
OrderTopResultItemCollection is the result type of the order service top method.
func NewOrderTopResultItemCollection ¶ added in v0.28.5
func NewOrderTopResultItemCollection(vres orderviews.OrderTopResultItemCollection) OrderTopResultItemCollection
NewOrderTopResultItemCollection initializes result type OrderTopResultItemCollection from viewed result type OrderTopResultItemCollection.
type ParameterT ¶
type ReadPayload ¶
type ReadPayload struct { // ID of orders to show ID string // JWT used for authentication JWT string }
ReadPayload is the payload type of the order 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 SelfT ¶
type SelfT struct { Self *string DescribedBy *DescribedByT }
type SelfWithDataT ¶
type SelfWithDataT struct { Self *string DescribedBy *DescribedByT Data *string }
type Service ¶
type Service interface { // Show orders by ID // The "view" return value must have one of the following views // - "default" // - "tiny" Read(context.Context, *ReadPayload) (res *OrderStatusRT, view string, err error) // list orders List(context.Context, *ListPayload) (res *OrderListRT, err error) // Create a new orders and return its status. // The "view" return value must have one of the following views // - "default" // - "tiny" Create(context.Context, *CreatePayload) (res *OrderStatusRT, view string, err error) // download order logs Logs(context.Context, *LogsPayload) (body io.ReadCloser, err error) // top order resources Top(context.Context, *TopPayload) (res OrderTopResultItemCollection, err error) }
Manage the life cycle of an order for CRE services.
type ServiceNotAvailableT ¶
type ServiceNotAvailableT struct { }
ServiceNotAvailable is the type returned when the service necessary to fulfill 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 TopPayload ¶ added in v0.28.5
type TopPayload struct { // orders order request OrderTopRequest *OrderTopRequestT // JWT used for authentication JWT string }
TopPayload is the payload type of the order service top 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".