Documentation ¶
Overview ¶
kfgokit package contains some utilities for working with https://github.com/go-kit/kit
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeResponse ¶
func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
EncodeResponse endodes responses. This is a generic json encoder. It takes arbitrary go structurs and encodes them as json.
func ErrorEncoder ¶
func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)
ErrorEncoder is a custom error used to encode errors into the http response. If the error is of type httpError then is used to obtain the statuscode. TODO(jlewi): Should we follow the model
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.