You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/internal/msggateway/new/message_handler.go

50 lines
1.5 KiB

package new
import "context"
type Req struct {
ReqIdentifier int32 `json:"reqIdentifier" validate:"required"`
Token string `json:"token" `
SendID string `json:"sendID" validate:"required"`
OperationID string `json:"operationID" validate:"required"`
MsgIncr string `json:"msgIncr" validate:"required"`
Data []byte `json:"data"`
}
type MessageHandler interface {
GetSeq(context context.Context, data Req) ([]byte, error)
SendMessage(context context.Context, data Req) ([]byte, error)
SendSignalMessage(context context.Context, data Req) ([]byte, error)
PullMessageBySeqList(context context.Context, data Req) ([]byte, error)
UserLogout(context context.Context, data Req) ([]byte, error)
SetUserDeviceBackground(context context.Context, data Req) ([]byte, error)
}
var _ MessageHandler = (*GrpcHandler)(nil)
type GrpcHandler struct {
}
func (g GrpcHandler) GetSeq(context context.Context, data Req) ([]byte, error) {
panic("implement me")
}
func (g GrpcHandler) SendMessage(context context.Context, data Req) ([]byte, error) {
panic("implement me")
}
func (g GrpcHandler) SendSignalMessage(context context.Context, data Req) ([]byte, error) {
panic("implement me")
}
func (g GrpcHandler) PullMessageBySeqList(context context.Context, data Req) ([]byte, error) {
panic("implement me")
}
func (g GrpcHandler) UserLogout(context context.Context, data Req) ([]byte, error) {
panic("implement me")
}
func (g GrpcHandler) SetUserDeviceBackground(context context.Context, data Req) ([]byte, error) {
panic("implement me")
}