persistence

package
v0.0.0-...-7c02c66 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SERVER_NAME                         = "PERSISTENCE_SVC"
	SERVICE_SAVE_MSG_TO_DB              = "SaveMsgToDb"
	SERVICE_GET_MSG_FROM_DB_IN_RANGE    = "GetMsgFromDbInRange"
	SERVICE_GET_LAST30_MSG_FROM_DB      = "GetLast30MsgFromDb"
	SERVICE_GET_THE_30MSG_BEFORE_THE_ID = "GetThe30MsgBeforeTheId"
	SERVICE_GET_THE_30MSG_AFTER_THE_ID  = "GetThe30MsgAfterTheId"
	SERVICE_GET_LASTONE_MSG             = "GetLastOneMsgFromDb"
)

Variables

This section is empty.

Functions

func NewServer

func NewServer(opts ...config.Option) *rpcxServer

Types

type GetLast30MsgFromDbArgs

type GetLast30MsgFromDbArgs struct {
	ConversationID string
	Sort           contant.Sort
}

获取会话最后30条消息

type GetLast30MsgFromDbReply

type GetLast30MsgFromDbReply struct {
	Msg []model.Msg
}

type GetLastOneMsgFromDbArgs

type GetLastOneMsgFromDbArgs struct {
	ConversationID string
	Sort           contant.Sort
}

获取会话最后一条消息

type GetLastOneMsgFromDbReply

type GetLastOneMsgFromDbReply struct {
	Msg []model.Msg
}

type GetMsgFromDbInRangeArgs

type GetMsgFromDbInRangeArgs struct {
	ConversationID string
	StartMsgId     string
	EndMsgId       string
	Sort           contant.Sort
}

根据范围会获取消息消息

type GetMsgFromDbInRangeReply

type GetMsgFromDbInRangeReply struct {
	Msg []model.Msg
}

type GetThe30MsgAfterTheIdArgs

type GetThe30MsgAfterTheIdArgs struct {
	ConversationID string
	MsgId          string
	Sort           contant.Sort
}

获取指定消息id之后30条消息

type GetThe30MsgAfterTheIdReply

type GetThe30MsgAfterTheIdReply struct {
	Msg []model.Msg
}

type GetThe30MsgBeforeTheIdArgs

type GetThe30MsgBeforeTheIdArgs struct {
	ConversationID string
	MsgId          string
	Sort           contant.Sort
}

获取指定消息id之前30条消息

type GetThe30MsgBeforeTheIdReply

type GetThe30MsgBeforeTheIdReply struct {
	Msg []model.Msg
}

type SaveMsgToDbArgs

type SaveMsgToDbArgs struct {
	Msgs []model.Msg
}

持久化消息

type SaveMsgToDbReply

type SaveMsgToDbReply struct {
	Failed []string
}

Jump to

Keyboard shortcuts

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