Versions in this module Expand all Collapse all v0 v0.1.0 May 27, 2022 Changes in this version + var EmptyData any + func Handle(f HandlerFunc) http.HandlerFunc + func ListenGracefully(srv *http.Server, opts ...ShutdownOpt) error + type HandlerFunc func(r *http.Request) Response + type Response struct + Data any + Headers map[string]string + StatusCode int + func BadRequest(data any) Response + func Created(location string) Response + func DecodeBody(r *http.Request, v any) (bool, *Response) + func InternalServerError(data any) Response + func Ok(data any) Response + type ShutdownConfig struct + Timeout time.Duration + type ShutdownOpt func(c *ShutdownConfig) + func SetTimeout(t time.Duration) ShutdownOpt