Documentation
¶
Index ¶
- type Consumer
- type CouloyDict
- func (cdb *CouloyDict) Clear()
- func (cdb *CouloyDict) Exist(key string) bool
- func (cdb *CouloyDict) ForEach(consumer Consumer)
- func (cdb *CouloyDict) Get(key string) (val []byte, exists bool)
- func (cdb *CouloyDict) Keys() []string
- func (cdb *CouloyDict) Len() int
- func (cdb *CouloyDict) Put(key string, val []byte) (result int)
- func (cdb *CouloyDict) PutIfAbsent(key string, val []byte) (result int)
- func (cdb *CouloyDict) PutIfExists(key string, val []byte) (result int)
- func (cdb *CouloyDict) RandomDistinctKeys(limit int) []string
- func (cdb *CouloyDict) RandomKeys(limit int) []string
- func (cdb *CouloyDict) Remove(key string) (result int)
- type Dict
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CouloyDict ¶
type CouloyDict struct {
// contains filtered or unexported fields
}
func NewCouloyDict ¶
func NewCouloyDict(opt CouloyDB.Options) *CouloyDict
NewCouloyDict makes a new map
func (*CouloyDict) Clear ¶
func (cdb *CouloyDict) Clear()
func (*CouloyDict) Exist ¶
func (cdb *CouloyDict) Exist(key string) bool
func (*CouloyDict) ForEach ¶
func (cdb *CouloyDict) ForEach(consumer Consumer)
func (*CouloyDict) Keys ¶
func (cdb *CouloyDict) Keys() []string
func (*CouloyDict) Len ¶
func (cdb *CouloyDict) Len() int
func (*CouloyDict) PutIfAbsent ¶
func (cdb *CouloyDict) PutIfAbsent(key string, val []byte) (result int)
func (*CouloyDict) PutIfExists ¶
func (cdb *CouloyDict) PutIfExists(key string, val []byte) (result int)
func (*CouloyDict) RandomDistinctKeys ¶
func (cdb *CouloyDict) RandomDistinctKeys(limit int) []string
func (*CouloyDict) RandomKeys ¶
func (cdb *CouloyDict) RandomKeys(limit int) []string
func (*CouloyDict) Remove ¶
func (cdb *CouloyDict) Remove(key string) (result int)
type Dict ¶
type Dict interface { Get(key string) (val []byte, exists bool) Len() int Put(key string, val []byte) (result int) PutIfAbsent(key string, val []byte) (result int) PutIfExists(key string, val []byte) (result int) Remove(key string) (result int) ForEach(consumer Consumer) Keys() []string RandomKeys(limit int) []string RandomDistinctKeys(limit int) []string Clear() Exist(key string) bool }
Dict is interface of a key-value data structure
Click to show internal directories.
Click to hide internal directories.