Documentation ¶
Index ¶
- Constants
- func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
- func HasFormData(r *http.Request) bool
- func In(c Context, inputStruct any, opts ...core.Option) error
- func ParseInput(rr RequestResponder, inputStruct any, opts ...core.Option) error
- func WantsHTML(r *http.Request) bool
- func WantsJSON(r *http.Request) bool
- type Context
- type GetSetter
- type MalformedRequest
- type RequestResponder
- type Validator
Constants ¶
View Source
const InKey = "input"
Variables ¶
This section is empty.
Functions ¶
func DecodeJSONBody ¶
func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
func HasFormData ¶
func ParseInput ¶
func ParseInput(rr RequestResponder, inputStruct any, opts ...core.Option) error
Types ¶
type Context ¶
type Context interface { RequestResponder GetSetter }
type MalformedRequest ¶
func (*MalformedRequest) Error ¶
func (mr *MalformedRequest) Error() string
type RequestResponder ¶
type RequestResponder interface { Request() *http.Request ResponseWriter() http.ResponseWriter }
Click to show internal directories.
Click to hide internal directories.