Documentation
¶
Index ¶
- func BadRequest(message string) error
- func Forbidden(message string) error
- func JSON(val any) jsonValue
- func Respond(resp ToResponse, w http.ResponseWriter, r *http.Request)
- func Route[S any](s S, f func(s S, w http.ResponseWriter, r *http.Request) ToResponse) http.Handler
- func Unauthorized() error
- type HttpError
- type ToResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
func Respond ¶
func Respond(resp ToResponse, w http.ResponseWriter, r *http.Request)
func Route ¶
func Route[S any](s S, f func(s S, w http.ResponseWriter, r *http.Request) ToResponse) http.Handler
func Unauthorized ¶
func Unauthorized() error
Types ¶
type ToResponse ¶
type ToResponse any
Click to show internal directories.
Click to hide internal directories.