Documentation ¶
Index ¶
- func Blob[T ~[]byte | ~string](body T, contentType string, status int) http.HandlerFunc
- func JSON(value any, status int) http.HandlerFunc
- func Redirect(to string, permanent ...bool) http.HandlerFunc
- func Serve(ctx context.Context, options ServeOption) (port uint16, err error)
- func UseBasicAuth(r Router, username, password string)
- type Router
- type ServeOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UseBasicAuth ¶
UseBasicAuth implements a simple middleware handler for adding basic http auth to a route.
Types ¶
Click to show internal directories.
Click to hide internal directories.