Documentation
¶
Index ¶
- Constants
- Variables
- func NewViewedOrderListRT(res *OrderListRT, view string) *orderviews.OrderListRT
- func NewViewedOrderStatusRT(res *OrderStatusRT, view string) *orderviews.OrderStatusRT
- type Auther
- type BadRequestT
- type CreatePayload
- type DescribedByT
- type InvalidCredentialsT
- type InvalidParameterValue
- type InvalidScopesT
- type ListPayload
- type NavT
- type NotImplementedT
- type OrderListItem
- type OrderListRT
- type OrderRequestT
- type OrderStatusRT
- type ParameterT
- type ProductT
- type ReadPayload
- type RefT
- type ResourceNotFoundT
- type SelfT
- type SelfWithDataT
- type Service
- type ServiceNotAvailableT
- 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 = [3]string{"list", "create", "read"}
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 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.
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 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 $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 // The $top system query option requests the number of items in the queried // collection to be included in the result. Top int // The $skip query option requests the number of items in the queried collection // that are to be skipped and not included in the result. Skip int // The $select system query option allows the clients to requests a limited set // of properties for each entity or complex type. The example returns Name and // IcaoCode // of all Airports. Select string // DEPRECATED: List offset. Use '$skip' instead Offset *int // DEPRECATED: Max. number of records to return. Use '$top' instead Limit *int // DEPRECATED: Page token PageToken string // JWT used for authentication JWT string }
ListPayload is the payload type of the order 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 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 // 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 // Reference to billable account AccountID string // Optional customer provided name Name *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 // Optional customer provided name Name *string // Service parameters Parameters []*ParameterT }
OrderStatusRT is the result type of the order service create method.
func NewOrderStatusRT ¶
func NewOrderStatusRT(vres *orderviews.OrderStatusRT) *OrderStatusRT
NewOrderStatusRT initializes result type OrderStatusRT from viewed result type OrderStatusRT.
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 { // 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) // 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) }
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 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".