Documentation
¶
Index ¶
- func RegisterDecoder[T DecoderConstraint](dec T, mime string, aliases ...string)
- func RegisterEncoder[T EncoderConstraint](enc T, mime string, aliases ...string)
- type ContextMarshaler
- type ContextUnmarshaler
- type DecoderConstraint
- type EncoderConstraint
- type Marshaler
- type RequestParser
- type ResponseEncoder
- type Unmarshaler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDecoder ¶
func RegisterDecoder[T DecoderConstraint](dec T, mime string, aliases ...string)
RegisterDecoder registers a request decoder for a given media type.
func RegisterEncoder ¶
func RegisterEncoder[T EncoderConstraint](enc T, mime string, aliases ...string)
RegisterEncoder registers a response encoder on a given media type.
Types ¶
type ContextUnmarshaler ¶
type DecoderConstraint ¶
type DecoderConstraint interface { Unmarshaler | ContextUnmarshaler | RequestParser }
type EncoderConstraint ¶
type EncoderConstraint interface { Marshaler | ContextMarshaler | ResponseEncoder }
type RequestParser ¶
type RequestParser = func(ctx *fasthttp.RequestCtx, v any) error
func GetDecoder ¶
func GetDecoder(mime string) RequestParser
GetDecoder returns the request decoder for a given media type.
type ResponseEncoder ¶
type ResponseEncoder = func(ctx *fasthttp.RequestCtx, v any) error
func GetEncoder ¶
func GetEncoder(mime string) ResponseEncoder
GetEncoder returns the response encoder for a given media type.
type Unmarshaler ¶
Directories
¶
Path | Synopsis |
---|---|
Package form provides decoding of form data.
|
Package form provides decoding of form data. |
Package json provides encoding and decoding of JSON data.
|
Package json provides encoding and decoding of JSON data. |
Package msgpack provides encoding and decoding of MessagePack data.
|
Package msgpack provides encoding and decoding of MessagePack data. |
Package protobuf provides encoding and decoding of Protocol Buffers data.
|
Package protobuf provides encoding and decoding of Protocol Buffers data. |
Package text provides encoding and decoding of plain text data.
|
Package text provides encoding and decoding of plain text data. |
Package toml provides encoding and decoding of TOML data.
|
Package toml provides encoding and decoding of TOML data. |
Package xml provides encoding and decoding of XML data.
|
Package xml provides encoding and decoding of XML data. |
Package yaml provides encoding and decoding of YAML data.
|
Package yaml provides encoding and decoding of YAML data. |
Click to show internal directories.
Click to hide internal directories.