form

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(r *http.Request, dst interface{}) error

Decode decodes the request body into dst, which must be a pointer of a struct. If there is no body or the body is empty, it will take the query string as the body. If the Content-Type is multipart/form-data.

func RegisterCustomTypeFunc

func RegisterCustomTypeFunc(fn form.DecodeCustomTypeFunc, kind interface{})

RegisterCustomTypeFunc registers a custom type decoder func for a type. This is useful when you want to use a custom type or a type from an external package like uuid.UUID and want to decode it from a string.

func Validate added in v1.4.0

func Validate(req *http.Request, rules validator) validate.Errors

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL