wslogic

package
v0.0.0-...-efd9455 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MaxSeqResp

type MaxSeqResp struct {
	MaxSeq int64 `json:"maxSeq"`
}

type MsgData

type MsgData struct {
	PlatformID  int32                  `mapstructure:"platformID" validate:"required"`
	SessionType int32                  `mapstructure:"sessionType" validate:"required"`
	MsgFrom     int32                  `mapstructure:"msgFrom" validate:"required"`
	ContentType int32                  `mapstructure:"contentType" validate:"required"`
	RecvID      string                 `mapstructure:"recvID" validate:"required"`
	ForceList   []string               `mapstructure:"forceList"`
	Content     string                 `mapstructure:"content" validate:"required"`
	Options     map[string]interface{} `mapstructure:"options" validate:"required"`
	ClientMsgID string                 `mapstructure:"clientMsgID" validate:"required"`
	OfflineInfo map[string]interface{} `mapstructure:"offlineInfo" validate:"required"`
	Ext         map[string]interface{} `mapstructure:"ext"`
}

type MsggatewayLogic

type MsggatewayLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewMsggatewayLogic

func NewMsggatewayLogic(ctx context.Context, svcCtx *wssvc.ServiceContext) *MsggatewayLogic

func (*MsggatewayLogic) DelUserConn

func (l *MsggatewayLogic) DelUserConn(uid string, platform string)

func (*MsggatewayLogic) GetUserConn

func (l *MsggatewayLogic) GetUserConn(uid string, platform string) *UserConn

func (*MsggatewayLogic) Msggateway

func (l *MsggatewayLogic) Msggateway(req *types.Request) (*types.Response, bool)

func (*MsggatewayLogic) SendMsgToUser

func (l *MsggatewayLogic) SendMsgToUser(ctx context.Context, conn *UserConn, bMsg []byte, in *pb.OnlinePushMsgReq, RecvPlatForm, RecvID string) (ResultCode int64)

func (*MsggatewayLogic) WsUpgrade

func (l *MsggatewayLogic) WsUpgrade(uid string, req *types.Request, w http.ResponseWriter, r *http.Request, header http.Header) error

type PullMessageResp

type PullMessageResp struct {
}

type Req

type Req struct {
	ReqIdentifier int32  `json:"reqIdentifier" validate:"required"`
	Token         string `json:"token" `
	SendID        string `json:"sendID" validate:"required"`
	Data          []byte `json:"data"`
}

type Resp

type Resp struct {
	ReqIdentifier int32  `json:"reqIdentifier"`
	ErrCode       uint32 `json:"errCode"`
	ErrMsg        string `json:"errMsg"`
	Data          []byte `json:"data"`
}

type SeqData

type SeqData struct {
	SeqBegin int64 `mapstructure:"seqBegin" validate:"required"`
	SeqEnd   int64 `mapstructure:"seqEnd" validate:"required"`
}

type SeqListData

type SeqListData struct {
	SeqList []int64 `mapstructure:"seqList" validate:"required"`
}

type UserConn

type UserConn struct {
	*websocket.Conn
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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