dao

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

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

func New

func New(c *config.Config) *Dao

func (*Dao) AddRecordCache

func (d *Dao) AddRecordCache(uid string, ver uint64, m *model.MsgCache) error

func (*Dao) AddRecordFocus

func (d *Dao) AddRecordFocus(uid string, mid int64, time uint64) error

func (*Dao) AllGroupMembers

func (d *Dao) AllGroupMembers(ctx context.Context, gid string) ([]string, error)

func (*Dao) AppendGroupMsgContent

func (d *Dao) AppendGroupMsgContent(tx *mysql.MysqlTx, m *model.MsgContent) (int64, int64, error)

group

func (*Dao) AppendGroupMsgRelation

func (d *Dao) AppendGroupMsgRelation(tx *mysql.MysqlTx, m []*model.MsgRelation) (int64, int64, error)

func (*Dao) AppendMsgContent

func (d *Dao) AppendMsgContent(tx *mysql.MysqlTx, m *model.MsgContent) (int64, int64, error)

func (*Dao) AppendMsgRelation

func (d *Dao) AppendMsgRelation(tx *mysql.MysqlTx, m *model.MsgRelation) (int64, int64, error)

func (*Dao) AppendSignalContent

func (d *Dao) AppendSignalContent(m *model.SignalContent) (int64, int64, error)

func (*Dao) BatchAppendSignalContent

func (d *Dao) BatchAppendSignalContent(m []*model.SignalContent) (int64, int64, error)

func (Dao) CheckOnline

func (d Dao) CheckOnline(ctx context.Context, key string) (bool, error)

func (*Dao) DelGroupMsgContent

func (d *Dao) DelGroupMsgContent(mid int64) (int64, int64, error)

func (*Dao) DelMsgContent

func (d *Dao) DelMsgContent(mid int64) (int64, int64, error)

func (*Dao) GetMsgBySeq

func (d *Dao) GetMsgBySeq(senderUid, seq string) (*model.MsgContent, error)

func (*Dao) GetPriRecord

func (d *Dao) GetPriRecord(fromId, targetId string, mid int64, recordCount int64) ([]*model.MsgContent, error)

GetPriRecord 获得聊天记录

func (*Dao) GetRecordFocusNumber

func (d *Dao) GetRecordFocusNumber(mid int64) (int32, error)

func (*Dao) GetSpecifyGroupRecord

func (d *Dao) GetSpecifyGroupRecord(mid int64) (*model.MsgContent, error)

func (*Dao) GetSpecifyRecord

func (d *Dao) GetSpecifyRecord(mid int64) (*model.MsgContent, error)

GetRecord 获得指定聊天记录

func (*Dao) GroupMsgAfter

func (d *Dao) GroupMsgAfter(uid string, startMid, count int64) ([]*model.MsgContent, error)

func (*Dao) IncMsgVersion

func (d *Dao) IncMsgVersion(uid string) (uint64, error)

func (*Dao) MarkGroupMsgReceived

func (d *Dao) MarkGroupMsgReceived(uid string, mid int64) (int64, int64, error)

func (*Dao) MarkMsgReceived

func (d *Dao) MarkMsgReceived(uid string, mid int64) (int64, int64, error)

func (*Dao) MarkSignalReceived

func (d *Dao) MarkSignalReceived(uid string, mid int64) (int64, int64, error)

func (*Dao) NewTx

func (d *Dao) NewTx() (*mysql.MysqlTx, error)

func (Dao) PushClient

func (d Dao) PushClient(ctx context.Context, key, from, mid, target string, tp imparse.Channel, frameType imparse.FrameType, data []byte) error

func (*Dao) SyncSignalMsg

func (d *Dao) SyncSignalMsg(uid string, startId, count int64) ([]*model.SignalContent, error)

func (*Dao) UnReceiveGroupMsg

func (d *Dao) UnReceiveGroupMsg(uid string) ([]*model.MsgContent, error)

func (*Dao) UnReceiveMsg

func (d *Dao) UnReceiveMsg(uid string) ([]*model.MsgContent, error)

func (*Dao) UnReceiveSignalMsg

func (d *Dao) UnReceiveSignalMsg(uid string) ([]*model.SignalContent, error)

func (*Dao) UserLastMsg

func (d *Dao) UserLastMsg(uid string, num int64) ([]*model.MsgContent, error)

func (*Dao) UserMsgAfter

func (d *Dao) UserMsgAfter(uid string, startMid, count int64) ([]*model.MsgContent, error)

func (*Dao) UserRecords

func (d *Dao) UserRecords(uid string, ver uint64) ([]*model.MsgCache, error)

Jump to

Keyboard shortcuts

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