Documentation ¶
Index ¶
- Variables
- type DB
- type DBOptions
- type DecoderFunc
- type EncoderFunc
- type List
- func (l *List) AddToFirst(value interface{}) error
- func (l *List) AddToLast(value interface{}) error
- func (l *List) Close() error
- func (l *List) RemoveFirst(value interface{}) (ok bool, err error)
- func (l *List) RemoveLast(value interface{}) (ok bool, err error)
- func (l *List) Size() (size int, err error)
- type Map
- func (m *Map) Close() error
- func (m *Map) ForEachKey(fn func(key string) bool) (err error)
- func (m *Map) Get(key string, value interface{}) (ok bool, err error)
- func (m *Map) Put(key string, value interface{}) (err error)
- func (m *Map) Remove(key string) (err error)
- func (m *Map) Size() (size int, err error)
- type Options
- type SortedList
- type SortedListOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDecoder = func(b []byte, value interface{}) error { return jsoniter.Unmarshal(b, value) }
View Source
var DefaultEncoder = func(value interface{}) ([]byte, error) { return jsoniter.Marshal(value) }
Functions ¶
This section is empty.
Types ¶
type DecoderFunc ¶
type EncoderFunc ¶
type Options ¶
type Options struct { DB *DBOptions Encoder EncoderFunc Decoder DecoderFunc }
type SortedList ¶
type SortedList struct {
// contains filtered or unexported fields
}
func OpenSortedList ¶
func OpenSortedList(file string, opts *SortedListOptions) (*SortedList, error)
打开数据库
func (*SortedList) Add ¶
func (l *SortedList) Add(score int64, value interface{}) error
type SortedListOptions ¶ added in v1.6.2
Click to show internal directories.
Click to hide internal directories.