Documentation
¶
Index ¶
- Constants
- Variables
- func NewCreateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDeleteEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDequeueEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewEnqueueEndpoint(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 NewViewedCreatequeueresponse(res *Createqueueresponse, view string) *queueviews.Createqueueresponse
- func NewViewedMessagestatus(res *Messagestatus, view string) *queueviews.Messagestatus
- func NewViewedReadqueueresponse(res *Readqueueresponse, view string) *queueviews.Readqueueresponse
- type Auther
- type BadRequestT
- type CreatePayload
- type Createqueueresponse
- type DeletePayload
- type DequeuePayload
- type Endpoints
- type EnqueuePayload
- type InvalidParameterT
- type InvalidScopesT
- type LinkT
- type ListPayload
- type MessageList
- type Messagestatus
- type NotImplementedT
- type PayloadForCreateEndpoint
- type Publishedmessage
- type QueueListItem
- type QueueListResult
- type ReadPayload
- type Readqueueresponse
- type ResourceAlreadyCreatedT
- type ResourceNotFoundT
- type Service
- type ServiceNotAvailableT
- 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 = "queue"
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 = [6]string{"create", "read", "delete", "list", "enqueue", "dequeue"}
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 "queue".
func NewDeleteEndpoint ¶
func NewDeleteEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "queue".
func NewDequeueEndpoint ¶
func NewDequeueEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDequeueEndpoint returns an endpoint function that calls the method "dequeue" of service "queue".
func NewEnqueueEndpoint ¶
func NewEnqueueEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewEnqueueEndpoint returns an endpoint function that calls the method "enqueue" of service "queue".
func NewListEndpoint ¶
func NewListEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListEndpoint returns an endpoint function that calls the method "list" of service "queue".
func NewReadEndpoint ¶
func NewReadEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewReadEndpoint returns an endpoint function that calls the method "read" of service "queue".
func NewViewedCreatequeueresponse ¶
func NewViewedCreatequeueresponse(res *Createqueueresponse, view string) *queueviews.Createqueueresponse
NewViewedCreatequeueresponse initializes viewed result type Createqueueresponse from result type Createqueueresponse using the given view.
func NewViewedMessagestatus ¶ added in v0.38.0
func NewViewedMessagestatus(res *Messagestatus, view string) *queueviews.Messagestatus
NewViewedMessagestatus initializes viewed result type Messagestatus from result type Messagestatus using the given view.
func NewViewedReadqueueresponse ¶
func NewViewedReadqueueresponse(res *Readqueueresponse, view string) *queueviews.Readqueueresponse
NewViewedReadqueueresponse initializes viewed result type Readqueueresponse from result type Readqueueresponse 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 queues description
Queues *PayloadForCreateEndpoint
// JWT used for authentication
JWT string
}
CreatePayload is the payload type of the queue service create method.
type Createqueueresponse ¶
type Createqueueresponse struct {
// queue
ID string
// Name of the created queue.
Name string
// Description of the created queue.
Description *string
// Reference to billable account
Account *string
}
Createqueueresponse is the result type of the queue service create method.
func NewCreatequeueresponse ¶
func NewCreatequeueresponse(vres *queueviews.Createqueueresponse) *Createqueueresponse
NewCreatequeueresponse initializes result type Createqueueresponse from viewed result type Createqueueresponse.
type DeletePayload ¶
type DeletePayload struct {
// ID of queues to update
ID string
// JWT used for authentication
JWT string
}
DeletePayload is the payload type of the queue service delete method.
type DequeuePayload ¶
type DequeuePayload struct {
// queue
ID string
// Maximum number of messages to dequeue
Limit *int
// JWT used for authentication
JWT string
}
DequeuePayload is the payload type of the queue service dequeue method.
type Endpoints ¶
type Endpoints struct {
Create goa.Endpoint
Read goa.Endpoint
Delete goa.Endpoint
List goa.Endpoint
Enqueue goa.Endpoint
Dequeue goa.Endpoint
}
Endpoints wraps the "queue" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "queue" service with endpoints.
type EnqueuePayload ¶
type EnqueuePayload struct {
// queue
ID string
// Content-Type header, MUST be of application/json.
ContentType *string `json:"content-type,omitempty"`
// Schema used for message
Schema *string
// Message content
Content any `json:"content,omitempty"`
// JWT used for authentication
JWT string
}
EnqueuePayload is the payload type of the queue service enqueue method.
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 queue service list method.
type MessageList ¶ added in v0.38.0
type MessageList struct {
// Messages in the queue
Messages []*Publishedmessage
// Time at which this list was valid
AtTime *string
}
MessageList is the result type of the queue service dequeue method.
type Messagestatus ¶
type Messagestatus struct {
// queue
ID *string
}
Messagestatus is the result type of the queue service enqueue method.
func NewMessagestatus ¶ added in v0.38.0
func NewMessagestatus(vres *queueviews.Messagestatus) *Messagestatus
NewMessagestatus initializes result type Messagestatus from viewed result type Messagestatus.
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 PayloadForCreateEndpoint ¶
type PayloadForCreateEndpoint struct {
// Optional Name for the queue. Cannot contain whitespace, ., *, >, path
// separators (forward or backwards slash), and non-printable characters.
Name string
// More detailed description of the queue.
Description *string
// Reference to policy used
Policy *string
}
type Publishedmessage ¶ added in v0.38.0
type QueueListItem ¶
type QueueListResult ¶
type QueueListResult struct {
// Queues
Items []*QueueListItem
// Time at which this list was valid
AtTime string
Links []*LinkT
}
QueueListResult is the result type of the queue service list method.
type ReadPayload ¶
type ReadPayload struct {
// ID of queues to show
ID string
// JWT used for authentication
JWT string
}
ReadPayload is the payload type of the queue service read method.
type Readqueueresponse ¶
type Readqueueresponse struct {
// ID
ID string
// Name of the queue.
Name string
// Description of the queue.
Description *string
// Number of messages sent to the queue
TotalMessages *uint64
// Number of bytes in the queue
Bytes *uint64
// Timestamp of the first message in the queue
FirstTime *string
// Timestamp of the last message in the queue
LastTime *string
// Number of consumers
ConsumerCount *int
// Timestamp when the queue was created
CreatedAt string
}
Readqueueresponse is the result type of the queue service read method.
func NewReadqueueresponse ¶
func NewReadqueueresponse(vres *queueviews.Readqueueresponse) *Readqueueresponse
NewReadqueueresponse initializes result type Readqueueresponse from viewed result type Readqueueresponse.
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 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 {
// Create a new queues and return its status.
Create(context.Context, *CreatePayload) (res *Createqueueresponse, err error)
// Show queues by ID
Read(context.Context, *ReadPayload) (res *Readqueueresponse, err error)
// Delete an existing queues.
Delete(context.Context, *DeletePayload) (err error)
// list queues
List(context.Context, *ListPayload) (res *QueueListResult, err error)
// Send a message to a specific queues.
Enqueue(context.Context, *EnqueuePayload) (res *Messagestatus, err error)
// Read a message from a specific queues.
Dequeue(context.Context, *DequeuePayload) (res *MessageList, err error)
}
Manage the life cycle of a queue.
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".