decoder

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedType = errors.New("decoder: unsupported type")
	ErrTagNotFound     = errors.New("decoder: tag not found")
)

Functions

This section is empty.

Types

type Args added in v0.1.3

type Args fasthttp.Args

func (*Args) Get added in v0.1.3

func (ps *Args) Get(key string) string

func (*Args) Values added in v0.1.3

func (ps *Args) Values(key string) []string

type CachedDecoder

type CachedDecoder[V any] struct {
	// contains filtered or unexported fields
}

func NewCached added in v0.1.3

func NewCached[V any](v V, tag string) (*CachedDecoder[V], error)

func (*CachedDecoder[V]) Decode

func (d *CachedDecoder[V]) Decode(data Getter, v *V) error

func (*CachedDecoder[V]) DecodeValue added in v0.1.3

func (d *CachedDecoder[V]) DecodeValue(data Getter, v reflect.Value) error

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func New added in v0.1.3

func New(tag string) *Decoder

func (*Decoder) Decode

func (d *Decoder) Decode(data Getter, v any) error

type Getter

type Getter interface {
	Get(string) string
	Values(string) []string
}
type Header fasthttp.RequestHeader

func (*Header) Get added in v0.1.3

func (ps *Header) Get(key string) string

func (*Header) Values added in v0.1.3

func (ps *Header) Values(key string) []string

type Map added in v0.1.3

type Map map[string][]string

func (Map) Get added in v0.1.3

func (m Map) Get(key string) string

func (Map) Values added in v0.1.3

func (m Map) Values(key string) []string

type Params added in v0.1.3

type Params httprouter.Params

func (Params) Get added in v0.1.3

func (ps Params) Get(key string) string

func (Params) Values added in v0.1.3

func (ps Params) Values(key string) []string

Jump to

Keyboard shortcuts

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