Documentation ¶
Index ¶
- Constants
- func DBClose() error
- func DBCreate(name string) (err error)
- func DBDel(name, k string) (err error)
- func DBGet(name, k string) (ret interface{}, err error)
- func DBInit(dbName, path string, bDefault bool) (err error)
- func DBPut(name, k string, v interface{}) error
- func DBRange(name string, f func(k string, v interface{}) bool) error
- func DBRangeByPrefix(name, prefix string, f func(k string, v interface{}) bool) error
- func PeriodDataList(key interface{}, fCanAppend func(pd *PeriodData) bool) []interface{}
- func PeriodDataListRevert(key interface{}, fCanAppend func(pd *PeriodData) bool) []interface{}
- func PushPeriodData(key, data interface{}, fCanAppend func(t time.Time, arr []*PeriodData) bool) error
- type IDB
- type PeriodData
Constants ¶
View Source
const ( C_Suffix_Split = "[PeriodMemDB]" C_Period_1Min = "C_Period_1Min" C_Period_5Min = "C_Period_5Min" C_Period_1Hour = "C_Period_1Hour" C_Period_1Day = "C_Period_1Day" )
Variables ¶
This section is empty.
Functions ¶
func DBRangeByPrefix ¶
func PeriodDataList ¶
func PeriodDataList(key interface{}, fCanAppend func(pd *PeriodData) bool) []interface{}
func PeriodDataListRevert ¶
func PeriodDataListRevert(key interface{}, fCanAppend func(pd *PeriodData) bool) []interface{}
func PushPeriodData ¶
func PushPeriodData(key, data interface{}, fCanAppend func(t time.Time, arr []*PeriodData) bool) error
Types ¶
type IDB ¶
type IDB interface { DBClose() error DBDel(name, k string) error DBCreate(name string) error // for map DBPut(name, k string, v interface{}) error DBGet(name, k string) (ret interface{}, err error) DBRange(name string, f func(k string, v interface{}) bool) error DBRangeByPrefix(name, prefix string, f func(k string, v interface{}) bool) error // for list DBPush(name, v string, index int) error DBRemove(name string, index int) error DBPop(name string, index int) error DBRevert(name string) []string // help DBHas(name, k string) bool DBKeys(name string) []string }
type PeriodData ¶
Click to show internal directories.
Click to hide internal directories.