Documentation
¶
Index ¶
- func CopyURL(base *url.URL, appendPath string) *url.URL
- func DecodeJSONRequest(r *http.Request, into interface{}) error
- func DecodeJSONResponse(r *http.Response, into interface{}) error
- func EncodeEmptyRequest(c context.Context, r *http.Request, request interface{}) error
- func EncodeJSONResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
- func EncodeRequestWithToken(token string, next httptransport.EncodeRequestFunc) httptransport.EncodeRequestFunc
- func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)
- func JSONErrorDecoder(r *http.Response) error
- func NewRouter(logger log.Logger) (*mux.Router, []httptransport.ServerOption)
- func RequireBasicAuth(h http.HandlerFunc, username, password, realm string) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSONRequest ¶
func DecodeJSONResponse ¶
func EncodeEmptyRequest ¶
func EncodeJSONResponse ¶
func EncodeJSONResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
func EncodeRequestWithToken ¶
func EncodeRequestWithToken(token string, next httptransport.EncodeRequestFunc) httptransport.EncodeRequestFunc
func ErrorEncoder ¶
func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)
func JSONErrorDecoder ¶
func NewRouter ¶
func NewRouter(logger log.Logger) (*mux.Router, []httptransport.ServerOption)
func RequireBasicAuth ¶
func RequireBasicAuth(h http.HandlerFunc, username, password, realm string) http.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.