binding

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIMEJSON              = "application/json"
	MIMEHTML              = "text/html"
	MIMEXML               = "application/xml"
	MIMEXML2              = "text/xml"
	MIMEPlain             = "text/plain"
	MIMEPOSTForm          = "application/x-www-form-urlencoded"
	MIMEMultipartPOSTForm = "multipart/form-data"
	MIMEPROTOBUF          = "application/x-protobuf"
	MIMEMSGPACK           = "application/x-msgpack"
	MIMEMSGPACK2          = "application/msgpack"
	MIMEYAML              = "application/x-yaml"
	MIMETOML              = "application/toml"
)

Content-Type MIME of the most common data formats.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindType

type BindType int
const (
	JSON BindType = iota + 1
	XML
	Form
	FormMultipart
	ProtoBuf
	MsgPack
	YAML
	TOML
)

These implement the Binding interface and can be used to bind the data present in the request to struct instances.

func GetBinding

func GetBinding(method, contentType string) BindType

Jump to

Keyboard shortcuts

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