Documentation ¶
Index ¶
- Constants
- Variables
- func FindMeta(meta []*Meta, key string) (interface{}, bool)
- func Marshal(p Packet) []byte
- func Read(r io.Reader) (interface{}, error)
- type BasicPkt
- type ContentType
- func (ContentType) Descriptor() protoreflect.EnumDescriptor
- func (x ContentType) Enum() *ContentType
- func (ContentType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ContentType) Number() protoreflect.EnumNumber
- func (x ContentType) String() string
- func (ContentType) Type() protoreflect.EnumType
- type ErrorResp
- type Flag
- type GroupCreateNotify
- func (*GroupCreateNotify) Descriptor() ([]byte, []int)deprecated
- func (x *GroupCreateNotify) GetGroupId() string
- func (x *GroupCreateNotify) GetMembers() []string
- func (*GroupCreateNotify) ProtoMessage()
- func (x *GroupCreateNotify) ProtoReflect() protoreflect.Message
- func (x *GroupCreateNotify) Reset()
- func (x *GroupCreateNotify) String() string
- type GroupCreateReq
- func (*GroupCreateReq) Descriptor() ([]byte, []int)deprecated
- func (x *GroupCreateReq) GetAvatar() string
- func (x *GroupCreateReq) GetIntroduction() string
- func (x *GroupCreateReq) GetMembers() []string
- func (x *GroupCreateReq) GetName() string
- func (x *GroupCreateReq) GetOwner() string
- func (*GroupCreateReq) ProtoMessage()
- func (x *GroupCreateReq) ProtoReflect() protoreflect.Message
- func (x *GroupCreateReq) Reset()
- func (x *GroupCreateReq) String() string
- type GroupCreateResp
- type GroupGetReq
- type GroupGetResp
- func (*GroupGetResp) Descriptor() ([]byte, []int)deprecated
- func (x *GroupGetResp) GetAvatar() string
- func (x *GroupGetResp) GetCreatedAt() int64
- func (x *GroupGetResp) GetId() string
- func (x *GroupGetResp) GetIntroduction() string
- func (x *GroupGetResp) GetMembers() []*Member
- func (x *GroupGetResp) GetName() string
- func (x *GroupGetResp) GetOwner() string
- func (*GroupGetResp) ProtoMessage()
- func (x *GroupGetResp) ProtoReflect() protoreflect.Message
- func (x *GroupGetResp) Reset()
- func (x *GroupGetResp) String() string
- type GroupJoinNotify
- func (*GroupJoinNotify) Descriptor() ([]byte, []int)deprecated
- func (x *GroupJoinNotify) GetAccount() string
- func (x *GroupJoinNotify) GetGroupId() string
- func (*GroupJoinNotify) ProtoMessage()
- func (x *GroupJoinNotify) ProtoReflect() protoreflect.Message
- func (x *GroupJoinNotify) Reset()
- func (x *GroupJoinNotify) String() string
- type GroupJoinReq
- func (*GroupJoinReq) Descriptor() ([]byte, []int)deprecated
- func (x *GroupJoinReq) GetAccount() string
- func (x *GroupJoinReq) GetGroupId() string
- func (*GroupJoinReq) ProtoMessage()
- func (x *GroupJoinReq) ProtoReflect() protoreflect.Message
- func (x *GroupJoinReq) Reset()
- func (x *GroupJoinReq) String() string
- type GroupQuitNotify
- func (*GroupQuitNotify) Descriptor() ([]byte, []int)deprecated
- func (x *GroupQuitNotify) GetAccount() string
- func (x *GroupQuitNotify) GetGroupId() string
- func (*GroupQuitNotify) ProtoMessage()
- func (x *GroupQuitNotify) ProtoReflect() protoreflect.Message
- func (x *GroupQuitNotify) Reset()
- func (x *GroupQuitNotify) String() string
- type GroupQuitReq
- func (*GroupQuitReq) Descriptor() ([]byte, []int)deprecated
- func (x *GroupQuitReq) GetAccount() string
- func (x *GroupQuitReq) GetGroupId() string
- func (*GroupQuitReq) ProtoMessage()
- func (x *GroupQuitReq) ProtoReflect() protoreflect.Message
- func (x *GroupQuitReq) Reset()
- func (x *GroupQuitReq) String() string
- type Header
- func (*Header) Descriptor() ([]byte, []int)deprecated
- func (x *Header) GetChannelId() string
- func (x *Header) GetCommand() string
- func (x *Header) GetDest() string
- func (x *Header) GetFlag() Flag
- func (x *Header) GetMeta() []*Meta
- func (x *Header) GetSequence() uint32
- func (x *Header) GetStatus() Status
- func (*Header) ProtoMessage()
- func (x *Header) ProtoReflect() protoreflect.Message
- func (x *Header) Reset()
- func (h *Header) ServiceName() string
- func (x *Header) String() string
- type HeaderOption
- type InnerHandshakeReq
- type InnerHandshakeResp
- func (*InnerHandshakeResp) Descriptor() ([]byte, []int)deprecated
- func (x *InnerHandshakeResp) GetCode() uint32
- func (x *InnerHandshakeResp) GetError() string
- func (*InnerHandshakeResp) ProtoMessage()
- func (x *InnerHandshakeResp) ProtoReflect() protoreflect.Message
- func (x *InnerHandshakeResp) Reset()
- func (x *InnerHandshakeResp) String() string
- type KickoutNotify
- type LogicPkt
- func (p *LogicPkt) AddMeta(m ...*Meta)
- func (p *LogicPkt) AddStringMeta(key, value string)
- func (p *LogicPkt) Decode(r io.Reader) error
- func (p *LogicPkt) DelMeta(key string)
- func (p *LogicPkt) Encode(w io.Writer) error
- func (p *LogicPkt) GetMeta(key string) (interface{}, bool)
- func (p *LogicPkt) ReadBody(val proto.Message) error
- func (p *LogicPkt) String() string
- func (p *LogicPkt) StringBody() string
- func (p *LogicPkt) WriteBody(val proto.Message) *LogicPkt
- type LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReq) GetIsp() string
- func (x *LoginReq) GetTags() []string
- func (x *LoginReq) GetToken() string
- func (x *LoginReq) GetZone() string
- func (*LoginReq) ProtoMessage()
- func (x *LoginReq) ProtoReflect() protoreflect.Message
- func (x *LoginReq) Reset()
- func (x *LoginReq) String() string
- type LoginResp
- type Member
- func (*Member) Descriptor() ([]byte, []int)deprecated
- func (x *Member) GetAccount() string
- func (x *Member) GetAlias() string
- func (x *Member) GetAvatar() string
- func (x *Member) GetJoinTime() int64
- func (*Member) ProtoMessage()
- func (x *Member) ProtoReflect() protoreflect.Message
- func (x *Member) Reset()
- func (x *Member) String() string
- type MessageAckReq
- type MessageContent
- func (*MessageContent) Descriptor() ([]byte, []int)deprecated
- func (x *MessageContent) GetBody() string
- func (x *MessageContent) GetExtra() string
- func (x *MessageContent) GetMessageId() int64
- func (x *MessageContent) GetType() int32
- func (*MessageContent) ProtoMessage()
- func (x *MessageContent) ProtoReflect() protoreflect.Message
- func (x *MessageContent) Reset()
- func (x *MessageContent) String() string
- type MessageContentReq
- func (*MessageContentReq) Descriptor() ([]byte, []int)deprecated
- func (x *MessageContentReq) GetMessageIds() []int64
- func (*MessageContentReq) ProtoMessage()
- func (x *MessageContentReq) ProtoReflect() protoreflect.Message
- func (x *MessageContentReq) Reset()
- func (x *MessageContentReq) String() string
- type MessageContentResp
- func (*MessageContentResp) Descriptor() ([]byte, []int)deprecated
- func (x *MessageContentResp) GetContents() []*MessageContent
- func (*MessageContentResp) ProtoMessage()
- func (x *MessageContentResp) ProtoReflect() protoreflect.Message
- func (x *MessageContentResp) Reset()
- func (x *MessageContentResp) String() string
- type MessageIndex
- func (*MessageIndex) Descriptor() ([]byte, []int)deprecated
- func (x *MessageIndex) GetAccount() string
- func (x *MessageIndex) GetDirection() int32
- func (x *MessageIndex) GetGroup() string
- func (x *MessageIndex) GetMessageId() int64
- func (x *MessageIndex) GetSendTime() int64
- func (*MessageIndex) ProtoMessage()
- func (x *MessageIndex) ProtoReflect() protoreflect.Message
- func (x *MessageIndex) Reset()
- func (x *MessageIndex) String() string
- type MessageIndexReq
- type MessageIndexResp
- func (*MessageIndexResp) Descriptor() ([]byte, []int)deprecated
- func (x *MessageIndexResp) GetIndexes() []*MessageIndex
- func (*MessageIndexResp) ProtoMessage()
- func (x *MessageIndexResp) ProtoReflect() protoreflect.Message
- func (x *MessageIndexResp) Reset()
- func (x *MessageIndexResp) String() string
- type MessagePush
- func (*MessagePush) Descriptor() ([]byte, []int)deprecated
- func (x *MessagePush) GetBody() string
- func (x *MessagePush) GetExtra() string
- func (x *MessagePush) GetMessageId() int64
- func (x *MessagePush) GetSendTime() int64
- func (x *MessagePush) GetSender() string
- func (x *MessagePush) GetType() int32
- func (*MessagePush) ProtoMessage()
- func (x *MessagePush) ProtoReflect() protoreflect.Message
- func (x *MessagePush) Reset()
- func (x *MessagePush) String() string
- type MessageReq
- func (*MessageReq) Descriptor() ([]byte, []int)deprecated
- func (x *MessageReq) GetBody() string
- func (x *MessageReq) GetExtra() string
- func (x *MessageReq) GetType() int32
- func (*MessageReq) ProtoMessage()
- func (x *MessageReq) ProtoReflect() protoreflect.Message
- func (x *MessageReq) Reset()
- func (x *MessageReq) String() string
- type MessageResp
- func (*MessageResp) Descriptor() ([]byte, []int)deprecated
- func (x *MessageResp) GetMessageId() int64
- func (x *MessageResp) GetSendTime() int64
- func (*MessageResp) ProtoMessage()
- func (x *MessageResp) ProtoReflect() protoreflect.Message
- func (x *MessageResp) Reset()
- func (x *MessageResp) String() string
- type Meta
- type MetaType
- type Packet
- type Session
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) GetAccount() string
- func (x *Session) GetApp() string
- func (x *Session) GetChannelId() string
- func (x *Session) GetDevice() string
- func (x *Session) GetGateId() string
- func (x *Session) GetIsp() string
- func (x *Session) GetRemoteIp() string
- func (x *Session) GetTags() []string
- func (x *Session) GetZone() string
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) String() string
- type Status
Constants ¶
const ( CodePing = uint16(1) CodePong = uint16(2) )
basic pkt code
Variables ¶
var ( Status_name = map[int32]string{ 0: "Success", 100: "NoDestination", 101: "InvalidPacketBody", 103: "InvalidCommand", 105: "Unauthorized", 300: "SystemException", 301: "NotImplemented", 404: "SessionNotFound", } Status_value = map[string]int32{ "Success": 0, "NoDestination": 100, "InvalidPacketBody": 101, "InvalidCommand": 103, "Unauthorized": 105, "SystemException": 300, "NotImplemented": 301, "SessionNotFound": 404, } )
Enum value maps for Status.
var ( MetaType_name = map[int32]string{ 0: "int", 1: "string", 2: "float", } MetaType_value = map[string]int32{ "int": 0, "string": 1, "float": 2, } )
Enum value maps for MetaType.
var ( ContentType_name = map[int32]string{ 0: "Protobuf", 1: "Json", } ContentType_value = map[string]int32{ "Protobuf": 0, "Json": 1, } )
Enum value maps for ContentType.
var ( Flag_name = map[int32]string{ 0: "Request", 1: "Response", 2: "Push", } Flag_value = map[string]int32{ "Request": 0, "Response": 1, "Push": 2, } )
Enum value maps for Flag.
var File_common_proto protoreflect.FileDescriptor
var File_protocol_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type ContentType ¶
type ContentType int32
const ( ContentType_Protobuf ContentType = 0 ContentType_Json ContentType = 1 )
func (ContentType) Descriptor ¶
func (ContentType) Descriptor() protoreflect.EnumDescriptor
func (ContentType) Enum ¶
func (x ContentType) Enum() *ContentType
func (ContentType) EnumDescriptor
deprecated
func (ContentType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ContentType.Descriptor instead.
func (ContentType) Number ¶
func (x ContentType) Number() protoreflect.EnumNumber
func (ContentType) String ¶
func (x ContentType) String() string
func (ContentType) Type ¶
func (ContentType) Type() protoreflect.EnumType
type ErrorResp ¶
type ErrorResp struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ErrorResp) Descriptor
deprecated
func (*ErrorResp) GetMessage ¶
func (*ErrorResp) ProtoMessage ¶
func (*ErrorResp) ProtoMessage()
func (*ErrorResp) ProtoReflect ¶
func (x *ErrorResp) ProtoReflect() protoreflect.Message
type Flag ¶
type Flag int32
func (Flag) Descriptor ¶
func (Flag) Descriptor() protoreflect.EnumDescriptor
func (Flag) EnumDescriptor
deprecated
func (Flag) Number ¶
func (x Flag) Number() protoreflect.EnumNumber
func (Flag) Type ¶
func (Flag) Type() protoreflect.EnumType
type GroupCreateNotify ¶
type GroupCreateNotify struct { GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` Members []string `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` // contains filtered or unexported fields }
func (*GroupCreateNotify) Descriptor
deprecated
func (*GroupCreateNotify) Descriptor() ([]byte, []int)
Deprecated: Use GroupCreateNotify.ProtoReflect.Descriptor instead.
func (*GroupCreateNotify) GetGroupId ¶
func (x *GroupCreateNotify) GetGroupId() string
func (*GroupCreateNotify) GetMembers ¶
func (x *GroupCreateNotify) GetMembers() []string
func (*GroupCreateNotify) ProtoMessage ¶
func (*GroupCreateNotify) ProtoMessage()
func (*GroupCreateNotify) ProtoReflect ¶
func (x *GroupCreateNotify) ProtoReflect() protoreflect.Message
func (*GroupCreateNotify) Reset ¶
func (x *GroupCreateNotify) Reset()
func (*GroupCreateNotify) String ¶
func (x *GroupCreateNotify) String() string
type GroupCreateReq ¶
type GroupCreateReq struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` Introduction string `protobuf:"bytes,3,opt,name=introduction,proto3" json:"introduction,omitempty"` Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` Members []string `protobuf:"bytes,5,rep,name=members,proto3" json:"members,omitempty"` // contains filtered or unexported fields }
func (*GroupCreateReq) Descriptor
deprecated
func (*GroupCreateReq) Descriptor() ([]byte, []int)
Deprecated: Use GroupCreateReq.ProtoReflect.Descriptor instead.
func (*GroupCreateReq) GetAvatar ¶
func (x *GroupCreateReq) GetAvatar() string
func (*GroupCreateReq) GetIntroduction ¶
func (x *GroupCreateReq) GetIntroduction() string
func (*GroupCreateReq) GetMembers ¶
func (x *GroupCreateReq) GetMembers() []string
func (*GroupCreateReq) GetName ¶
func (x *GroupCreateReq) GetName() string
func (*GroupCreateReq) GetOwner ¶
func (x *GroupCreateReq) GetOwner() string
func (*GroupCreateReq) ProtoMessage ¶
func (*GroupCreateReq) ProtoMessage()
func (*GroupCreateReq) ProtoReflect ¶
func (x *GroupCreateReq) ProtoReflect() protoreflect.Message
func (*GroupCreateReq) Reset ¶
func (x *GroupCreateReq) Reset()
func (*GroupCreateReq) String ¶
func (x *GroupCreateReq) String() string
type GroupCreateResp ¶
type GroupCreateResp struct { GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // contains filtered or unexported fields }
func (*GroupCreateResp) Descriptor
deprecated
func (*GroupCreateResp) Descriptor() ([]byte, []int)
Deprecated: Use GroupCreateResp.ProtoReflect.Descriptor instead.
func (*GroupCreateResp) GetGroupId ¶
func (x *GroupCreateResp) GetGroupId() string
func (*GroupCreateResp) ProtoMessage ¶
func (*GroupCreateResp) ProtoMessage()
func (*GroupCreateResp) ProtoReflect ¶
func (x *GroupCreateResp) ProtoReflect() protoreflect.Message
func (*GroupCreateResp) Reset ¶
func (x *GroupCreateResp) Reset()
func (*GroupCreateResp) String ¶
func (x *GroupCreateResp) String() string
type GroupGetReq ¶
type GroupGetReq struct { GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // contains filtered or unexported fields }
func (*GroupGetReq) Descriptor
deprecated
func (*GroupGetReq) Descriptor() ([]byte, []int)
Deprecated: Use GroupGetReq.ProtoReflect.Descriptor instead.
func (*GroupGetReq) GetGroupId ¶
func (x *GroupGetReq) GetGroupId() string
func (*GroupGetReq) ProtoMessage ¶
func (*GroupGetReq) ProtoMessage()
func (*GroupGetReq) ProtoReflect ¶
func (x *GroupGetReq) ProtoReflect() protoreflect.Message
func (*GroupGetReq) Reset ¶
func (x *GroupGetReq) Reset()
func (*GroupGetReq) String ¶
func (x *GroupGetReq) String() string
type GroupGetResp ¶
type GroupGetResp struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` Introduction string `protobuf:"bytes,4,opt,name=introduction,proto3" json:"introduction,omitempty"` Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` Members []*Member `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` CreatedAt int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*GroupGetResp) Descriptor
deprecated
func (*GroupGetResp) Descriptor() ([]byte, []int)
Deprecated: Use GroupGetResp.ProtoReflect.Descriptor instead.
func (*GroupGetResp) GetAvatar ¶
func (x *GroupGetResp) GetAvatar() string
func (*GroupGetResp) GetCreatedAt ¶
func (x *GroupGetResp) GetCreatedAt() int64
func (*GroupGetResp) GetId ¶
func (x *GroupGetResp) GetId() string
func (*GroupGetResp) GetIntroduction ¶
func (x *GroupGetResp) GetIntroduction() string
func (*GroupGetResp) GetMembers ¶
func (x *GroupGetResp) GetMembers() []*Member
func (*GroupGetResp) GetName ¶
func (x *GroupGetResp) GetName() string
func (*GroupGetResp) GetOwner ¶
func (x *GroupGetResp) GetOwner() string
func (*GroupGetResp) ProtoMessage ¶
func (*GroupGetResp) ProtoMessage()
func (*GroupGetResp) ProtoReflect ¶
func (x *GroupGetResp) ProtoReflect() protoreflect.Message
func (*GroupGetResp) Reset ¶
func (x *GroupGetResp) Reset()
func (*GroupGetResp) String ¶
func (x *GroupGetResp) String() string
type GroupJoinNotify ¶
type GroupJoinNotify struct { GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` // contains filtered or unexported fields }
func (*GroupJoinNotify) Descriptor
deprecated
func (*GroupJoinNotify) Descriptor() ([]byte, []int)
Deprecated: Use GroupJoinNotify.ProtoReflect.Descriptor instead.
func (*GroupJoinNotify) GetAccount ¶
func (x *GroupJoinNotify) GetAccount() string
func (*GroupJoinNotify) GetGroupId ¶
func (x *GroupJoinNotify) GetGroupId() string
func (*GroupJoinNotify) ProtoMessage ¶
func (*GroupJoinNotify) ProtoMessage()
func (*GroupJoinNotify) ProtoReflect ¶
func (x *GroupJoinNotify) ProtoReflect() protoreflect.Message
func (*GroupJoinNotify) Reset ¶
func (x *GroupJoinNotify) Reset()
func (*GroupJoinNotify) String ¶
func (x *GroupJoinNotify) String() string
type GroupJoinReq ¶
type GroupJoinReq struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // contains filtered or unexported fields }
func (*GroupJoinReq) Descriptor
deprecated
func (*GroupJoinReq) Descriptor() ([]byte, []int)
Deprecated: Use GroupJoinReq.ProtoReflect.Descriptor instead.
func (*GroupJoinReq) GetAccount ¶
func (x *GroupJoinReq) GetAccount() string
func (*GroupJoinReq) GetGroupId ¶
func (x *GroupJoinReq) GetGroupId() string
func (*GroupJoinReq) ProtoMessage ¶
func (*GroupJoinReq) ProtoMessage()
func (*GroupJoinReq) ProtoReflect ¶
func (x *GroupJoinReq) ProtoReflect() protoreflect.Message
func (*GroupJoinReq) Reset ¶
func (x *GroupJoinReq) Reset()
func (*GroupJoinReq) String ¶
func (x *GroupJoinReq) String() string
type GroupQuitNotify ¶
type GroupQuitNotify struct { GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` // contains filtered or unexported fields }
func (*GroupQuitNotify) Descriptor
deprecated
func (*GroupQuitNotify) Descriptor() ([]byte, []int)
Deprecated: Use GroupQuitNotify.ProtoReflect.Descriptor instead.
func (*GroupQuitNotify) GetAccount ¶
func (x *GroupQuitNotify) GetAccount() string
func (*GroupQuitNotify) GetGroupId ¶
func (x *GroupQuitNotify) GetGroupId() string
func (*GroupQuitNotify) ProtoMessage ¶
func (*GroupQuitNotify) ProtoMessage()
func (*GroupQuitNotify) ProtoReflect ¶
func (x *GroupQuitNotify) ProtoReflect() protoreflect.Message
func (*GroupQuitNotify) Reset ¶
func (x *GroupQuitNotify) Reset()
func (*GroupQuitNotify) String ¶
func (x *GroupQuitNotify) String() string
type GroupQuitReq ¶
type GroupQuitReq struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // contains filtered or unexported fields }
func (*GroupQuitReq) Descriptor
deprecated
func (*GroupQuitReq) Descriptor() ([]byte, []int)
Deprecated: Use GroupQuitReq.ProtoReflect.Descriptor instead.
func (*GroupQuitReq) GetAccount ¶
func (x *GroupQuitReq) GetAccount() string
func (*GroupQuitReq) GetGroupId ¶
func (x *GroupQuitReq) GetGroupId() string
func (*GroupQuitReq) ProtoMessage ¶
func (*GroupQuitReq) ProtoMessage()
func (*GroupQuitReq) ProtoReflect ¶
func (x *GroupQuitReq) ProtoReflect() protoreflect.Message
func (*GroupQuitReq) Reset ¶
func (x *GroupQuitReq) Reset()
func (*GroupQuitReq) String ¶
func (x *GroupQuitReq) String() string
type Header ¶
type Header struct { Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` // sender channel id ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` Sequence uint32 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` Flag Flag `protobuf:"varint,4,opt,name=flag,proto3,enum=pkt.Flag" json:"flag,omitempty"` Status Status `protobuf:"varint,5,opt,name=status,proto3,enum=pkt.Status" json:"status,omitempty"` // destination is defined as a account, group or room Dest string `protobuf:"bytes,6,opt,name=dest,proto3" json:"dest,omitempty"` Meta []*Meta `protobuf:"bytes,7,rep,name=meta,proto3" json:"meta,omitempty"` // contains filtered or unexported fields }
func (*Header) Descriptor
deprecated
func (*Header) GetChannelId ¶
func (*Header) GetCommand ¶
func (*Header) GetSequence ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ProtoReflect ¶
func (x *Header) ProtoReflect() protoreflect.Message
func (*Header) ServiceName ¶
type HeaderOption ¶
type HeaderOption func(*Header)
func WithChannel ¶
func WithChannel(channelID string) HeaderOption
func WithDest ¶
func WithDest(dest string) HeaderOption
func WithSeq ¶
func WithSeq(seq uint32) HeaderOption
func WithStatus ¶
func WithStatus(status Status) HeaderOption
type InnerHandshakeReq ¶
type InnerHandshakeReq struct { ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` // contains filtered or unexported fields }
func (*InnerHandshakeReq) Descriptor
deprecated
func (*InnerHandshakeReq) Descriptor() ([]byte, []int)
Deprecated: Use InnerHandshakeReq.ProtoReflect.Descriptor instead.
func (*InnerHandshakeReq) GetServiceId ¶
func (x *InnerHandshakeReq) GetServiceId() string
func (*InnerHandshakeReq) ProtoMessage ¶
func (*InnerHandshakeReq) ProtoMessage()
func (*InnerHandshakeReq) ProtoReflect ¶
func (x *InnerHandshakeReq) ProtoReflect() protoreflect.Message
func (*InnerHandshakeReq) Reset ¶
func (x *InnerHandshakeReq) Reset()
func (*InnerHandshakeReq) String ¶
func (x *InnerHandshakeReq) String() string
type InnerHandshakeResp ¶
type InnerHandshakeResp struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*InnerHandshakeResp) Descriptor
deprecated
func (*InnerHandshakeResp) Descriptor() ([]byte, []int)
Deprecated: Use InnerHandshakeResp.ProtoReflect.Descriptor instead.
func (*InnerHandshakeResp) GetCode ¶
func (x *InnerHandshakeResp) GetCode() uint32
func (*InnerHandshakeResp) GetError ¶
func (x *InnerHandshakeResp) GetError() string
func (*InnerHandshakeResp) ProtoMessage ¶
func (*InnerHandshakeResp) ProtoMessage()
func (*InnerHandshakeResp) ProtoReflect ¶
func (x *InnerHandshakeResp) ProtoReflect() protoreflect.Message
func (*InnerHandshakeResp) Reset ¶
func (x *InnerHandshakeResp) Reset()
func (*InnerHandshakeResp) String ¶
func (x *InnerHandshakeResp) String() string
type KickoutNotify ¶
type KickoutNotify struct { ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // contains filtered or unexported fields }
func (*KickoutNotify) Descriptor
deprecated
func (*KickoutNotify) Descriptor() ([]byte, []int)
Deprecated: Use KickoutNotify.ProtoReflect.Descriptor instead.
func (*KickoutNotify) GetChannelId ¶
func (x *KickoutNotify) GetChannelId() string
func (*KickoutNotify) ProtoMessage ¶
func (*KickoutNotify) ProtoMessage()
func (*KickoutNotify) ProtoReflect ¶
func (x *KickoutNotify) ProtoReflect() protoreflect.Message
func (*KickoutNotify) Reset ¶
func (x *KickoutNotify) Reset()
func (*KickoutNotify) String ¶
func (x *KickoutNotify) String() string
type LogicPkt ¶
LogicPkt 定义了网关对外的client消息结构
func New ¶
func New(command string, options ...HeaderOption) *LogicPkt
func (*LogicPkt) AddStringMeta ¶
func (*LogicPkt) StringBody ¶
type LoginReq ¶
type LoginReq struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Isp string `protobuf:"bytes,2,opt,name=isp,proto3" json:"isp,omitempty"` Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty"` // location code Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` // contains filtered or unexported fields }
func (*LoginReq) Descriptor
deprecated
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
type LoginResp ¶
type LoginResp struct { ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` // contains filtered or unexported fields }
func (*LoginResp) Descriptor
deprecated
func (*LoginResp) GetAccount ¶
func (*LoginResp) GetChannelId ¶
func (*LoginResp) ProtoMessage ¶
func (*LoginResp) ProtoMessage()
func (*LoginResp) ProtoReflect ¶
func (x *LoginResp) ProtoReflect() protoreflect.Message
type Member ¶
type Member struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` JoinTime int64 `protobuf:"varint,4,opt,name=join_time,json=joinTime,proto3" json:"join_time,omitempty"` // contains filtered or unexported fields }
func (*Member) Descriptor
deprecated
func (*Member) GetAccount ¶
func (*Member) GetJoinTime ¶
func (*Member) ProtoMessage ¶
func (*Member) ProtoMessage()
func (*Member) ProtoReflect ¶
func (x *Member) ProtoReflect() protoreflect.Message
type MessageAckReq ¶
type MessageAckReq struct { MessageId int64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // contains filtered or unexported fields }
func (*MessageAckReq) Descriptor
deprecated
func (*MessageAckReq) Descriptor() ([]byte, []int)
Deprecated: Use MessageAckReq.ProtoReflect.Descriptor instead.
func (*MessageAckReq) GetMessageId ¶
func (x *MessageAckReq) GetMessageId() int64
func (*MessageAckReq) ProtoMessage ¶
func (*MessageAckReq) ProtoMessage()
func (*MessageAckReq) ProtoReflect ¶
func (x *MessageAckReq) ProtoReflect() protoreflect.Message
func (*MessageAckReq) Reset ¶
func (x *MessageAckReq) Reset()
func (*MessageAckReq) String ¶
func (x *MessageAckReq) String() string
type MessageContent ¶
type MessageContent struct { MessageId int64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` Extra string `protobuf:"bytes,4,opt,name=extra,proto3" json:"extra,omitempty"` // contains filtered or unexported fields }
func (*MessageContent) Descriptor
deprecated
func (*MessageContent) Descriptor() ([]byte, []int)
Deprecated: Use MessageContent.ProtoReflect.Descriptor instead.
func (*MessageContent) GetBody ¶
func (x *MessageContent) GetBody() string
func (*MessageContent) GetExtra ¶
func (x *MessageContent) GetExtra() string
func (*MessageContent) GetMessageId ¶
func (x *MessageContent) GetMessageId() int64
func (*MessageContent) GetType ¶
func (x *MessageContent) GetType() int32
func (*MessageContent) ProtoMessage ¶
func (*MessageContent) ProtoMessage()
func (*MessageContent) ProtoReflect ¶
func (x *MessageContent) ProtoReflect() protoreflect.Message
func (*MessageContent) Reset ¶
func (x *MessageContent) Reset()
func (*MessageContent) String ¶
func (x *MessageContent) String() string
type MessageContentReq ¶
type MessageContentReq struct { MessageIds []int64 `protobuf:"varint,1,rep,packed,name=message_ids,json=messageIds,proto3" json:"message_ids,omitempty"` // contains filtered or unexported fields }
func (*MessageContentReq) Descriptor
deprecated
func (*MessageContentReq) Descriptor() ([]byte, []int)
Deprecated: Use MessageContentReq.ProtoReflect.Descriptor instead.
func (*MessageContentReq) GetMessageIds ¶
func (x *MessageContentReq) GetMessageIds() []int64
func (*MessageContentReq) ProtoMessage ¶
func (*MessageContentReq) ProtoMessage()
func (*MessageContentReq) ProtoReflect ¶
func (x *MessageContentReq) ProtoReflect() protoreflect.Message
func (*MessageContentReq) Reset ¶
func (x *MessageContentReq) Reset()
func (*MessageContentReq) String ¶
func (x *MessageContentReq) String() string
type MessageContentResp ¶
type MessageContentResp struct { Contents []*MessageContent `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents,omitempty"` // contains filtered or unexported fields }
func (*MessageContentResp) Descriptor
deprecated
func (*MessageContentResp) Descriptor() ([]byte, []int)
Deprecated: Use MessageContentResp.ProtoReflect.Descriptor instead.
func (*MessageContentResp) GetContents ¶
func (x *MessageContentResp) GetContents() []*MessageContent
func (*MessageContentResp) ProtoMessage ¶
func (*MessageContentResp) ProtoMessage()
func (*MessageContentResp) ProtoReflect ¶
func (x *MessageContentResp) ProtoReflect() protoreflect.Message
func (*MessageContentResp) Reset ¶
func (x *MessageContentResp) Reset()
func (*MessageContentResp) String ¶
func (x *MessageContentResp) String() string
type MessageIndex ¶
type MessageIndex struct { MessageId int64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` Direction int32 `protobuf:"varint,2,opt,name=direction,proto3" json:"direction,omitempty"` SendTime int64 `protobuf:"varint,3,opt,name=send_time,json=sendTime,proto3" json:"send_time,omitempty"` Account string `protobuf:"bytes,4,opt,name=account,proto3" json:"account,omitempty"` Group string `protobuf:"bytes,5,opt,name=group,proto3" json:"group,omitempty"` // contains filtered or unexported fields }
func (*MessageIndex) Descriptor
deprecated
func (*MessageIndex) Descriptor() ([]byte, []int)
Deprecated: Use MessageIndex.ProtoReflect.Descriptor instead.
func (*MessageIndex) GetAccount ¶
func (x *MessageIndex) GetAccount() string
func (*MessageIndex) GetDirection ¶
func (x *MessageIndex) GetDirection() int32
func (*MessageIndex) GetGroup ¶
func (x *MessageIndex) GetGroup() string
func (*MessageIndex) GetMessageId ¶
func (x *MessageIndex) GetMessageId() int64
func (*MessageIndex) GetSendTime ¶
func (x *MessageIndex) GetSendTime() int64
func (*MessageIndex) ProtoMessage ¶
func (*MessageIndex) ProtoMessage()
func (*MessageIndex) ProtoReflect ¶
func (x *MessageIndex) ProtoReflect() protoreflect.Message
func (*MessageIndex) Reset ¶
func (x *MessageIndex) Reset()
func (*MessageIndex) String ¶
func (x *MessageIndex) String() string
type MessageIndexReq ¶
type MessageIndexReq struct { MessageId int64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // contains filtered or unexported fields }
func (*MessageIndexReq) Descriptor
deprecated
func (*MessageIndexReq) Descriptor() ([]byte, []int)
Deprecated: Use MessageIndexReq.ProtoReflect.Descriptor instead.
func (*MessageIndexReq) GetMessageId ¶
func (x *MessageIndexReq) GetMessageId() int64
func (*MessageIndexReq) ProtoMessage ¶
func (*MessageIndexReq) ProtoMessage()
func (*MessageIndexReq) ProtoReflect ¶
func (x *MessageIndexReq) ProtoReflect() protoreflect.Message
func (*MessageIndexReq) Reset ¶
func (x *MessageIndexReq) Reset()
func (*MessageIndexReq) String ¶
func (x *MessageIndexReq) String() string
type MessageIndexResp ¶
type MessageIndexResp struct { Indexes []*MessageIndex `protobuf:"bytes,1,rep,name=indexes,proto3" json:"indexes,omitempty"` // contains filtered or unexported fields }
func (*MessageIndexResp) Descriptor
deprecated
func (*MessageIndexResp) Descriptor() ([]byte, []int)
Deprecated: Use MessageIndexResp.ProtoReflect.Descriptor instead.
func (*MessageIndexResp) GetIndexes ¶
func (x *MessageIndexResp) GetIndexes() []*MessageIndex
func (*MessageIndexResp) ProtoMessage ¶
func (*MessageIndexResp) ProtoMessage()
func (*MessageIndexResp) ProtoReflect ¶
func (x *MessageIndexResp) ProtoReflect() protoreflect.Message
func (*MessageIndexResp) Reset ¶
func (x *MessageIndexResp) Reset()
func (*MessageIndexResp) String ¶
func (x *MessageIndexResp) String() string
type MessagePush ¶
type MessagePush struct { MessageId int64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` Extra string `protobuf:"bytes,4,opt,name=extra,proto3" json:"extra,omitempty"` Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` SendTime int64 `protobuf:"varint,6,opt,name=send_time,json=sendTime,proto3" json:"send_time,omitempty"` // contains filtered or unexported fields }
func (*MessagePush) Descriptor
deprecated
func (*MessagePush) Descriptor() ([]byte, []int)
Deprecated: Use MessagePush.ProtoReflect.Descriptor instead.
func (*MessagePush) GetBody ¶
func (x *MessagePush) GetBody() string
func (*MessagePush) GetExtra ¶
func (x *MessagePush) GetExtra() string
func (*MessagePush) GetMessageId ¶
func (x *MessagePush) GetMessageId() int64
func (*MessagePush) GetSendTime ¶
func (x *MessagePush) GetSendTime() int64
func (*MessagePush) GetSender ¶
func (x *MessagePush) GetSender() string
func (*MessagePush) GetType ¶
func (x *MessagePush) GetType() int32
func (*MessagePush) ProtoMessage ¶
func (*MessagePush) ProtoMessage()
func (*MessagePush) ProtoReflect ¶
func (x *MessagePush) ProtoReflect() protoreflect.Message
func (*MessagePush) Reset ¶
func (x *MessagePush) Reset()
func (*MessagePush) String ¶
func (x *MessagePush) String() string
type MessageReq ¶
type MessageReq struct { Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` Extra string `protobuf:"bytes,3,opt,name=extra,proto3" json:"extra,omitempty"` // contains filtered or unexported fields }
chat message
func (*MessageReq) Descriptor
deprecated
func (*MessageReq) Descriptor() ([]byte, []int)
Deprecated: Use MessageReq.ProtoReflect.Descriptor instead.
func (*MessageReq) GetBody ¶
func (x *MessageReq) GetBody() string
func (*MessageReq) GetExtra ¶
func (x *MessageReq) GetExtra() string
func (*MessageReq) GetType ¶
func (x *MessageReq) GetType() int32
func (*MessageReq) ProtoMessage ¶
func (*MessageReq) ProtoMessage()
func (*MessageReq) ProtoReflect ¶
func (x *MessageReq) ProtoReflect() protoreflect.Message
func (*MessageReq) Reset ¶
func (x *MessageReq) Reset()
func (*MessageReq) String ¶
func (x *MessageReq) String() string
type MessageResp ¶
type MessageResp struct { MessageId int64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` SendTime int64 `protobuf:"varint,2,opt,name=send_time,json=sendTime,proto3" json:"send_time,omitempty"` // contains filtered or unexported fields }
func (*MessageResp) Descriptor
deprecated
func (*MessageResp) Descriptor() ([]byte, []int)
Deprecated: Use MessageResp.ProtoReflect.Descriptor instead.
func (*MessageResp) GetMessageId ¶
func (x *MessageResp) GetMessageId() int64
func (*MessageResp) GetSendTime ¶
func (x *MessageResp) GetSendTime() int64
func (*MessageResp) ProtoMessage ¶
func (*MessageResp) ProtoMessage()
func (*MessageResp) ProtoReflect ¶
func (x *MessageResp) ProtoReflect() protoreflect.Message
func (*MessageResp) Reset ¶
func (x *MessageResp) Reset()
func (*MessageResp) String ¶
func (x *MessageResp) String() string
type Meta ¶
type Meta struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Type MetaType `protobuf:"varint,3,opt,name=type,proto3,enum=pkt.MetaType" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Meta) Descriptor
deprecated
func (*Meta) ProtoMessage ¶
func (*Meta) ProtoMessage()
func (*Meta) ProtoReflect ¶
func (x *Meta) ProtoReflect() protoreflect.Message
type MetaType ¶
type MetaType int32
func (MetaType) Descriptor ¶
func (MetaType) Descriptor() protoreflect.EnumDescriptor
func (MetaType) EnumDescriptor
deprecated
func (MetaType) Number ¶
func (x MetaType) Number() protoreflect.EnumNumber
func (MetaType) Type ¶
func (MetaType) Type() protoreflect.EnumType
type Session ¶
type Session struct { ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // session id GateId string `protobuf:"bytes,2,opt,name=gate_id,json=gateId,proto3" json:"gate_id,omitempty"` // gateway id Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"` Zone string `protobuf:"bytes,4,opt,name=zone,proto3" json:"zone,omitempty"` Isp string `protobuf:"bytes,5,opt,name=isp,proto3" json:"isp,omitempty"` RemoteIp string `protobuf:"bytes,6,opt,name=remote_ip,json=remoteIp,proto3" json:"remote_ip,omitempty"` Device string `protobuf:"bytes,7,opt,name=device,proto3" json:"device,omitempty"` App string `protobuf:"bytes,8,opt,name=app,proto3" json:"app,omitempty"` Tags []string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"` // contains filtered or unexported fields }
func (*Session) Descriptor
deprecated
func (*Session) GetAccount ¶
func (*Session) GetChannelId ¶
func (*Session) GetRemoteIp ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type Status ¶
type Status int32
status is a uint16 value
const ( Status_Success Status = 0 // client defined // client error 100-200 Status_NoDestination Status = 100 Status_InvalidPacketBody Status = 101 Status_InvalidCommand Status = 103 // server error 300-400 Status_SystemException Status = 300 Status_NotImplemented Status = 301 // specific error Status_SessionNotFound Status = 404 // session lost )
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType