persistence

package
v0.0.0-...-3aaa451 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Friends_add

func Friends_add(id string) error

func Friends_addMsgNum

func Friends_addMsgNum(id string)

添加未读消息数量

func Friends_findIdExist

func Friends_findIdExist(id string) (ok bool)

检查用户id是否存在

func Friends_msgNumClear

func Friends_msgNumClear(id string)

将未读消息数量清零

func Init

func Init()

func SaveMsgLog

func SaveMsgLog(sendId, recver, content string) error

保存消息日志

Types

type Friends

type Friends struct {
	Id     string //id
	Name   string //昵称
	Unread int32  //未读消息数量
	Order  int64  //最新消息unix时间
	Type   int    //id类型  1=普通id; 2=群id;
}

消息中心的联系人

func Friends_getall

func Friends_getall() (fs []*Friends)

type Message

type Message struct {
	Id         int
	Sender     string
	Recver     string
	Content    string
	UpdateTime int64
	UpdateNano int64
}

Jump to

Keyboard shortcuts

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