Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrKvViewValueIsNotAString = errors.New("value is not a string") ErrKvViewEntryNotFound = errors.New("entry not found") )
Functions ¶
This section is empty.
Types ¶
type FasthttpArgsKeysValuesCollector ¶
FasthttpArgsKeysValuesCollector implements KvCollector. FasthttpArgsKeysValuesCollector collects values whose key have given prefix as raw string.
func (FasthttpArgsKeysValuesCollector) CollectKeysValues ¶
func (fakvc FasthttpArgsKeysValuesCollector) CollectKeysValues() (keys, values []string)
collectKeysValues implements keysValuesCollector.
type FasthttpArgsKvView ¶
FasthttpArgsKvView is KvView implementation based on *fasthttp.Args.
type JsonKvCollector ¶
JsonKvCollector collects keys and values from a JSON object. Values are raw JSON encoded value: string values will contains quotes.
func (JsonKvCollector) CollectKeysValues ¶
func (jkc JsonKvCollector) CollectKeysValues() (keys, values []string)
CollectKeysValues implements KvCollector. JsonKvCollector collects values as raw JSON encoded string: string value will contains quotes.
type JsonKvView ¶
type JsonKvView struct {
Json []byte
}
JsonKvView is a KvView implementation over a JSON object.
type KvCollector ¶
type KvCollector interface {
CollectKeysValues() (keys, values []string)
}
KvCollector define objects that can collect a set of keys and values.