rdb

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitMap added in v0.0.37

type BitMap interface {
	TopicKey(id any) string
	RedisClient() *redis.Client
	SetIndex(id any, index uint, status bool) error
	GetIndex(id any, index uint) (bool, error)
	GetAllToBinary(id any) (string, error)
	GetAll(id any) ([]byte, error)
	ClearAll(id any) error
}

func NewBitMap added in v0.0.37

func NewBitMap(client *redis.Client, topic string) BitMap

type MapInt64 added in v0.0.32

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

func NewMapInt64(client *redis.Client, topic string) MapInt64

type MapInt64List added in v0.0.32

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 added in v0.0.32

type MapLimit interface {
	TopicKey() string
	RedisClient() *redis.Client
	Add(key string, delta uint) error
	Sub(key string, delta uint) error
	Get(key string) (int64, error)
	Del(key string) error
	Reset(key string) error
	IsToLimit(key string, max int64) bool
	Count() (int64, error)
	GetAll() (map[string]int64, error)
	Scan(dest interface{}) error
	ClearAll() error
}

func NewLimit

func NewLimit(client *redis.Client, topic string) MapLimit

type MapLimitList added in v0.0.38

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
	Get(id any, key string) (int64, error)
	Del(id any, key string) error
	Reset(id any, key string) 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 added in v0.0.38

func NewLimitList(client *redis.Client, topic string) MapLimitList

type MapString added in v0.0.32

type MapString interface {
	TopicKey() string
	RedisClient() *redis.Client
	Set(key string, value string) error
	Sets(kv map[string]string) 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

func NewMapString(client *redis.Client, topic string) MapString

type MapStringList added in v0.0.32

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
	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 added in v0.0.38

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 added in v0.0.38

func NewQueueInt64(client *redis.Client, topic string) QueueInt64

type QueueInt64List added in v0.0.38

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 added in v0.0.38

func NewQueueInt64List(client *redis.Client, topic string) QueueInt64List

type QueueString added in v0.0.38

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 added in v0.0.38

func NewQueueString(client *redis.Client, topic string) QueueString

type QueueStringList added in v0.0.38

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 added in v0.0.38

func NewQueueStringList(client *redis.Client, topic string) QueueStringList

type Set added in v0.0.32

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)
	SpopAll() ([]string, error)
	GetRandKeys(limit uint) ([]string, error)
	Count() (int64, error)
	GetAllKey() ([]string, error)
	ClearAll() error
}

func NewSet

func NewSet(client *redis.Client, topic string) Set

type SetList added in v0.0.32

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)
	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

func NewSetList(client *redis.Client, topic string) SetList

type ZSet added in v0.0.37

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
}

func NewZSet added in v0.0.37

func NewZSet(client *redis.Client, topic string) ZSet

type ZSetList added in v0.0.37

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 added in v0.0.37

func NewZSetList(client *redis.Client, topic string) ZSetList

type ZsetItem added in v0.0.37

type ZsetItem struct {
	Key   string
	Score float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL