Documentation ¶
Index ¶
Constants ¶
View Source
const TransactionIDKey = "TransactionID"
TransactionIDKey can be used to grab the unique ID from request context
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
H func(w http.ResponseWriter, r *http.Request) error
}
Handler struct allows for functions to return errors and still implement the the http.Handler interface
type HandlerFunc ¶
type HandlerFunc func(w http.ResponseWriter, r *http.Request) error
func (HandlerFunc) ServeHTTP ¶
func (h HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type StatusError ¶
StatusError is handy for when you want to return something other than 500 internal server error
func (*StatusError) Error ¶
func (e *StatusError) Error() string
func (*StatusError) Status ¶
func (e *StatusError) Status() int
Status returns the http response code
Click to show internal directories.
Click to hide internal directories.