database

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessage

func GetMessage(channelId, channelType, messageId string) (*message.Message, error)

GetMessage 获取消息

func GetMessageList

func GetMessageList(channelId, channelType, next string, direction QueryDirection, limit int) ([]*message.Message, []*message.Message, error)

GetMessageList 获取消息列表

func SaveMessage

func SaveMessage(data *message.Message, channelId, channelType string) error

SaveMessage 保存消息

func StartMessageDB

func StartMessageDB(messageLimit int) error

StartMessageDB 启动消息数据库

Types

type MessageDB

type MessageDB struct {
	DB *leveldb.DB
	// contains filtered or unexported fields
}

MessageDB 消息数据库

type QueryDirection

type QueryDirection string

QueryDirection 查询方向

const (
	// QueryDirectionBefore 之前
	QueryDirectionBefore QueryDirection = "before"
	// QueryDirectionAfter 之后
	QueryDirectionAfter QueryDirection = "after"
	// QueryDirectionAround 周围
	QueryDirectionAround QueryDirection = "around"
)

Jump to

Keyboard shortcuts

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