Documentation ¶
Index ¶
- Constants
- Variables
- func MakeNotAvailable(err error) *goa.ServiceError
- func MakeNotValid(err error) *goa.ServiceError
- func NewStatusEndpoint(s Service) goa.Endpoint
- func NewSubmitEndpoint(s Service) goa.Endpoint
- type BatchResult
- type BatchStatusResult
- type Client
- type Endpoints
- type Service
- type SubmitPayload
Constants ¶
const ServiceName = "batch"
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 = [2]string{"submit", "status"}
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 MakeNotAvailable ¶
func MakeNotAvailable(err error) *goa.ServiceError
MakeNotAvailable builds a goa.ServiceError from an error.
func MakeNotValid ¶
func MakeNotValid(err error) *goa.ServiceError
MakeNotValid builds a goa.ServiceError from an error.
func NewStatusEndpoint ¶
NewStatusEndpoint returns an endpoint function that calls the method "status" of service "batch".
func NewSubmitEndpoint ¶
NewSubmitEndpoint returns an endpoint function that calls the method "submit" of service "batch".
Types ¶
type BatchResult ¶
BatchResult is the result type of the batch service submit method.
type BatchStatusResult ¶
BatchStatusResult is the result type of the batch service status method.
type Client ¶
Client is the "batch" service client.
func (*Client) Status ¶
func (c *Client) Status(ctx context.Context) (res *BatchStatusResult, err error)
Status calls the "status" endpoint of the "batch" service.
func (*Client) Submit ¶
func (c *Client) Submit(ctx context.Context, p *SubmitPayload) (res *BatchResult, err error)
Submit calls the "submit" endpoint of the "batch" service. Submit may return the following errors:
- "not_available" (type *goa.ServiceError)
- "not_valid" (type *goa.ServiceError)
- error: internal error
type Endpoints ¶
Endpoints wraps the "batch" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "batch" service with endpoints.
type Service ¶
type Service interface { // Submit a new batch Submit(context.Context, *SubmitPayload) (res *BatchResult, err error) // Retrieve status of current batch operation. Status(context.Context) (res *BatchStatusResult, err error) }
The batch service manages batches of collections.
type SubmitPayload ¶
SubmitPayload is the payload type of the batch service submit method.