Documentation ¶
Index ¶
- func DecodeConcatRequest(_ context.Context, r *http.Request) (interface{}, error)
- func DecodeConcatResponse(_ context.Context, r *http.Response) (interface{}, error)
- func DecodeSumRequest(_ context.Context, r *http.Request) (interface{}, error)
- func DecodeSumResponse(_ context.Context, r *http.Response) (interface{}, error)
- func EncodeGenericRequest(_ context.Context, r *http.Request, request interface{}) error
- func EncodeGenericResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
- func NewHandler(ctx context.Context, endpoints endpoints.Endpoints, logger log.Logger, ...) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeConcatRequest ¶
DecodeConcatRequest is a transport/http.DecodeRequestFunc that decodes a JSON-encoded concat request from the HTTP request body. Primarily useful in a server.
func DecodeConcatResponse ¶
DecodeConcatResponse is a transport/http.DecodeResponseFunc that decodes a JSON-encoded concat response from the HTTP response body. If the response has a non-200 status code, we will interpret that as an error and attempt to decode the specific error message from the response body. Primarily useful in a client.
func DecodeSumRequest ¶
DecodeSumRequest is a transport/http.DecodeRequestFunc that decodes a JSON-encoded sum request from the HTTP request body. Primarily useful in a server.
func DecodeSumResponse ¶
DecodeSumResponse is a transport/http.DecodeResponseFunc that decodes a JSON-encoded sum response from the HTTP response body. If the response has a non-200 status code, we will interpret that as an error and attempt to decode the specific error message from the response body. Primarily useful in a client.
func EncodeGenericRequest ¶
EncodeGenericRequest is a transport/http.EncodeRequestFunc that JSON-encodes any request to the request body. Primarily useful in a client.
func EncodeGenericResponse ¶
func EncodeGenericResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
EncodeGenericResponse is a transport/http.EncodeResponseFunc that encodes the response as JSON to the response writer. Primarily useful in a server.
Types ¶
This section is empty.