manager

package
v0.0.0-...-0b7a748 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLink(l *Link) error

func AddMessage

func AddMessage(m *Message) error

func AddOrUpdateChat

func AddOrUpdateChat(c *Chat) error

func AddTopic

func AddTopic(t *Topic) error

func DelLinkById

func DelLinkById(id int64) error

func DelTopic

func DelTopic(master_limb, slave_limb string) error

func GetChatCount

func GetChatCount(query string) (int, error)

Types

type Chat

type Chat struct {
	ID       int64
	Limb     string
	ChatType string
	Title    string
}

func GetChat

func GetChat(limb string) (*Chat, error)

func GetChatList

func GetChatList(pageNum, pageSize int, query string) ([]*Chat, error)
type Link struct {
	ID         int64
	MasterLimb string
	SlaveLimb  string
	Title      string
}
func GetLinkList() ([]*Link, error)

func GetLinksByMaster

func GetLinksByMaster(masterLimb string) ([]*Link, error)

func GetLinksBySlave

func GetLinksBySlave(slaveLimb string) ([]*Link, error)

type Message

type Message struct {
	ID                string
	MasterLimb        string
	MasterMsgID       string
	MasterMsgThreadID string
	SlaveLimb         string
	SlaveMsgID        string
	SlaveSender       string
	Content           string
	Timestamp         int64
}

func GetMessageByMasterMsgId

func GetMessageByMasterMsgId(masterLimb, masterMsgId string) (*Message, error)

func GetMessagesBySlave

func GetMessagesBySlave(slaveLimb, slaveMsgId string) ([]*Message, error)

func GetMessagesBySlaveReply

func GetMessagesBySlaveReply(slaveLimb string, reply *common.ReplyInfo) ([]*Message, error)

type Pager

type Pager struct {
	NumPages           int
	HasPrev, HasNext   bool
	PrevPage, NextPage int
	ItemsPerPage       int
	CurrentPage        int
	NumItems           int
}

func CalcPager

func CalcPager(currentPage, itemsPerPage, numItems int) Pager

type Topic

type Topic struct {
	ID         int64
	MasterLimb string
	SlaveLimb  string
	TopicID    string
}

func GetTopic

func GetTopic(master_limb, slave_limb string) (*Topic, error)

func GetTopicByMaster

func GetTopicByMaster(master_limb string, topic_id int64) (*Topic, error)

Jump to

Keyboard shortcuts

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