Documentation ¶
Index ¶
- func AddLogging(next http.HandlerFunc) http.HandlerFunc
- func GetParams(optionalGet params.R, requiredGet params.R) func(next http.HandlerFunc) http.HandlerFunc
- func ParseModel(postModel interface{}, getModel interface{}, deleteModel interface{}) func(next http.HandlerFunc) http.HandlerFunc
- func PreProcess(preProcess func(ctx context.Context) error) func(next http.HandlerFunc) http.HandlerFunc
- func SetCors(disable bool) func(next http.HandlerFunc) http.HandlerFunc
- func SetJSONResponse(next http.HandlerFunc) http.HandlerFunc
- func WithContext(key string, value interface{}) func(next http.HandlerFunc) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddLogging ¶
func AddLogging(next http.HandlerFunc) http.HandlerFunc
Logging log time, method and path of an HTTP-Request
func GetParams ¶
func GetParams(optionalGet params.R, requiredGet params.R) func(next http.HandlerFunc) http.HandlerFunc
func ParseModel ¶
func ParseModel(postModel interface{}, getModel interface{}, deleteModel interface{}) func(next http.HandlerFunc) http.HandlerFunc
ParseModel parses and adds a model from a requestbody if wanted
func PreProcess ¶
func PreProcess(preProcess func(ctx context.Context) error) func(next http.HandlerFunc) http.HandlerFunc
func SetCors ¶
func SetCors(disable bool) func(next http.HandlerFunc) http.HandlerFunc
SetCors set response headers
func SetJSONResponse ¶
func SetJSONResponse(next http.HandlerFunc) http.HandlerFunc
SetJSONResponse set response headers
func WithContext ¶
func WithContext(key string, value interface{}) func(next http.HandlerFunc) http.HandlerFunc
WithContext attaches any object to the context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.