Documentation ¶
Index ¶
- Variables
- func DecodeRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeResponse(ctx context.Context, resp *http.Response) (response interface{}, err error)
- func EncodeRequest(ctx context.Context, req *http.Request, request interface{}) error
- func EncodeResponse(_ context.Context, rw http.ResponseWriter, res interface{}) error
- func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)
- func MakeClientResponseDumper(opt *DumperOptions) httptransport.ClientResponseFunc
- func MakeRequestDumper(opt *DumperOptions) httptransport.RequestFunc
- func NewClientFactory(conf *ClientFactoryConf) sd.Factory
- func ServicePrefix(c srpc.ServiceCoordinate) string
- type ClientFactoryConf
- type DumperOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPrefix = "/api/service"
Functions ¶
func DecodeResponse ¶
func EncodeRequest ¶
func EncodeResponse ¶
func EncodeResponse(_ context.Context, rw http.ResponseWriter, res interface{}) error
func ErrorEncoder ¶
func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)
func MakeClientResponseDumper ¶
func MakeClientResponseDumper(opt *DumperOptions) httptransport.ClientResponseFunc
func MakeRequestDumper ¶
func MakeRequestDumper(opt *DumperOptions) httptransport.RequestFunc
func NewClientFactory ¶
func NewClientFactory(conf *ClientFactoryConf) sd.Factory
func ServicePrefix ¶
func ServicePrefix(c srpc.ServiceCoordinate) string
Types ¶
type ClientFactoryConf ¶
type ClientFactoryConf struct { Prefix string Options []httptransport.ClientOption }
Click to show internal directories.
Click to hide internal directories.