Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitMap ¶
type MapInt64 ¶
type MapInt64 interface { TopicKey() string RedisClient() *redis.Client Set(key string, value int64) error Sets(kv map[string]int64) error Get(key string) (int64, error) Gets(keys []string) (map[string]int64, error) GetAll() (map[string]int64, error) Del(key string) error Dels(key []string) error Count() (int64, error) Scan(dest interface{}) error ClearAll() error }
func NewMapInt64 ¶
type MapInt64List ¶
type MapInt64List interface { TopicKey(id any) string RedisClient() *redis.Client Set(id any, key string, value int64) error Sets(id any, kv map[string]int64) error Get(id any, key string) (int64, error) Gets(id any, keys []string) (map[string]int64, error) GetAll(id any) (map[string]int64, error) Del(id any, key string) error Dels(id any, key []string) error Count(id any) (int64, error) Scan(id any, dest interface{}) error ClearAll(id any) error }
func NewMapInt64List ¶
func NewMapInt64List(client *redis.Client, topic string) MapInt64List
type MapLimit ¶
type MapLimit interface { TopicKey() string RedisClient() *redis.Client Add(key string, delta uint) error Sub(key string, delta uint) error GetAndAdd(key string, delta uint) (int64, error) GetAndSub(key string, delta uint) (int64, error) Set(key string, value uint) error SetNX(key string, value uint) error Get(key string) (int64, error) Del(key string) error Reset(key string) error IsExist(key string) (bool, error) IsToLimit(key string, max int64) bool Count() (int64, error) GetAll() (map[string]int64, error) Scan(dest interface{}) error ClearAll() error }
type MapLimitList ¶
type MapLimitList interface { TopicKey(id any) string RedisClient() *redis.Client Add(id any, key string, delta uint) error Sub(id any, key string, delta uint) error GetAndAdd(id any, key string, delta uint) (int64, error) GetAndSub(id any, key string, delta uint) (int64, error) Set(id any, key string, value uint) error SetNX(id any, key string, value uint) error Get(id any, key string) (int64, error) Del(id any, key string) error Reset(id any, key string) error IsExist(id any, key string) (bool, error) IsToLimit(id any, key string, max int64) bool Count(id any) (int64, error) GetAll(id any) (map[string]int64, error) Scan(id any, dest interface{}) error ClearAll(id any) error }
func NewLimitList ¶
func NewLimitList(client *redis.Client, topic string) MapLimitList
type MapString ¶
type MapString interface { TopicKey() string RedisClient() *redis.Client Set(key string, value string) error Sets(kv map[string]string) error SetJson(key string, pointer any) error GetJson(key string, pointer any) error Get(key string) (string, error) Gets(keys []string) (map[string]string, error) GetAll() (map[string]string, error) Del(key string) error Dels(key []string) error Count() (int64, error) Scan(dest interface{}) error ClearAll() error }
func NewMapString ¶
type MapStringList ¶
type MapStringList interface { TopicKey(id any) string RedisClient() *redis.Client Set(id any, key string, value string) error Sets(id any, kv map[string]string) error SetJson(id any, key string, pointer any) error GetJson(id any, key string, pointer any) error Get(id any, key string) (string, error) Gets(id any, keys []string) (map[string]string, error) GetAll(id any) (map[string]string, error) Del(id any, key string) error Dels(id any, key []string) error Count(id any) (int64, error) Scan(id any, dest interface{}) error ClearAll(id any) error }
func NewMapStringList ¶
func NewMapStringList(client *redis.Client, topic string) MapStringList
type QueueInt64 ¶
type QueueInt64 interface { TopicKey() string RedisClient() *redis.Client SetQueueInt64MaxLength(max uint64) LPush(value int64) error RPush(value int64) error LPushList(list []int64) error RPushList(list []int64) error LPop() (int64, error) RPop() (int64, error) LPopList(count int) ([]int64, error) RPopList(count int) ([]int64, error) Count() (int64, error) GetAll() ([]int64, error) ClearAll() error }
func NewQueueInt64 ¶
func NewQueueInt64(client *redis.Client, topic string) QueueInt64
func NewQueueInt64AndMax ¶
func NewQueueInt64AndMax(client *redis.Client, topic string, max uint64) QueueInt64
type QueueInt64List ¶
type QueueInt64List interface { TopicKey(id any) string RedisClient() *redis.Client SetQueueInt64ListMaxLength(max uint64) LPush(id any, value int64) error RPush(id any, value int64) error LPushList(id any, list []int64) error RPushList(id any, list []int64) error LPop(id any) (int64, error) RPop(id any) (int64, error) LPopList(id any, count int) ([]int64, error) RPopList(id any, count int) ([]int64, error) Count(id any) (int64, error) GetAll(id any) ([]int64, error) ClearAll(id any) error }
func NewQueueInt64List ¶
func NewQueueInt64List(client *redis.Client, topic string) QueueInt64List
func NewQueueInt64ListAndMax ¶
func NewQueueInt64ListAndMax(client *redis.Client, topic string, max uint64) QueueInt64List
type QueueString ¶
type QueueString interface { TopicKey() string RedisClient() *redis.Client SetQueueStringMaxLength(max uint64) LPush(value string) error RPush(value string) error LPushList(list []string) error RPushList(list []string) error LPop() (string, error) RPop() (string, error) LPopList(count int) ([]string, error) RPopList(count int) ([]string, error) Count() (int64, error) GetAll() ([]string, error) ClearAll() error }
func NewQueueString ¶
func NewQueueString(client *redis.Client, topic string) QueueString
func NewQueueStringAndMax ¶
func NewQueueStringAndMax(client *redis.Client, topic string, max uint64) QueueString
type QueueStringList ¶
type QueueStringList interface { TopicKey(id any) string RedisClient() *redis.Client SetQueueStringListMaxLength(max uint64) LPush(id any, value string) error RPush(id any, value string) error LPushList(id any, list []string) error RPushList(id any, list []string) error LPop(id any) (string, error) RPop(id any) (string, error) LPopList(id any, count int) ([]string, error) RPopList(id any, count int) ([]string, error) Count(id any) (int64, error) GetAll(id any) ([]string, error) ClearAll(id any) error }
func NewQueueStringList ¶
func NewQueueStringList(client *redis.Client, topic string) QueueStringList
func NewQueueStringListAndMax ¶
func NewQueueStringListAndMax(client *redis.Client, topic string, max uint64) QueueStringList
type Set ¶
type Set interface { TopicKey() string RedisClient() *redis.Client IsExist(key string) (bool, error) Add(key string) error Adds(keys []string) error Del(key string) error Dels(keys []string) error Spop(limit uint) ([]string, error) SpopOne() (string, error) SpopAll() ([]string, error) GetRandKeys(limit uint) ([]string, error) Count() (int64, error) GetAllKey() ([]string, error) ClearAll() error }
type SetList ¶
type SetList interface { TopicKey(id any) string RedisClient() *redis.Client IsExist(id any, key string) (bool, error) Add(id any, value string) error Adds(id any, keys []string) error Del(id any, key string) error Dels(id any, keys []string) error Spop(id any, limit uint) ([]string, error) SpopOne(id any) (string, error) SpopAll(id any) ([]string, error) GetRandKeys(id any, limit uint) ([]string, error) Count(id any) (int64, error) GetAllKey(id any) ([]string, error) ClearAll(id any) error }
func NewSetList ¶
type ZSet ¶
type ZSet interface { TopicKey() string RedisClient() *redis.Client Add(key string, score float64) error Adds(keys map[string]float64) error Del(key string) error Dels(keys []string) error ZpopMin() (ZsetItem, error) ZpopMax() (ZsetItem, error) GetByIndex(index int64) (ZsetItem, error) GetByIndexRange(start int64, end int64) ([]ZsetItem, error) GetByIndexDESC(index int64) (ZsetItem, error) GetByIndexRangeDESC(start int64, end int64) ([]ZsetItem, error) GetByKey(key string) (ZsetItem, error) Count() (int64, error) GetAllKey() ([]ZsetItem, error) ClearAll() error }
type ZSetList ¶
type ZSetList interface { TopicKey(id any) string RedisClient() *redis.Client Add(id any, key string, score float64) error Adds(id any, keys map[string]float64) error Del(id any, key string) error Dels(id any, keys []string) error ZpopMin(id any) (ZsetItem, error) ZpopMax(id any) (ZsetItem, error) GetByIndex(id any, index int64) (ZsetItem, error) GetByIndexRange(id any, start int64, end int64) ([]ZsetItem, error) GetByIndexDESC(id any, index int64) (ZsetItem, error) GetByIndexRangeDESC(id any, start int64, end int64) ([]ZsetItem, error) GetByKey(id any, key string) (ZsetItem, error) Count(id any) (int64, error) GetAllKey(id any) ([]ZsetItem, error) ClearAll(id any) error }
func NewZSetList ¶
Click to show internal directories.
Click to hide internal directories.