Versions in this module Expand all Collapse all v0 v0.2.0 Dec 12, 2024 v0.1.0 Dec 5, 2024 Changes in this version + var ErrJSONDecode = errors.New("fail to decode json") + func Handle(handler RequestHandler) http.HandlerFunc + func HandleWithInput[T any](handler RequestHandlerWithInput[T], opts ...func(*handleWithInput[T])) http.HandlerFunc + func JSONBodyDecode[T any](r *http.Request) (T, error) + func Redirect(url string, code int) *redirectResponder + func WithDecodeFunc[T any](decodeFunc RequestDecodeFunc[T]) func(*handleWithInput[T]) + type Logger interface + Debug func(msg string, args ...any) + Error func(msg string, args ...any) + Info func(msg string, args ...any) + Warn func(msg string, args ...any) + type RequestDecodeFunc func(r *http.Request) (T, error) + type RequestHandler func(r *http.Request) Responder + type RequestHandlerWithInput func(r *http.Request, input T) Responder + type Responder interface + Respond func(w http.ResponseWriter, r *http.Request)