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 NewMetadataEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewProductsEndpoint(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 NewViewedOrderTopResultItemCollection(res OrderTopResultItemCollection, view string) orderviews.OrderTopResultItemCollection
- type Auther
- type BadRequestT
- type CreatePayload
- type Endpoints
- type InvalidParameterT
- type InvalidScopesT
- type LinkT
- type ListPayload
- type LogsPayload
- type LogsResponseData
- type MetadataPayload
- type NotImplementedT
- type OrderListItem
- type OrderListRT
- type OrderMetadataListItemRT
- type OrderRequestT
- type OrderStatusRT
- type OrderTopResultItem
- type OrderTopResultItemCollection
- type ParameterT
- type PartialMetaListT
- type PartialProductListT
- type ProductListItemT
- type ProductsPayload
- type ReadPayload
- type ResourceNotFoundT
- type Service
- type ServiceNotAvailableT
- type TopPayload
- type UnauthorizedT
Constants ¶
const APIName = "ivcap"
APIName is the name of the API as defined in the design.
const APIVersion = "0.44"
APIVersion is the version of the API as defined in the design.
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 = [7]string{"list", "read", "products", "metadata", "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 ¶
func NewCreateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewCreateEndpoint returns an endpoint function that calls the method "create" of service "order".
func NewListEndpoint ¶
func NewListEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListEndpoint returns an endpoint function that calls the method "list" of service "order".
func NewLogsEndpoint ¶
func NewLogsEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewLogsEndpoint returns an endpoint function that calls the method "logs" of service "order".
func NewMetadataEndpoint ¶ added in v0.35.2
func NewMetadataEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewMetadataEndpoint returns an endpoint function that calls the method "metadata" of service "order".
func NewProductsEndpoint ¶ added in v0.35.1
func NewProductsEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewProductsEndpoint returns an endpoint function that calls the method "products" of service "order".
func NewReadEndpoint ¶
func NewReadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewReadEndpoint returns an endpoint function that calls the method "read" of service "order".
func NewTopEndpoint ¶
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 NewViewedOrderTopResultItemCollection ¶
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
}
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 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 Endpoints ¶
type Endpoints struct {
List goa.Endpoint
Read goa.Endpoint
Products goa.Endpoint
Metadata goa.Endpoint
Create goa.Endpoint
Logs goa.Endpoint
Top goa.Endpoint
}
Endpoints wraps the "order" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "order" 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 order service list method.
type LogsPayload ¶
type LogsPayload struct {
// From unix time, seconds since 1970-01-01
From *int64
// To unix time, seconds since 1970-01-01
To *int64
// Reference to order requested
OrderID string
// JWT used for authentication
JWT string
}
LogsPayload is the payload type of the order service logs method.
type LogsResponseData ¶
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 MetadataPayload ¶ added in v0.35.2
type MetadataPayload struct {
// Reference to order requested
OrderID string
// The 'limit' query option sets the maximum number of items
// to be included in the result.
Limit int
// 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
// 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
}
MetadataPayload is the payload type of the order service metadata 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 {
// ID
ID string
// Optional customer provided name
Name *string
// Order status
Status string
// DateTime order was placed
OrderedAt *string
// DateTime order processing started
StartedAt *string
// DateTime order processing finished
FinishedAt *string
// Reference to service requested
Service string
// Reference to billable account
Account string
Href string `json:"href,omitempty"`
}
type OrderListRT ¶
type OrderListRT struct {
// Orders
Items []*OrderListItem
// Time at which this list was valid
AtTime string
Links []*LinkT
}
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 OrderMetadataListItemRT ¶ added in v0.35.2
type OrderRequestT ¶
type OrderRequestT struct {
// Reference to service requested
Service string
// Reference to policy used
Policy *string
// Optional customer provided name
Name *string
// Optional customer provided tags
Tags []string
// Service parameters
Parameters []*ParameterT
}
type OrderStatusRT ¶
type OrderStatusRT struct {
// 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 *PartialProductListT
// Reference to service requested
Service string
// Reference to billable account
Account string
Links []*LinkT
// 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.
type OrderTopResultItem ¶
type OrderTopResultItemCollection ¶
type OrderTopResultItemCollection []*OrderTopResultItem
OrderTopResultItemCollection is the result type of the order service top method.
func NewOrderTopResultItemCollection ¶
func NewOrderTopResultItemCollection(vres orderviews.OrderTopResultItemCollection) OrderTopResultItemCollection
NewOrderTopResultItemCollection initializes result type OrderTopResultItemCollection from viewed result type OrderTopResultItemCollection.
type ParameterT ¶
type PartialMetaListT ¶ added in v0.35.2
type PartialMetaListT struct {
// (Partial) list of metadata associated with this order
Items []*OrderMetadataListItemRT
// Links to more metadata, if there are any
Links []*LinkT
}
PartialMetaListT is the result type of the order service metadata method.
type PartialProductListT ¶ added in v0.30.0
type PartialProductListT struct {
// (Partial) list of products delivered by this order
Items []*ProductListItemT
// Links to more products, if there are any
Links []*LinkT
}
PartialProductListT is the result type of the order service products method.
type ProductListItemT ¶ added in v0.30.0
type ProductsPayload ¶ added in v0.35.1
type ProductsPayload struct {
// Reference to order requested
OrderID string
// The 'limit' query option sets the maximum number of items
// to be included in the result.
Limit int
// 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
// 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
}
ProductsPayload is the payload type of the order service products method.
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 Service ¶
type Service interface {
// list orders
List(context.Context, *ListPayload) (res *OrderListRT, err error)
// Show orders by ID
Read(context.Context, *ReadPayload) (res *OrderStatusRT, err error)
// list products created by an order
Products(context.Context, *ProductsPayload) (res *PartialProductListT, err error)
// list metadata created by an order
Metadata(context.Context, *MetadataPayload) (res *PartialMetaListT, err error)
// Create a new orders and return its status.
Create(context.Context, *CreatePayload) (res *OrderStatusRT, 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 {
}
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 TopPayload ¶
type TopPayload struct {
// Reference to order requested
OrderID string
// 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".