redis

package
v0.0.0-...-d9f1a53 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Rdb

type Rdb struct {
	*redis.Client
}

func NewClient

func NewClient(c *config.RedisConfig) *Rdb

func (*Rdb) CheckUserExist

func (rdb *Rdb) CheckUserExist(botId int64, userID int64) (int64, error)

func (*Rdb) DeleteComponents

func (rdb *Rdb) DeleteComponents(botId int64, groupId int64) error

func (*Rdb) GetComponents

func (rdb *Rdb) GetComponents(botId int64, groupId int64) (*map[int64]*model.ComponentData, error)

func (*Rdb) GetUserContext

func (rdb *Rdb) GetUserContext(botId int64, groupId int64, userId int64) (*bctx.Context, error)

func (*Rdb) GetUserStep

func (rdb *Rdb) GetUserStep(botId int64, groupId int64, userID int64) (*int64, error)

func (*Rdb) SetComponents

func (rdb *Rdb) SetComponents(botId int64, groupId int64, comps map[int64]*model.ComponentData) error

func (*Rdb) SetUserContext

func (rdb *Rdb) SetUserContext(botId int64, groupId int64, userId int64, bctx *bctx.Context) error

func (*Rdb) SetUserStep

func (rdb *Rdb) SetUserStep(botId int64, groupId int64, userID int64, stepID int64) error

Jump to

Keyboard shortcuts

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