model

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

Documentation

Index

Constants

View Source
const (
	Send = 0
	Rev  = 1
)
View Source
const (
	UnReceive = 0
	Received  = 1
)

Variables

View Source
var (
	ErrRecordNotFind    = errors.New("record not find")
	ErrAppId            = errors.New("appId not compared")
	ErrConsumeRedo      = errors.New("process msg failed")
	ErrCustomNotSupport = errors.New("biz not support")
	ErrFrameType        = errors.New("error frame type")
)

Functions

func ConvertMsg

func ConvertMsg(msgType uint32, data []byte) []byte

func ConvertReference

func ConvertReference(data []byte) *xproto.Reference

func ConvertSignal

func ConvertSignal(actionType uint32, data []byte) []byte

func ConvertSource

func ConvertSource(data []byte) *xproto.Source

func JsonUnmarshal

func JsonUnmarshal(msgType uint32, data []byte) proto.Message

func ParseCommonMsg

func ParseCommonMsg(m *xproto.Common) []byte

func ParseReference

func ParseReference(m *xproto.Common) []byte

func ParseSignal

func ParseSignal(m *xproto.Signal) []byte

func ParseSource

func ParseSource(m *xproto.Common) []byte

Types

type MsgCache

type MsgCache struct {
	Mid        string
	Seq        string
	SenderId   string
	ReceiverId string
	MsgType    uint32
	Content    string
	CreateTime uint64
	Source     string
	Reference  string
	Prev       uint64
	Version    uint64
}

type MsgContent

type MsgContent struct {
	Mid        string
	Seq        string
	SenderId   string
	ReceiverId string
	MsgType    uint32
	Content    string
	CreateTime uint64
	Source     string
	Reference  string
}

type MsgRelation

type MsgRelation struct {
	Mid        string
	OwnerUid   string
	OtherUid   string
	Type       uint8
	State      uint8
	CreateTime uint64
}

type SignalContent

type SignalContent struct {
	Id         string
	Uid        string
	Type       uint8
	State      uint8
	Content    string
	CreateTime uint64
	UpdateTime uint64
}

Jump to

Keyboard shortcuts

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