Documentation ¶
Index ¶
- func DecodeJSONSchema(next kithttp.DecodeRequestFunc, schema *gojsonschema.Schema) kithttp.DecodeRequestFunc
- func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)
- func PopulateRequestContext(ctx context.Context, r *http.Request) context.Context
- func ServerFinalizer(logger log.Logger, reqObserve instrument.ObserveRequestFunc) kithttp.ServerFinalizerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSONSchema ¶
func DecodeJSONSchema( next kithttp.DecodeRequestFunc, schema *gojsonschema.Schema, ) kithttp.DecodeRequestFunc
DecodeJSONSchema validates the request payload against the given schema and returns an invalid payload error in case the validation fails.
func ErrorEncoder ¶
func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)
ErrorEncoder translates domain specific errors to HTTP status codes.
func PopulateRequestContext ¶
PopulateRequestContext extracts common information about a request and stores it in the context.
func ServerFinalizer ¶
func ServerFinalizer( logger log.Logger, reqObserve instrument.ObserveRequestFunc, ) kithttp.ServerFinalizerFunc
ServerFinalizer instruments handler calls to expose Prometheus metrics and / log request/response information.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.