Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandleFunc ¶
func RegisterHandleFunc(path string, handleFunc func(http.ResponseWriter, *http.Request)) *mux.Route
RegisterHandleFunc registers an additional handle function with the API endoint.
func RequestLogger ¶
RequestLogger is a logging middleware
func SetDefaultAPIListenAddress ¶
func SetDefaultAPIListenAddress(address string)
Types ¶
type DatabaseAPI ¶
type DatabaseAPI struct {
// contains filtered or unexported fields
}
DatabaseAPI is a database API instance.
type EnrichedResponseWriter ¶
type EnrichedResponseWriter struct {
http.ResponseWriter
Status int
}
EnrichedResponseWriter is a wrapper for http.ResponseWriter for better information extraction.
func NewEnrichedResponseWriter ¶
func NewEnrichedResponseWriter(w http.ResponseWriter) *EnrichedResponseWriter
NewEnrichedResponseWriter wraps a http.ResponseWriter.
func (*EnrichedResponseWriter) WriteHeader ¶
func (ew *EnrichedResponseWriter) WriteHeader(code int)
WriteHeader wraps the original WriteHeader method to extract information.