feat(hashx-interface): add hash interface
This commit is contained in:
parent
976215ee10
commit
06baf3993d
|
@ -53,3 +53,16 @@ type ListXInterface interface {
|
||||||
Range(start, end int) ([]string, error)
|
Range(start, end int) ([]string, error)
|
||||||
Remove(value string, count int) (int, UpdateLength)
|
Remove(value string, count int) (int, UpdateLength)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type HashXInterface interface {
|
||||||
|
KeyBaseInterface
|
||||||
|
Set(key string, val string) UpdateLength
|
||||||
|
Get(key string) (string, error)
|
||||||
|
Del(key string) (UpdateLength, error)
|
||||||
|
Key() []string
|
||||||
|
Value() []string
|
||||||
|
Item() map[string]string
|
||||||
|
Add(renewal int, key ...string) (int, []string, error) // 访问影响成功的结果
|
||||||
|
SetX(key string, val string) (bool, UpdateLength) // 不存在才插入
|
||||||
|
Length() int
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue