structure

package
v0.0.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetByKV

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

func SetByKV2

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

Types

type Args

type Args []PeekV

func (Args) Peek

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

func (Args) TrySet

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

type Args2

type Args2 []PeekVs

func (Args2) Peek

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

func (Args2) TrySet

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

type KVSource

type KVSource map[string]string

func (KVSource) Peek

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

func (KVSource) TrySet

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

type KVsSource map[string][]string

func (KVsSource) Peek

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

func (KVsSource) TrySet

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

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

type PeekVs

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

type Setter

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

Directories

Path Synopsis
cache
lru
Package consistenthash provides an implementation of a ring hash.
Package consistenthash provides an implementation of a ring hash.
idgen
id
uuid
Package uuid provides implementation of Universally Unique Identifier (UUID).
Package uuid provides implementation of Universally Unique Identifier (UUID).
Package ratelimit provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things.
Package ratelimit provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things.
tree

Jump to

Keyboard shortcuts

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