Documentation
¶
Index ¶
- Constants
- Variables
- func NewCreateEndpoint(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 NewRetractEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewUpdateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- type AspectIDRT
- type AspectListItemRT
- type AspectListRT
- type AspectRT
- type Auther
- type BadRequestT
- type CreatePayload
- type Endpoints
- type InvalidParameterT
- type InvalidScopesT
- type LinkT
- type ListPayload
- type NotImplementedT
- type NotUniqueResourceT
- type ReadPayload
- type ResourceNotFoundT
- type RetractPayload
- type Service
- type ServiceNotAvailableT
- type UnauthorizedT
- type UnsupportedContentTypeT
- type UpdatePayload
Constants ¶
const APIName = "ivcap"
APIName is the name of the API as defined in the design.
const APIVersion = "0.43"
APIVersion is the version of the API as defined in the design.
const ServiceName = "aspect"
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", "update", "retract"}
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 "aspect".
func NewListEndpoint ¶
func NewListEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListEndpoint returns an endpoint function that calls the method "list" of service "aspect".
func NewReadEndpoint ¶
func NewReadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewReadEndpoint returns an endpoint function that calls the method "read" of service "aspect".
func NewRetractEndpoint ¶
func NewRetractEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewRetractEndpoint returns an endpoint function that calls the method "retract" of service "aspect".
func NewUpdateEndpoint ¶
func NewUpdateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewUpdateEndpoint returns an endpoint function that calls the method "update" of service "aspect".
Types ¶
type AspectIDRT ¶
type AspectIDRT struct { // ID ID string }
AspectIDRT is the result type of the aspect service create method.
type AspectListItemRT ¶
type AspectListItemRT struct { // ID ID string // Entity URN Entity string // Schema URN Schema string // Attached aspect aspect Content any // Content-Type header, MUST be of application/json. ContentType string `json:"content-type,omitempty"` // Time this assertion became valid ValidFrom *string // Time this assertion became valid ValidTo *string }
type AspectListRT ¶
type AspectListRT struct { // List of aspect descriptions Items []*AspectListItemRT // Entity for which to request aspect Entity *string // Optional schema to filter on Schema *string // Optional json path to further filter on returned list AspectPath *string // Time at which this list was valid AtTime string Links []*LinkT }
AspectListRT is the result type of the aspect service list method.
type AspectRT ¶
type AspectRT struct { // ID ID string // Entity URN Entity string // Schema URN Schema string // Description of aspect encoded as 'content-type' Content any // Content-Type header, MUST be of application/json. ContentType string `json:"content-type,omitempty"` // Time this record was asserted ValidFrom string // Time this record was retracted ValidTo *string // Entity asserting this metadata record at 'valid-from' Asserter string // Entity retracting this record at 'valid-to' Retracter *string // Reference to retracted aspect record this record is replacing Replaces *string // Reference to billable account Account string Links []*LinkT }
AspectRT is the result type of the aspect service read method.
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 { // Entity to which attach aspect Entity string `json:"entity,omitempty"` // Schema of the aspect in payload Schema string // Aspect content Content any // Optionally, an existing aspect this new one will replace (retract) Replaces *string // Content-Type header, MUST be of application/json. ContentType string `json:"content-type,omitempty"` // Policy guiding visibility and actions performed Policy *string `json:"policy,omitempty"` // JWT used for authentication JWT string }
CreatePayload is the payload type of the aspect service create method.
type Endpoints ¶
type Endpoints struct { Read goa.Endpoint List goa.Endpoint Create goa.Endpoint Update goa.Endpoint Retract goa.Endpoint }
Endpoints wraps the "aspect" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "aspect" 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 { // Optional entity for which to request aspects Entity *string `json:"entity,omitempty"` // Schema prefix using '%' as wildcard indicator Schema *string // To learn more about the supported format, see // https://www.postgresql.org/docs/current/datatype-json.html#DATATYPE-JSONPATH ContentPath *string `json:"content-path,omitempty"` // Return aspect which where valid at that time [now] AtTime *string `json:"at-time,omitempty"` // 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 OrderBy string `json:"order-by,omitempty"` // Set the sort direction 'ASC', 'DESC' for each order-by element. OrderDirection string `json:"order-direction,omitempty"` // When set, also include aspect content in list. IncludeContent *bool `json:"include-content,omitempty"` // 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 aspect 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 NotUniqueResourceT ¶ added in v0.39.0
type NotUniqueResourceT struct { // message describing expected type or pattern. Message string }
NotUniqueResource indicates that the method found more than the expected zero or one existing resources.
func (*NotUniqueResourceT) Error ¶ added in v0.39.0
func (e *NotUniqueResourceT) Error() string
Error returns an error description.
func (*NotUniqueResourceT) ErrorName
deprecated
added in
v0.39.0
func (e *NotUniqueResourceT) ErrorName() string
ErrorName returns "NotUniqueResourceT".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*NotUniqueResourceT) GoaErrorName ¶ added in v0.39.0
func (e *NotUniqueResourceT) GoaErrorName() string
GoaErrorName returns "NotUniqueResourceT".
type ReadPayload ¶
type ReadPayload struct { // ID of aspects to show ID string // JWT used for authentication JWT string }
ReadPayload is the payload type of the aspect 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 RetractPayload ¶
type RetractPayload struct { // Aspect ID to restract ID string // JWT used for authentication JWT string }
RetractPayload is the payload type of the aspect service retract method.
type Service ¶
type Service interface { // Show aspects by ID Read(context.Context, *ReadPayload) (res *AspectRT, err error) // Return a list of aspect aspects. List(context.Context, *ListPayload) (res *AspectListRT, err error) // Attach new aspect to an entity. Create(context.Context, *CreatePayload) (res *AspectIDRT, err error) // A convenience method which will create a new aspect, but will also // retract a potentially existing aspect for the same entity with the same // schema. Update(context.Context, *UpdatePayload) (res *AspectIDRT, err error) // Retract a previously created statement. Retract(context.Context, *RetractPayload) (err error) }
Manages the life cycle of aspect(s) attached to some entity.
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 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 UnsupportedContentTypeT ¶ added in v0.39.0
type UnsupportedContentTypeT struct { // message describing expected type or pattern. Message string }
UnsupportedContentType is the error returned when the provided content type is not supported.
func (*UnsupportedContentTypeT) Error ¶ added in v0.39.0
func (e *UnsupportedContentTypeT) Error() string
Error returns an error description.
func (*UnsupportedContentTypeT) ErrorName
deprecated
added in
v0.39.0
func (e *UnsupportedContentTypeT) ErrorName() string
ErrorName returns "UnsupportedContentTypeT".
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (*UnsupportedContentTypeT) GoaErrorName ¶ added in v0.39.0
func (e *UnsupportedContentTypeT) GoaErrorName() string
GoaErrorName returns "UnsupportedContentTypeT".
type UpdatePayload ¶
type UpdatePayload struct { // Entity to which attach aspect Entity string `json:"entity,omitempty"` // Schema of aspect Schema string // Aspect content Content any // Content-Type header, MUST be of application/json. ContentType string `json:"content-type,omitempty"` // Policy guiding visibility and actions performed Policy *string `json:"policy,omitempty"` // JWT used for authentication JWT string }
UpdatePayload is the payload type of the aspect service update method.