Documentation
¶
Index ¶
- func LoadAsBool(kvs KVS, k string) (bool, error)
- func LoadAsFloat(kvs KVS, k string) (float64, error)
- func LoadAsFloatOr(kvs KVS, k string, d float64) (float64, error)
- func LoadAsInt(kvs KVS, k string) (int, error)
- func LoadAsIntOr(kvs KVS, k string, d int) (int, error)
- func LoadAsString(kvs KVS, k string) (string, error)
- func LoadAsStringOr(kvs KVS, k string, d string) (string, error)
- func LoadAsUint(kvs KVS, k string) (uint, error)
- func LoadAsUintOr(kvs KVS, k string, d uint) (uint, error)
- type Cfg
- type KVS
- type MemKVS
- func (i *MemKVS) Close() error
- func (i *MemKVS) Collect() (map[string]any, error)
- func (i *MemKVS) CollectAsString() (map[string]string, error)
- func (i *MemKVS) Del(k string) error
- func (i *MemKVS) GetCfg() interface{}
- func (i *MemKVS) Load(k string) (any, bool, error)
- func (i *MemKVS) LoadAndDelete(k string) (any, bool, error)
- func (i *MemKVS) LoadAsBool(k string) (bool, error)
- func (i *MemKVS) LoadAsFloat(k string) (float64, error)
- func (i *MemKVS) LoadAsFloatOr(k string, d float64) (float64, error)
- func (i *MemKVS) LoadAsInt(k string) (int, error)
- func (i *MemKVS) LoadAsIntOr(k string, d int) (int, error)
- func (i *MemKVS) LoadAsString(k string) (string, error)
- func (i *MemKVS) LoadAsStringOr(k string, d string) (string, error)
- func (i *MemKVS) LoadAsUint(k string) (uint, error)
- func (i *MemKVS) LoadAsUintOr(k string, d uint) (uint, error)
- func (i *MemKVS) LoadOrStore(k string, v any) (any, bool, error)
- func (i *MemKVS) Open() error
- func (i *MemKVS) Range(f func(k string, v any) bool) error
- func (i *MemKVS) Store(k string, v any) error
- func (i *MemKVS) StoreAsString(k string, v any) error
- func (i *MemKVS) Type() interface{}
- type MemKVSCfg
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadAsFloatOr ¶ added in v0.7.5
func LoadAsStringOr ¶ added in v0.7.5
Types ¶
type Cfg ¶
type Cfg struct {
Type Type `yaml:"type" json:"type"`
Cfg interface{} `yaml:"cfg" json:"cfg"`
}
type KVS ¶
type KVS interface {
plugin.Plugin
Open() error
Close() error
Store(k string, v any) error
StoreAsString(k string, v any) error
Load(k string) (any, bool, error)
LoadOrStore(k string, v any) (any, bool, error)
LoadAndDelete(k string) (any, bool, error)
Del(k string) error
LoadAsBool(k string) (bool, error)
LoadAsString(k string) (string, error)
LoadAsStringOr(k string, d string) (string, error)
LoadAsInt(k string) (int, error)
LoadAsIntOr(k string, d int) (int, error)
LoadAsUint(k string) (uint, error)
LoadAsUintOr(k string, d uint) (uint, error)
LoadAsFloat(k string) (float64, error)
LoadAsFloatOr(k string, d float64) (float64, error)
Collect() (map[string]any, error)
CollectAsString() (map[string]string, error)
Range(func(k string, v any) bool) error
}
type MemKVS ¶ added in v0.7.7
type MemKVS struct {
*MemKVSCfg
// contains filtered or unexported fields
}
func (*MemKVS) CollectAsString ¶ added in v0.7.7
func (*MemKVS) LoadAndDelete ¶ added in v0.7.7
func (*MemKVS) LoadAsFloat ¶ added in v0.7.7
func (*MemKVS) LoadAsFloatOr ¶ added in v0.7.7
func (*MemKVS) LoadAsIntOr ¶ added in v0.7.7
func (*MemKVS) LoadAsString ¶ added in v0.7.7
func (*MemKVS) LoadAsStringOr ¶ added in v0.7.7
func (*MemKVS) LoadAsUintOr ¶ added in v0.7.7
func (*MemKVS) LoadOrStore ¶ added in v0.7.7
func (*MemKVS) StoreAsString ¶ added in v0.7.7
type MemKVSCfg ¶ added in v0.7.7
type MemKVSCfg struct{}
func NewMemKVSCfg ¶ added in v0.7.7
func NewMemKVSCfg() *MemKVSCfg
Click to show internal directories.
Click to hide internal directories.