request

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Validate = func(obj interface{}) error { return nil }

	JsonEnableDecoderUseNumber             = false
	JsonEnableDecoderDisallowUnknownFields = false
)
View Source
var (
	ErrUnknownType            = errors.New("unknown type")
	ErrMapSlicesToStringsType = errors.New("cannot convert to map slices of strings")
	ErrMapToStringsType       = errors.New("cannot convert to map of strings")
)

Functions

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes converts string to byte slice without a memory allocation.

Types

type FormBind

type FormBind struct {
}

func (FormBind) Bind

func (FormBind) Bind(req *http.Request, obj interface{}) error

type FormMultipartBind

type FormMultipartBind struct{}

func (FormMultipartBind) Bind

func (FormMultipartBind) Bind(req *http.Request, obj interface{}) error

func (FormMultipartBind) Name

func (FormMultipartBind) Name() string

type HeaderBind

type HeaderBind struct{}

func (HeaderBind) Bind

func (HeaderBind) Bind(req *http.Request, obj interface{}) error

type JsonBind

type JsonBind struct{}

func (JsonBind) Bind

func (JsonBind) Bind(req *http.Request, obj interface{}) error

type QueryBind

type QueryBind struct {
}

func (QueryBind) Bind

func (QueryBind) Bind(req *http.Request, obj interface{}) error

type SliceUnmarshaler added in v1.0.1

type SliceUnmarshaler interface {
	UnmarshalForm(v []string) error
}

type Unmarshaler

type Unmarshaler interface {
	UnmarshalForm(v string) error
}

Jump to

Keyboard shortcuts

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