service

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: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func (*DB) SaveMsg

func (d *DB) SaveMsg(deviceType xproto.Device, frame imparse.Frame) error

type Service

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

func New

func New(c *config.Config) *Service

func (*Service) AddRecordFocus

func (s *Service) AddRecordFocus(uid string, mid int64, time uint64) error

AddRecordFocus 添加消息关注记录

func (*Service) AppendGroupCastSignal

func (s *Service) AppendGroupCastSignal(mid, target string, signalType xproto.SignalType, content []byte, createTime uint64) error

func (*Service) AppendGroupMsg

func (s *Service) AppendGroupMsg(isSelfRead bool, p *xproto.Common) error

func (*Service) AppendMsg

func (s *Service) AppendMsg(isSelfRead bool, p *xproto.Common) error

func (*Service) AppendUniCastSignal

func (s *Service) AppendUniCastSignal(mid, target string, signalType xproto.SignalType, content []byte, createTime uint64) error

func (Service) Config

func (s Service) Config() *config.Config

func (*Service) DealConn

func (s *Service) DealConn(ctx context.Context, m *record.RecordDeal) error

func (*Service) DealStore

func (s *Service) DealStore(ctx context.Context, m *record.PushMsg) error

func (*Service) DelRecord

func (s *Service) DelRecord(tp xproto.Channel, mid int64) error

GetPriRecord 所有聊天记录

func (*Service) GetRecordsAfterMid

func (s *Service) GetRecordsAfterMid(tp xproto.Channel, fromId, targetId string, mid int64, recordCount int64) ([]*model.MsgContent, error)

GetPriRecord 所有聊天记录

func (*Service) GetSpecifyRecord

func (s *Service) GetSpecifyRecord(tp xproto.Channel, mid int64) (*model.MsgContent, error)

GetPriRecord 所有聊天记录

func (*Service) GetSyncMsg

func (s *Service) GetSyncMsg(key, uid string, startMid, count int64) ([][]byte, error)

func (*Service) GetSyncMsgJustBizLevel added in v0.1.0

func (s *Service) GetSyncMsgJustBizLevel(key, uid string, startMid, count int64) ([][]byte, error)

func (*Service) ListenMQ

func (s *Service) ListenMQ()

func (*Service) MarkReceived

func (s *Service) MarkReceived(tp, uid string, mid int64) error

func (*Service) PushMem

func (s *Service) PushMem(p *xproto.Common) error

func (*Service) SendSyncMsg

func (s *Service) SendSyncMsg(key, uid string, startMid int64) error

func (*Service) SendUnReadMsg

func (s *Service) SendUnReadMsg(key, uid string) error

func (*Service) Shutdown

func (s *Service) Shutdown(ctx context.Context)

func (*Service) StatisticRecordFocusNumber

func (s *Service) StatisticRecordFocusNumber(mid int64) (int32, error)

StatisticRecordFocusNumber 统计消息关注数

func (*Service) StoreGroupMsg

func (s *Service) StoreGroupMsg(deviceType xproto.Device, pro *xproto.Common) error

func (*Service) StoreMsg

func (s *Service) StoreMsg(deviceType xproto.Device, pro *xproto.Common) error

Jump to

Keyboard shortcuts

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