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 ¶
Click to show internal directories.
Click to hide internal directories.