Documentation ¶
Index ¶
- func BuildRandPayload(demoRandMin string, demoRandMax string) (*demo.RandPayload, error)
- func DecodeRandResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func EncodeRandRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func NewRandInvalidArguments(body *RandInvalidArgumentsResponseBody) *goa.ServiceError
- func NewRandResultViewOK(body *RandResponseBody) *demoviews.RandResultView
- func RandDemoPath() string
- func ValidateRandInvalidArgumentsResponseBody(body *RandInvalidArgumentsResponseBody) (err error)
- type Client
- type RandInvalidArgumentsResponseBody
- type RandResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRandPayload ¶
func BuildRandPayload(demoRandMin string, demoRandMax string) (*demo.RandPayload, error)
BuildRandPayload builds the payload for the demo rand endpoint from CLI flags.
func DecodeRandResponse ¶
func DecodeRandResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeRandResponse returns a decoder for responses returned by the demo rand endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeRandResponse may return the following errors:
- "invalid_arguments" (type *goa.ServiceError): http.StatusBadRequest
- error: internal error
func EncodeRandRequest ¶
func EncodeRandRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeRandRequest returns an encoder for requests sent to the demo rand server.
func NewRandInvalidArguments ¶
func NewRandInvalidArguments(body *RandInvalidArgumentsResponseBody) *goa.ServiceError
NewRandInvalidArguments builds a demo service rand endpoint invalid_arguments error.
func NewRandResultViewOK ¶
func NewRandResultViewOK(body *RandResponseBody) *demoviews.RandResultView
NewRandResultViewOK builds a "demo" service "rand" endpoint result from a HTTP "OK" response.
func RandDemoPath ¶
func RandDemoPath() string
RandDemoPath returns the URL path to the demo service rand HTTP endpoint.
func ValidateRandInvalidArgumentsResponseBody ¶
func ValidateRandInvalidArgumentsResponseBody(body *RandInvalidArgumentsResponseBody) (err error)
ValidateRandInvalidArgumentsResponseBody runs the validations defined on rand_invalid_arguments_response_body
Types ¶
type Client ¶
type Client struct { // Rand Doer is the HTTP client used to make requests to the rand endpoint. RandDoer 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 demo 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 demo service servers.
func (*Client) BuildRandRequest ¶
BuildRandRequest instantiates a HTTP request object with method and path set to call the "demo" service "rand" endpoint
type RandInvalidArgumentsResponseBody ¶
type RandInvalidArgumentsResponseBody 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"` }
RandInvalidArgumentsResponseBody is the type of the "demo" service "rand" endpoint HTTP response body for the "invalid_arguments" error.
type RandResponseBody ¶
type RandResponseBody struct {
Result *int64 `form:"result,omitempty" json:"result,omitempty" xml:"result,omitempty"`
}
RandResponseBody is the type of the "demo" service "rand" endpoint HTTP response body.