feat(hashx-interface): add hash interface

This commit is contained in:
bandl 2021-11-05 16:36:00 +08:00
parent 976215ee10
commit 06baf3993d
1 changed files with 13 additions and 0 deletions

View File

@ -53,3 +53,16 @@ type ListXInterface interface {
Range(start, end int) ([]string, error)
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
}