query

package
v0.0.0-...-b89eba7 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DelAllPrefixLua = "local redisKeys = redis.call('keys', KEYS[1] .. '*');for i, k in pairs(redisKeys) do redis.call('expire', k, 0);end"
View Source
const KeyEmail = "KeyEmail"
View Source
const KeyGroup = "KeyGroup"

Variables

This section is empty.

Functions

This section is empty.

Types

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(rdb *redis.Client) *Queries

func (*Queries) AddEmails

func (q *Queries) AddEmails(c context.Context, emails ...string) error

AddEmails adds emails to the set.

func (*Queries) AddRelationAccount

func (q *Queries) AddRelationAccount(c context.Context, relationID int64, accountIDs ...int64) error

AddRelationAccount 向群聊名单中增加人员

func (*Queries) DelAccountFromRelations

func (q *Queries) DelAccountFromRelations(c context.Context, accountID int64, relationIDs ...int64) error

DelAccountFromRelations 从多个群中删除一个人员

func (*Queries) DelAllRelations

func (q *Queries) DelAllRelations(c context.Context) error

DelAllRelations 删除所有群聊名单(用于测试)

func (*Queries) DelRelationAccount

func (q *Queries) DelRelationAccount(c context.Context, relationID int64, accountIDs ...int64) error

DelRelationAccount 从一个群中删除多个人员

func (*Queries) DelRelations

func (q *Queries) DelRelations(c context.Context, relationIDs ...int64) error

DelRelations 删除部分群聊名单

func (*Queries) DeleteEmail

func (q *Queries) DeleteEmail(c context.Context, email string) error

DeleteEmail deletes the email from the set.

func (*Queries) ExistEmail

func (q *Queries) ExistEmail(c context.Context, email string) (bool, error)

ExistEmail checks if the email is in the set.

func (*Queries) GetAccountsByRelationID

func (q *Queries) GetAccountsByRelationID(c context.Context, relationID int64) ([]int64, error)

GetAccountsByRelationID 获取群聊名单中的所有人员

func (*Queries) ReloadEmails

func (q *Queries) ReloadEmails(c context.Context, emails ...string) error

ReloadEmails reloads the emails from the set.

func (*Queries) ReloadRelationIDs

func (q *Queries) ReloadRelationIDs(c context.Context, groupMap map[int64][]int64) error

ReloadRelationIDs 重新加载群聊名单

func (*Queries) UpdateEmail

func (q *Queries) UpdateEmail(c context.Context, oldEmail, newEmail string) error

UpdateEmail updates the email in the set.

Jump to

Keyboard shortcuts

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