Documentation ¶
Index ¶
- func AddCalcPath(left int, right int) string
- func BuildAddPayload(calcAddLeft string, calcAddRight string) (*calc.AddPayload, error)
- func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- type AddClientStream
- type AddStreamingBody
- type Client
- type ConnConfigurer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCalcPath ¶
AddCalcPath returns the URL path to the calc service add HTTP endpoint.
func BuildAddPayload ¶
func BuildAddPayload(calcAddLeft string, calcAddRight string) (*calc.AddPayload, error)
BuildAddPayload builds the payload for the calc add endpoint from CLI flags.
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 calc add endpoint. restoreBody controls whether the response body should be restored after having been read.
Types ¶
type AddClientStream ¶ added in v3.4.0
type AddClientStream struct {
// contains filtered or unexported fields
}
AddClientStream implements the calc.AddClientStream interface.
func (*AddClientStream) Close ¶ added in v3.4.0
func (s *AddClientStream) Close() error
Close closes the "add" endpoint websocket connection.
func (*AddClientStream) Recv ¶ added in v3.4.0
func (s *AddClientStream) Recv() (int, error)
Recv reads instances of "int" from the "add" endpoint websocket connection.
func (*AddClientStream) Send ¶ added in v3.4.0
func (s *AddClientStream) Send(v *calc.AddStreamingPayload) error
Send streams instances of "calc.AddStreamingPayload" to the "add" endpoint websocket connection.
type AddStreamingBody ¶ added in v3.4.0
type AddStreamingBody struct { // Left operand A int `form:"a" json:"a" xml:"a"` // Right operand B int `form:"b" json:"b" xml:"b"` }
AddStreamingBody is the type of the "calc" service "add" endpoint HTTP request body.
func NewAddStreamingBody ¶ added in v3.4.0
func NewAddStreamingBody(p *calc.AddStreamingPayload) *AddStreamingBody
NewAddStreamingBody builds the HTTP request body from the payload of the "add" endpoint of the "calc" service.
type Client ¶
type Client struct { // Add Doer is the HTTP client used to make requests to the add endpoint. AddDoer 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, dialer goahttp.Dialer, cfn *ConnConfigurer, ) *Client
NewClient instantiates HTTP clients for all the calc service servers.
type ConnConfigurer ¶ added in v3.4.0
type ConnConfigurer struct {
AddFn goahttp.ConnConfigureFunc
}
ConnConfigurer holds the websocket connection configurer functions for the streaming endpoints in "calc" service.
func NewConnConfigurer ¶ added in v3.4.0
func NewConnConfigurer(fn goahttp.ConnConfigureFunc) *ConnConfigurer
NewConnConfigurer initializes the websocket connection configurer function with fn for all the streaming endpoints in "calc" service.