Documentation
¶
Index ¶
- func AddSpinBrokerPath(id string) string
- func BuildAddPayload(spinBrokerAddBody string, spinBrokerAddID string) (*spinbroker.AddPayload, error)
- func BuildCompletePayload(spinBrokerCompleteBody string) (*spinbroker.CompletePayload, error)
- func BuildEnqueuePayload(spinBrokerEnqueueID string) (*spinbroker.EnqueuePayload, error)
- func BuildNextPayload(spinBrokerNextResource string) (*spinbroker.NextPayload, error)
- func BuildStatusPayload(spinBrokerStatusID string) (*spinbroker.StatusPayload, error)
- func CompleteSpinBrokerPath() string
- func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeCompleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeEnqueueResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeNewResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeNextResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeStatusResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func EncodeAddRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func EncodeCompleteRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func EnqueueSpinBrokerPath(id string) string
- func NewNextRecordNotFound(body *NextRecordNotFoundResponseBody) *goa.ServiceError
- func NewNextResultOK(body *NextResponseBody) *spinbroker.NextResult
- func NewSpinBrokerPath() string
- func NewStatusRecordNotFound(body *StatusRecordNotFoundResponseBody) *goa.ServiceError
- func NewStatusResultOK(body *StatusResponseBody) *spinbroker.StatusResult
- func NextSpinBrokerPath(resource string) string
- func StatusSpinBrokerPath(id string) string
- func ValidateNextRecordNotFoundResponseBody(body *NextRecordNotFoundResponseBody) (err error)
- func ValidateNextResponseBody(body *NextResponseBody) (err error)
- func ValidateStatusRecordNotFoundResponseBody(body *StatusRecordNotFoundResponseBody) (err error)
- func ValidateStatusResponseBody(body *StatusResponseBody) (err error)
- type AddRequestBody
- type Client
- func (c *Client) Add() goa.Endpoint
- func (c *Client) BuildAddRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildCompleteRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildEnqueueRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildNewRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildNextRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildStatusRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) Complete() goa.Endpoint
- func (c *Client) Enqueue() goa.Endpoint
- func (c *Client) New() goa.Endpoint
- func (c *Client) Next() goa.Endpoint
- func (c *Client) Status() goa.Endpoint
- type CompleteRequestBody
- type NextRecordNotFoundResponseBody
- type NextResponseBody
- type StatusRecordNotFoundResponseBody
- type StatusResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSpinBrokerPath ¶
AddSpinBrokerPath returns the URL path to the spin-broker service add HTTP endpoint.
func BuildAddPayload ¶
func BuildAddPayload(spinBrokerAddBody string, spinBrokerAddID string) (*spinbroker.AddPayload, error)
BuildAddPayload builds the payload for the spin-broker add endpoint from CLI flags.
func BuildCompletePayload ¶
func BuildCompletePayload(spinBrokerCompleteBody string) (*spinbroker.CompletePayload, error)
BuildCompletePayload builds the payload for the spin-broker complete endpoint from CLI flags.
func BuildEnqueuePayload ¶
func BuildEnqueuePayload(spinBrokerEnqueueID string) (*spinbroker.EnqueuePayload, error)
BuildEnqueuePayload builds the payload for the spin-broker enqueue endpoint from CLI flags.
func BuildNextPayload ¶
func BuildNextPayload(spinBrokerNextResource string) (*spinbroker.NextPayload, error)
BuildNextPayload builds the payload for the spin-broker next endpoint from CLI flags.
func BuildStatusPayload ¶
func BuildStatusPayload(spinBrokerStatusID string) (*spinbroker.StatusPayload, error)
BuildStatusPayload builds the payload for the spin-broker status endpoint from CLI flags.
func CompleteSpinBrokerPath ¶
func CompleteSpinBrokerPath() string
CompleteSpinBrokerPath returns the URL path to the spin-broker service complete HTTP endpoint.
func DecodeAddResponse ¶
func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeAddResponse returns a decoder for responses returned by the spin-broker add endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeCompleteResponse ¶
func DecodeCompleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeCompleteResponse returns a decoder for responses returned by the spin-broker complete endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeEnqueueResponse ¶
func DecodeEnqueueResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeEnqueueResponse returns a decoder for responses returned by the spin-broker enqueue endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeNewResponse ¶
func DecodeNewResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeNewResponse returns a decoder for responses returned by the spin-broker new endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeNextResponse ¶
func DecodeNextResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeNextResponse returns a decoder for responses returned by the spin-broker next endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeNextResponse may return the following errors:
- "record_not_found" (type *goa.ServiceError): http.StatusBadRequest
- error: internal error
func DecodeStatusResponse ¶
func DecodeStatusResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeStatusResponse returns a decoder for responses returned by the spin-broker status endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeStatusResponse may return the following errors:
- "record_not_found" (type *goa.ServiceError): http.StatusBadRequest
- error: internal error
func EncodeAddRequest ¶
func EncodeAddRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeAddRequest returns an encoder for requests sent to the spin-broker add server.
func EncodeCompleteRequest ¶
func EncodeCompleteRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeCompleteRequest returns an encoder for requests sent to the spin-broker complete server.
func EnqueueSpinBrokerPath ¶
EnqueueSpinBrokerPath returns the URL path to the spin-broker service enqueue HTTP endpoint.
func NewNextRecordNotFound ¶
func NewNextRecordNotFound(body *NextRecordNotFoundResponseBody) *goa.ServiceError
NewNextRecordNotFound builds a spin-broker service next endpoint record_not_found error.
func NewNextResultOK ¶
func NewNextResultOK(body *NextResponseBody) *spinbroker.NextResult
NewNextResultOK builds a "spin-broker" service "next" endpoint result from a HTTP "OK" response.
func NewSpinBrokerPath ¶
func NewSpinBrokerPath() string
NewSpinBrokerPath returns the URL path to the spin-broker service new HTTP endpoint.
func NewStatusRecordNotFound ¶
func NewStatusRecordNotFound(body *StatusRecordNotFoundResponseBody) *goa.ServiceError
NewStatusRecordNotFound builds a spin-broker service status endpoint record_not_found error.
func NewStatusResultOK ¶
func NewStatusResultOK(body *StatusResponseBody) *spinbroker.StatusResult
NewStatusResultOK builds a "spin-broker" service "status" endpoint result from a HTTP "OK" response.
func NextSpinBrokerPath ¶
NextSpinBrokerPath returns the URL path to the spin-broker service next HTTP endpoint.
func StatusSpinBrokerPath ¶
StatusSpinBrokerPath returns the URL path to the spin-broker service status HTTP endpoint.
func ValidateNextRecordNotFoundResponseBody ¶
func ValidateNextRecordNotFoundResponseBody(body *NextRecordNotFoundResponseBody) (err error)
ValidateNextRecordNotFoundResponseBody runs the validations defined on next_record_not_found_response_body
func ValidateNextResponseBody ¶
func ValidateNextResponseBody(body *NextResponseBody) (err error)
ValidateNextResponseBody runs the validations defined on NextResponseBody
func ValidateStatusRecordNotFoundResponseBody ¶
func ValidateStatusRecordNotFoundResponseBody(body *StatusRecordNotFoundResponseBody) (err error)
ValidateStatusRecordNotFoundResponseBody runs the validations defined on status_record_not_found_response_body
func ValidateStatusResponseBody ¶
func ValidateStatusResponseBody(body *StatusResponseBody) (err error)
ValidateStatusResponseBody runs the validations defined on StatusResponseBody
Types ¶
type AddRequestBody ¶
type AddRequestBody struct {
// Resource name
Resource string `form:"resource" json:"resource" xml:"resource"`
// Action name
Action string `form:"action" json:"action" xml:"action"`
// Action parameters
Parameters map[string]interface{} `form:"parameters,omitempty" json:"parameters,omitempty" xml:"parameters,omitempty"`
// Dependency UUIDs
Dependencies []string `form:"dependencies,omitempty" json:"dependencies,omitempty" xml:"dependencies,omitempty"`
}
AddRequestBody is the type of the "spin-broker" service "add" endpoint HTTP request body.
func NewAddRequestBody ¶
func NewAddRequestBody(p *spinbroker.AddPayload) *AddRequestBody
NewAddRequestBody builds the HTTP request body from the payload of the "add" endpoint of the "spin-broker" service.
type Client ¶
type Client struct {
// New Doer is the HTTP client used to make requests to the new endpoint.
NewDoer goahttp.Doer
// Add Doer is the HTTP client used to make requests to the add endpoint.
AddDoer goahttp.Doer
// Enqueue Doer is the HTTP client used to make requests to the enqueue
// endpoint.
EnqueueDoer goahttp.Doer
// Status Doer is the HTTP client used to make requests to the status endpoint.
StatusDoer goahttp.Doer
// Next Doer is the HTTP client used to make requests to the next endpoint.
NextDoer goahttp.Doer
// Complete Doer is the HTTP client used to make requests to the complete
// endpoint.
CompleteDoer goahttp.Doer
// RestoreResponseBody controls whether the response bodies are reset after
// decoding so they can be read again.
RestoreResponseBody bool
// contains filtered or unexported fields
}
Client lists the spin-broker service endpoint HTTP clients.
func NewClient ¶
func NewClient( scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, ) *Client
NewClient instantiates HTTP clients for all the spin-broker service servers.
func (*Client) Add ¶
Add returns an endpoint that makes HTTP requests to the spin-broker service add server.
func (*Client) BuildAddRequest ¶
BuildAddRequest instantiates a HTTP request object with method and path set to call the "spin-broker" service "add" endpoint
func (*Client) BuildCompleteRequest ¶
BuildCompleteRequest instantiates a HTTP request object with method and path set to call the "spin-broker" service "complete" endpoint
func (*Client) BuildEnqueueRequest ¶
BuildEnqueueRequest instantiates a HTTP request object with method and path set to call the "spin-broker" service "enqueue" endpoint
func (*Client) BuildNewRequest ¶
BuildNewRequest instantiates a HTTP request object with method and path set to call the "spin-broker" service "new" endpoint
func (*Client) BuildNextRequest ¶
BuildNextRequest instantiates a HTTP request object with method and path set to call the "spin-broker" service "next" endpoint
func (*Client) BuildStatusRequest ¶
BuildStatusRequest instantiates a HTTP request object with method and path set to call the "spin-broker" service "status" endpoint
func (*Client) Complete ¶
Complete returns an endpoint that makes HTTP requests to the spin-broker service complete server.
func (*Client) Enqueue ¶
Enqueue returns an endpoint that makes HTTP requests to the spin-broker service enqueue server.
func (*Client) New ¶
New returns an endpoint that makes HTTP requests to the spin-broker service new server.
type CompleteRequestBody ¶
type CompleteRequestBody struct {
// Command ID
ID string `form:"id" json:"id" xml:"id"`
// status of work
Status bool `form:"status" json:"status" xml:"status"`
// reason of success/failure
StatusReason *string `form:"status_reason,omitempty" json:"status_reason,omitempty" xml:"status_reason,omitempty"`
}
CompleteRequestBody is the type of the "spin-broker" service "complete" endpoint HTTP request body.
func NewCompleteRequestBody ¶
func NewCompleteRequestBody(p *spinbroker.CompletePayload) *CompleteRequestBody
NewCompleteRequestBody builds the HTTP request body from the payload of the "complete" endpoint of the "spin-broker" service.
type NextRecordNotFoundResponseBody ¶
type NextRecordNotFoundResponseBody struct {
// Name is the name of this class of errors.
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// ID is a unique identifier for this particular occurrence of the problem.
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// Message is a human-readable explanation specific to this occurrence of the
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
// Is the error temporary?
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
// Is the error a timeout?
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
// Is the error a server-side fault?
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
NextRecordNotFoundResponseBody is the type of the "spin-broker" service "next" endpoint HTTP response body for the "record_not_found" error.
type NextResponseBody ¶
type NextResponseBody struct {
// Command ID
UUID *string `form:"uuid,omitempty" json:"uuid,omitempty" xml:"uuid,omitempty"`
// resource type
Resource *string `form:"resource,omitempty" json:"resource,omitempty" xml:"resource,omitempty"`
// action name
Action *string `form:"action,omitempty" json:"action,omitempty" xml:"action,omitempty"`
// Action parameters
Parameters map[string]json.RawMessage `form:"parameters,omitempty" json:"parameters,omitempty" xml:"parameters,omitempty"`
}
NextResponseBody is the type of the "spin-broker" service "next" endpoint HTTP response body.
type StatusRecordNotFoundResponseBody ¶
type StatusRecordNotFoundResponseBody struct {
// Name is the name of this class of errors.
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// ID is a unique identifier for this particular occurrence of the problem.
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// Message is a human-readable explanation specific to this occurrence of the
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
// Is the error temporary?
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
// Is the error a timeout?
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
// Is the error a server-side fault?
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
StatusRecordNotFoundResponseBody is the type of the "spin-broker" service "status" endpoint HTTP response body for the "record_not_found" error.
type StatusResponseBody ¶
type StatusResponseBody struct {
// Pass/Fail status
Status *bool `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
// Failure reason (if any)
Reason *string `form:"reason,omitempty" json:"reason,omitempty" xml:"reason,omitempty"`
// Failure causer as UUID (if any)
Causer *string `form:"causer,omitempty" json:"causer,omitempty" xml:"causer,omitempty"`
}
StatusResponseBody is the type of the "spin-broker" service "status" endpoint HTTP response body.