Documentation ¶
Index ¶
- Constants
- type Queries
- func (q *Queries) AddEmails(c context.Context, emails ...string) error
- func (q *Queries) AddRelationAccount(c context.Context, relationID int64, accountIDs ...int64) error
- func (q *Queries) DelAccountFromRelations(c context.Context, accountID int64, relationIDs ...int64) error
- func (q *Queries) DelAllRelations(c context.Context) error
- func (q *Queries) DelRelationAccount(c context.Context, relationID int64, accountIDs ...int64) error
- func (q *Queries) DelRelations(c context.Context, relationIDs ...int64) error
- func (q *Queries) DeleteEmail(c context.Context, email string) error
- func (q *Queries) ExistEmail(c context.Context, email string) (bool, error)
- func (q *Queries) GetAccountsByRelationID(c context.Context, relationID int64) ([]int64, error)
- func (q *Queries) ReloadEmails(c context.Context, emails ...string) error
- func (q *Queries) ReloadRelationIDs(c context.Context, groupMap map[int64][]int64) error
- func (q *Queries) UpdateEmail(c context.Context, oldEmail, newEmail string) error
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 (*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 ¶
DelAllRelations 删除所有群聊名单(用于测试)
func (*Queries) DelRelationAccount ¶
func (q *Queries) DelRelationAccount(c context.Context, relationID int64, accountIDs ...int64) error
DelRelationAccount 从一个群中删除多个人员
func (*Queries) DelRelations ¶
DelRelations 删除部分群聊名单
func (*Queries) DeleteEmail ¶
DeleteEmail deletes the email from the set.
func (*Queries) ExistEmail ¶
ExistEmail checks if the email is in the set.
func (*Queries) GetAccountsByRelationID ¶
GetAccountsByRelationID 获取群聊名单中的所有人员
func (*Queries) ReloadEmails ¶
ReloadEmails reloads the emails from the set.
func (*Queries) ReloadRelationIDs ¶
ReloadRelationIDs 重新加载群聊名单
Click to show internal directories.
Click to hide internal directories.