Documentation ¶
Index ¶
- type Cache
- type DB
- func (db *DB) Get(key string, out interface{}, params ...types.Params) error
- func (db *DB) GetBool(key string, def ...bool) bool
- func (db *DB) GetDuration(key string, def ...time.Duration) time.Duration
- func (db *DB) GetFloat32(key string, def ...float32) float32
- func (db *DB) GetFloat64(key string, def ...float64) float64
- func (db *DB) GetInt(key string, def ...int) int
- func (db *DB) GetInt32(key string, def ...int32) int32
- func (db *DB) GetInt64(key string, def ...int64) int64
- func (db *DB) GetString(key string, def ...string) string
- func (db *DB) OnMiss(handler func(key string, out interface{}, params ...types.Params) error, ...)
- func (db *DB) OnUpdate(handler func(key string, out interface{}, params ...types.Params) error, ...)
- func (db *DB) Put(key string, val interface{}, params ...types.StringMap) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { *DB // contains filtered or unexported fields }
Cache is caching jsondb that supports default expiry
type DB ¶
DB is a simple json object wrapper around a kvdb.DB
func (*DB) GetDuration ¶
GetDuration a duration value
func (*DB) GetFloat32 ¶ added in v2.0.12
GetFloat32 returns an float32 value
func (*DB) GetFloat64 ¶ added in v2.0.12
GetFloat64 returns an float64 value
func (*DB) OnMiss ¶ added in v2.0.12
func (db *DB) OnMiss(handler func(key string, out interface{}, params ...types.Params) error, update bool)
OnMiss provides a json friendly OnMiss handler like kvdb.DB
Click to show internal directories.
Click to hide internal directories.