echo

package
v0.0.0-...-c7e21b0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFileTimeLimit

func AddFileTimeLimit(value int64)

Add 添加一个新的 int64 到全局栈中

func AddLazyMessageId

func AddLazyMessageId(groupID, messageID string, timestamp time.Time)

AddLazyMessageId 添加 message_id 和它的时间戳到指定群号

func AddLazyMessageIdv2

func AddLazyMessageIdv2(groupID, userID, messageID string, timestamp time.Time)

AddLazyMessageId 添加 message_id 和它的时间戳到指定群号

func AddMapping

func AddMapping(key int64, value int)

AddMapping 添加一个新的映射

func AddMappingFileTimeLimit

func AddMappingFileTimeLimit(key string, value int64)

AddMapping 添加一个新的映射

func AddMappingSeq

func AddMappingSeq(key string, value int)

AddMapping 添加一个新的映射

func AddMsgID

func AddMsgID(appid string, s int64, msgID string)

添加echo对应的messageid

func AddMsgIDv2

func AddMsgIDv2(appid string, groupid int64, userid int64, msgID string)

添加group和userid对应的messageid

func AddMsgIDv3

func AddMsgIDv3(appid string, s string, msgID string)

添加echo对应的messageid

func AddMsgType

func AddMsgType(appid string, s int64, msgType string)

添加echo对应的类型

func GetFileTimeLimit

func GetFileTimeLimit() int64

Get 获取全局栈顶的元素

func GetLazyMessagesId

func GetLazyMessagesId(groupID string) string

GetRecentMessages 获取指定群号中最近5分钟内的 message_id~

func GetLazyMessagesIdv2

func GetLazyMessagesIdv2(groupID, userID string) string

GetLazyMessagesIdv2 获取指定群号和用户ID中最近5分钟内的 message_id

func GetMapping

func GetMapping(key int64) int

GetMapping 根据给定的 int64 键获取映射值

func GetMappingFileTimeLimit

func GetMappingFileTimeLimit(key string) int64

GetMapping 根据给定的 string 键获取映射值

func GetMappingSeq

func GetMappingSeq(key string) int

GetMappingSeq 根据给定的 string 键获取映射值

func GetMessageTypeByGroupidv2

func GetMessageTypeByGroupidv2(appID string, GroupID interface{}) string

通过group_id获取类型

func GetMsgIDByKey

func GetMsgIDByKey(key string) string

根据给定的key获取消息ID

func GetMsgIDv3

func GetMsgIDv3(appid string, s string) string

GetMsgIDv3 返回给定appid和s的msgID

func GetMsgTypeByKey

func GetMsgTypeByKey(key string) string

根据给定的key获取消息类型

func PushGlobalStack

func PushGlobalStack(pair MessageGroupPair)

PushGlobalStack 向全局栈中添加一个新的 MessageGroupPair

func RemoveFromGlobalStack

func RemoveFromGlobalStack(index int)

RemoveFromGlobalStack 从全局栈中删除指定下标的元素

Types

type EchoMapping

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

func (*EchoMapping) GenerateKey

func (e *EchoMapping) GenerateKey(appid string, s int64) string

func (*EchoMapping) GenerateKeyv2

func (e *EchoMapping) GenerateKeyv2(appid string, groupid int64, userid int64) string

func (*EchoMapping) GenerateKeyv3

func (e *EchoMapping) GenerateKeyv3(appid string, s string) string

type Int64Stack

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

Int64Stack 用于存储 int64 的栈

type Int64ToIntMapping

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

Int64ToIntMapping 用于存储 int64 到 int 的映射(递归计数器)

type MessageGroupPair

type MessageGroupPair struct {
	Group        string
	GroupMessage *dto.MessageToCreate
}

MessageGroupPair 用于存储 group 和 groupMessage

func PopGlobalStackMulti

func PopGlobalStackMulti(count int) []MessageGroupPair

PopGlobalStackMulti 从全局栈中取出指定数量的 MessageGroupPair,但不删除它们

type StringToInt64MappingSeq

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

StringToInt64MappingSeq 用于存储 string 到 int64 的映射(file接口频率限制)

type StringToIntMappingSeq

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

IntToStringMappingSeq 用于存储 string 到 int 的映射(seq对应)

Jump to

Keyboard shortcuts

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