Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Adapt ¶
func Adapt(h http.HandlerFunc, adapters ...Adapter) http.HandlerFunc
Adapt Iterate over adapters and run them one by one
func ResponseWithCustomCode ¶
func ResponseWithCustomCode(w http.ResponseWriter, code int, payload interface{})
ResponseWithJson returns formed JSON
func ResponseWithJson ¶
func ResponseWithJson(w http.ResponseWriter, payload interface{})
ResponseWithJson returns formed JSON
Types ¶
type Adapter ¶
type Adapter func(http.HandlerFunc) http.HandlerFunc
func LogRequestDetails ¶
func LogRequestDetails() Adapter
func SetCorsHeaders ¶
func SetCorsHeaders() Adapter
func ValidateRestMethod ¶
ValidateRestMethod middleware to validate proper methods
Click to show internal directories.
Click to hide internal directories.