Documentation ¶
Index ¶
- func BuildMultiplyPayload(calcMultiplyBody string) (*calc.MultiplyPayload, error)
- func DecodeMultiplyResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func EncodeMultiplyRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func MultiplyCalcPath() string
- func NewMultiplyresponseViewOK(body *MultiplyResponseBody) *calcviews.MultiplyresponseView
- type Client
- type MultiplyRequestBody
- type MultiplyResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMultiplyPayload ¶
func BuildMultiplyPayload(calcMultiplyBody string) (*calc.MultiplyPayload, error)
BuildMultiplyPayload builds the payload for the calc multiply endpoint from CLI flags.
func DecodeMultiplyResponse ¶
func DecodeMultiplyResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeMultiplyResponse returns a decoder for responses returned by the calc multiply endpoint. restoreBody controls whether the response body should be restored after having been read.
func EncodeMultiplyRequest ¶
func EncodeMultiplyRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
EncodeMultiplyRequest returns an encoder for requests sent to the calc multiply server.
func MultiplyCalcPath ¶
func MultiplyCalcPath() string
MultiplyCalcPath returns the URL path to the calc service multiply HTTP endpoint.
func NewMultiplyresponseViewOK ¶
func NewMultiplyresponseViewOK(body *MultiplyResponseBody) *calcviews.MultiplyresponseView
NewMultiplyresponseViewOK builds a "calc" service "multiply" endpoint result from a HTTP "OK" response.
Types ¶
type Client ¶
type Client struct { // Multiply Doer is the HTTP client used to make requests to the multiply // endpoint. MultiplyDoer 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 calc 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 calc service servers.
func (*Client) BuildMultiplyRequest ¶
BuildMultiplyRequest instantiates a HTTP request object with method and path set to call the "calc" service "multiply" endpoint
type MultiplyRequestBody ¶
type MultiplyRequestBody struct { // Left operand A int `form:"a" json:"a" xml:"a"` // Right operand B int `form:"b" json:"b" xml:"b"` }
MultiplyRequestBody is the type of the "calc" service "multiply" endpoint HTTP request body.
func NewMultiplyRequestBody ¶
func NewMultiplyRequestBody(p *calc.MultiplyPayload) *MultiplyRequestBody
NewMultiplyRequestBody builds the HTTP request body from the payload of the "multiply" endpoint of the "calc" service.
type MultiplyResponseBody ¶
type MultiplyResponseBody struct { // Result of multiplication Multiple *int `form:"multiple,omitempty" json:"multiple,omitempty" xml:"multiple,omitempty"` }
MultiplyResponseBody is the type of the "calc" service "multiply" endpoint HTTP response body.