encoding

package
v1.15.10 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetByKV added in v1.5.11

func SetByKV(value reflect.Value, field reflect.StructField, kv PeekV, tagValue string) (isSet bool, err error)

func SetByKV2 added in v1.5.11

func SetByKV2(value reflect.Value, field reflect.StructField, kv PeekVs, tagValue string) (isSet bool, err error)

Types

type Args added in v1.5.11

type Args []PeekV

func (Args) Peek added in v1.5.11

func (args Args) Peek(key string) (v string, ok bool)

func (Args) TrySet added in v1.5.11

func (args Args) TrySet(value reflect.Value, field reflect.StructField, key string) (isSet bool, err error)

type Args2 added in v1.5.11

type Args2 []PeekVs

func (Args2) Peek added in v1.5.11

func (args Args2) Peek(key string) (v []string, ok bool)

func (Args2) TrySet added in v1.5.11

func (args Args2) TrySet(value reflect.Value, field reflect.StructField, key string) (isSet bool, err error)

type Format

type Format string
const (
	Json     Format = "json"
	Yaml     Format = "yaml"
	Toml     Format = "toml"
	Yml      Format = "yml"
	Protobuf Format = "protobuf"
	Xml      Format = "xml"
	Text     Format = "text"
)

type KVSource added in v1.5.11

type KVSource map[string]string

func (KVSource) Peek added in v1.5.11

func (form KVSource) Peek(key string) ([]string, bool)

func (KVSource) TrySet added in v1.5.11

func (form KVSource) TrySet(value reflect.Value, field reflect.StructField, tagValue string) (isSet bool, err error)

TrySet tries to set a value by request's form source (like map[string][]string)

type KVsSource added in v1.5.11

type KVsSource map[string][]string

func (KVsSource) Peek added in v1.5.11

func (form KVsSource) Peek(key string) ([]string, bool)

func (KVsSource) TrySet added in v1.5.11

func (form KVsSource) TrySet(value reflect.Value, field reflect.StructField, tagValue string) (isSet bool, err error)

TrySet tries to set a value by request's form source (like map[string][]string)

type PeekV added in v1.5.11

type PeekV interface {
	Peek(key string) (string, bool)
}

type PeekVs added in v1.5.11

type PeekVs interface {
	Peek(key string) ([]string, bool)
}

type Setter added in v1.5.11

type Setter interface {
	TrySet(value reflect.Value, field reflect.StructField, key string) (isSet bool, err error)
}

Directories

Path Synopsis
Partial reference https://github.com/grafov/m3u8/blob/master/reader.go
Partial reference https://github.com/grafov/m3u8/blob/master/reader.go
protobuf
any

Jump to

Keyboard shortcuts

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