Documentation ¶
Index ¶
- func DecodeConcatRequest(_ context.Context, r *http.Request) (interface{}, error)
- func DecodeConcatResponse(_ context.Context, resp *http.Response) (interface{}, error)
- func DecodeSumRequest(_ context.Context, r *http.Request) (interface{}, error)
- func DecodeSumResponse(_ context.Context, resp *http.Response) (interface{}, error)
- func EncodeConcatRequest(_ context.Context, r *http.Request, request interface{}) error
- func EncodeConcatResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
- func EncodeSumRequest(_ context.Context, r *http.Request, request interface{}) error
- func EncodeSumResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
- type AddService
- type ConcatRequest
- type ConcatResponse
- type SumRequest
- type SumResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeConcatRequest ¶
DecodeConcatRequest decodes the request from the provided HTTP request, simply by JSON decoding from the request body. It's designed to be used in transport/http.Server.
func DecodeConcatResponse ¶
DecodeConcatResponse decodes the response from the provided HTTP response, simply by JSON decoding from the response body. It's designed to be used in transport/http.Client.
func DecodeSumRequest ¶
DecodeSumRequest decodes the request from the provided HTTP request, simply by JSON decoding from the request body. It's designed to be used in transport/http.Server.
func DecodeSumResponse ¶
DecodeSumResponse decodes the response from the provided HTTP response, simply by JSON decoding from the response body. It's designed to be used in transport/http.Client.
func EncodeConcatRequest ¶
EncodeConcatRequest encodes the request to the provided HTTP request, simply by JSON encoding to the request body. It's designed to be used in transport/http.Client.
func EncodeConcatResponse ¶
func EncodeConcatResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
EncodeConcatResponse encodes the response to the provided HTTP response writer, simply by JSON encoding to the writer. It's designed to be used in transport/http.Server.
func EncodeSumRequest ¶
EncodeSumRequest encodes the request to the provided HTTP request, simply by JSON encoding to the request body. It's designed to be used in transport/http.Client.
func EncodeSumResponse ¶
func EncodeSumResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
EncodeSumResponse encodes the response to the provided HTTP response writer, simply by JSON encoding to the writer. It's designed to be used in transport/http.Server.
Types ¶
type AddService ¶
AddService is the abstract representation of this service.
type ConcatRequest ¶
ConcatRequest is the business domain type for a Concat method request.
type ConcatResponse ¶
type ConcatResponse struct {
V string `json:"v"`
}
ConcatResponse is the business domain type for a Concat method response.
type SumRequest ¶
SumRequest is the business domain type for a Sum method request.
type SumResponse ¶
type SumResponse struct {
V int `json:"v"`
}
SumResponse is the business domain type for a Sum method response.