Versions in this module Expand all Collapse all v0 v0.3.0 Nov 15, 2016 Changes in this version + const DomainDecode + const DomainDo + const DomainEncode + const DomainNewRequest + type Client struct + func NewClient(method string, tgt *url.URL, enc EncodeRequestFunc, dec DecodeResponseFunc, ...) *Client + func (c Client) Endpoint() endpoint.Endpoint + type ClientOption func(*Client) + func BufferedStream(buffered bool) ClientOption + func ClientAfter(after ...ClientResponseFunc) ClientOption + func ClientBefore(before ...RequestFunc) ClientOption + func SetClient(client *http.Client) ClientOption + type ClientResponseFunc func(context.Context, *http.Response) context.Context + type DecodeRequestFunc func(context.Context, *http.Request) (request interface{}, err error) + type DecodeResponseFunc func(context.Context, *http.Response) (response interface{}, err error) + type EncodeRequestFunc func(context.Context, *http.Request, interface{}) error + type EncodeResponseFunc func(context.Context, http.ResponseWriter, interface{}) error + type Error struct + Domain string + Err error + func (e Error) Error() string + type ErrorEncoder func(ctx context.Context, err error, w http.ResponseWriter) + type RequestFunc func(context.Context, *http.Request) context.Context + func SetRequestHeader(key, val string) RequestFunc + type Server struct + func NewServer(ctx context.Context, e endpoint.Endpoint, dec DecodeRequestFunc, ...) *Server + func (s Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + type ServerOption func(*Server) + func ServerAfter(after ...ServerResponseFunc) ServerOption + func ServerBefore(before ...RequestFunc) ServerOption + func ServerErrorEncoder(ee ErrorEncoder) ServerOption + func ServerErrorLogger(logger log.Logger) ServerOption + type ServerResponseFunc func(context.Context, http.ResponseWriter) context.Context + func SetContentType(contentType string) ServerResponseFunc + func SetResponseHeader(key, val string) ServerResponseFunc