Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseYAML ¶ added in v0.1.0
ParseYAML can be used to parse a string from the body of a request.
func SendJSON ¶
func SendJSON(w http.ResponseWriter, data any) error
SendJSON returns a JSON response to the caller, or fails with an error.
func SendString ¶
func SendString(w http.ResponseWriter, message string) error
SendString returns a string response to the caller, or fails with an error.
Types ¶
type HTTPError ¶ added in v0.0.4
type HTTPError struct {
// contains filtered or unexported fields
}
HTTPError allows you to return custom status codes.
type Middleware ¶ added in v0.0.5
Middleware is a helper for adding middleware to wrapped handelers.
func Chain ¶ added in v0.0.5
func Chain(m ...Middleware) Middleware
Chain multiple middleware functions together into a single middleware.
Click to show internal directories.
Click to hide internal directories.