Documentation ¶
Index ¶
- Variables
- type GroupTo
- type MsgReceiver
- func (*MsgReceiver) Descriptor() ([]byte, []int)deprecated
- func (x *MsgReceiver) GetGrp() *GroupTo
- func (x *MsgReceiver) GetPeerAddr() string
- func (m *MsgReceiver) GetTo() isMsgReceiver_To
- func (*MsgReceiver) ProtoMessage()
- func (x *MsgReceiver) ProtoReflect() protoreflect.Message
- func (x *MsgReceiver) Reset()
- func (x *MsgReceiver) String() string
- type MsgReceiver_Grp
- type MsgReceiver_PeerAddr
- type WSCryptoMsg
- func (*WSCryptoMsg) Descriptor() ([]byte, []int)deprecated
- func (x *WSCryptoMsg) GetFrom() string
- func (x *WSCryptoMsg) GetPayLoad() []byte
- func (x *WSCryptoMsg) GetTo() *MsgReceiver
- func (x *WSCryptoMsg) GetUnixTime() int64
- func (x *WSCryptoMsg) MustData() []byte
- func (*WSCryptoMsg) ProtoMessage()
- func (x *WSCryptoMsg) ProtoReflect() protoreflect.Message
- func (x *WSCryptoMsg) Reset()
- func (x *WSCryptoMsg) String() string
- type WSNoRightTips
- func (*WSNoRightTips) Descriptor() ([]byte, []int)deprecated
- func (x *WSNoRightTips) GetFrom() string
- func (x *WSNoRightTips) GetIsGrp() bool
- func (x *WSNoRightTips) GetTo() string
- func (x *WSNoRightTips) GetUnixTime() int64
- func (*WSNoRightTips) ProtoMessage()
- func (x *WSNoRightTips) ProtoReflect() protoreflect.Message
- func (x *WSNoRightTips) Reset()
- func (x *WSNoRightTips) String() string
- type WSOnline
- func (*WSOnline) Descriptor() ([]byte, []int)deprecated
- func (x *WSOnline) GetDebug() bool
- func (x *WSOnline) GetDevToken() string
- func (x *WSOnline) GetDevTyp() int32
- func (x *WSOnline) GetUID() string
- func (x *WSOnline) GetUnixTime() int64
- func (*WSOnline) ProtoMessage()
- func (x *WSOnline) ProtoReflect() protoreflect.Message
- func (x *WSOnline) Reset()
- func (x *WSOnline) String() string
- func (x *WSOnline) Verify(sig []byte) bool
- type WSOnlineAck
- type WSPullUnread
- func (*WSPullUnread) Descriptor() ([]byte, []int)deprecated
- func (x *WSPullUnread) GetFromUnixTime() int64
- func (x *WSPullUnread) GetReceiver() string
- func (*WSPullUnread) ProtoMessage()
- func (x *WSPullUnread) ProtoReflect() protoreflect.Message
- func (x *WSPullUnread) Reset()
- func (x *WSPullUnread) String() string
- type WsMsg
- func (x *WsMsg) CodeGroupMsg(from, to string, body []byte, grpKey map[string][]byte) ([]byte, error)
- func (x *WsMsg) CodeP2pMsg(from, to string, body []byte) ([]byte, error)
- func (x *WsMsg) Data() []byte
- func (*WsMsg) Descriptor() ([]byte, []int)deprecated
- func (x *WsMsg) GetHash() []byte
- func (x *WsMsg) GetMsg() *WSCryptoMsg
- func (x *WsMsg) GetNoRightTips() *WSNoRightTips
- func (x *WsMsg) GetOlAck() *WSOnlineAck
- func (x *WsMsg) GetOnline() *WSOnline
- func (m *WsMsg) GetPayload() isWsMsg_Payload
- func (x *WsMsg) GetSig() []byte
- func (x *WsMsg) GetTyp() WsMsgType
- func (x *WsMsg) GetUnread() *WSPullUnread
- func (x *WsMsg) GetUnreadAck() *WSCryptoMsg
- func (x *WsMsg) PackOnline(key *sub.SubKey, devInfo *webmsg.PushOnline) ([]byte, error)
- func (*WsMsg) ProtoMessage()
- func (x *WsMsg) ProtoReflect() protoreflect.Message
- func (x *WsMsg) ReadOnlineFromCli(conn *websocket.Conn) (olMsg *WSOnline, message []byte, err error)
- func (x *WsMsg) Reset()
- func (x *WsMsg) String() string
- type WsMsgType
- func (WsMsgType) Descriptor() protoreflect.EnumDescriptor
- func (x WsMsgType) Enum() *WsMsgType
- func (WsMsgType) EnumDescriptor() ([]byte, []int)deprecated
- func (x WsMsgType) IsP2pIM() bool
- func (x WsMsgType) Number() protoreflect.EnumNumber
- func (x WsMsgType) String() string
- func (WsMsgType) Type() protoreflect.EnumType
- type WsMsg_Msg
- type WsMsg_NoRightTips
- type WsMsg_OlAck
- type WsMsg_Online
- type WsMsg_Unread
- type WsMsg_UnreadAck
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WsMsgType_name = map[int32]string{ 0: "Online", 1: "OnlineACK", 2: "IMData", 3: "PullUnread", 4: "Offline", 5: "UnreadAck", 15: "NoRight", } WsMsgType_value = map[string]int32{ "Online": 0, "OnlineACK": 1, "IMData": 2, "PullUnread": 3, "Offline": 4, "UnreadAck": 5, "NoRight": 15, } )
Enum value maps for WsMsgType.
View Source
var File_websocket_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type GroupTo ¶ added in v1.2.2
type GroupTo struct { GrpID string `protobuf:"bytes,1,opt,name=grpID,proto3" json:"grpID,omitempty"` AesKey map[string][]byte `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GroupTo) Descriptor
deprecated
added in
v1.2.2
func (*GroupTo) ProtoMessage ¶ added in v1.2.2
func (*GroupTo) ProtoMessage()
func (*GroupTo) ProtoReflect ¶ added in v1.2.2
func (x *GroupTo) ProtoReflect() protoreflect.Message
type MsgReceiver ¶ added in v1.2.2
type MsgReceiver struct { // Types that are assignable to To: // *MsgReceiver_PeerAddr // *MsgReceiver_Grp To isMsgReceiver_To `protobuf_oneof:"To"` // contains filtered or unexported fields }
func (*MsgReceiver) Descriptor
deprecated
added in
v1.2.2
func (*MsgReceiver) Descriptor() ([]byte, []int)
Deprecated: Use MsgReceiver.ProtoReflect.Descriptor instead.
func (*MsgReceiver) GetGrp ¶ added in v1.2.2
func (x *MsgReceiver) GetGrp() *GroupTo
func (*MsgReceiver) GetPeerAddr ¶ added in v1.2.2
func (x *MsgReceiver) GetPeerAddr() string
func (*MsgReceiver) GetTo ¶ added in v1.2.2
func (m *MsgReceiver) GetTo() isMsgReceiver_To
func (*MsgReceiver) ProtoMessage ¶ added in v1.2.2
func (*MsgReceiver) ProtoMessage()
func (*MsgReceiver) ProtoReflect ¶ added in v1.2.2
func (x *MsgReceiver) ProtoReflect() protoreflect.Message
func (*MsgReceiver) Reset ¶ added in v1.2.2
func (x *MsgReceiver) Reset()
func (*MsgReceiver) String ¶ added in v1.2.2
func (x *MsgReceiver) String() string
type MsgReceiver_Grp ¶ added in v1.2.2
type MsgReceiver_Grp struct {
Grp *GroupTo `protobuf:"bytes,2,opt,name=grp,proto3,oneof"`
}
type MsgReceiver_PeerAddr ¶ added in v1.2.2
type MsgReceiver_PeerAddr struct {
PeerAddr string `protobuf:"bytes,1,opt,name=peerAddr,proto3,oneof"`
}
type WSCryptoMsg ¶
type WSCryptoMsg struct { From string `protobuf:"bytes,1,opt,name=From,proto3" json:"From,omitempty"` To *MsgReceiver `protobuf:"bytes,2,opt,name=To,proto3" json:"To,omitempty"` PayLoad []byte `protobuf:"bytes,4,opt,name=PayLoad,proto3" json:"PayLoad,omitempty"` UnixTime int64 `protobuf:"varint,5,opt,name=UnixTime,proto3" json:"UnixTime,omitempty"` // contains filtered or unexported fields }
func (*WSCryptoMsg) Descriptor
deprecated
func (*WSCryptoMsg) Descriptor() ([]byte, []int)
Deprecated: Use WSCryptoMsg.ProtoReflect.Descriptor instead.
func (*WSCryptoMsg) GetFrom ¶
func (x *WSCryptoMsg) GetFrom() string
func (*WSCryptoMsg) GetPayLoad ¶
func (x *WSCryptoMsg) GetPayLoad() []byte
func (*WSCryptoMsg) GetTo ¶
func (x *WSCryptoMsg) GetTo() *MsgReceiver
func (*WSCryptoMsg) GetUnixTime ¶
func (x *WSCryptoMsg) GetUnixTime() int64
func (*WSCryptoMsg) MustData ¶
func (x *WSCryptoMsg) MustData() []byte
func (*WSCryptoMsg) ProtoMessage ¶
func (*WSCryptoMsg) ProtoMessage()
func (*WSCryptoMsg) ProtoReflect ¶
func (x *WSCryptoMsg) ProtoReflect() protoreflect.Message
func (*WSCryptoMsg) Reset ¶
func (x *WSCryptoMsg) Reset()
func (*WSCryptoMsg) String ¶
func (x *WSCryptoMsg) String() string
type WSNoRightTips ¶ added in v1.2.2
type WSNoRightTips struct { From string `protobuf:"bytes,1,opt,name=From,proto3" json:"From,omitempty"` To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` IsGrp bool `protobuf:"varint,3,opt,name=isGrp,proto3" json:"isGrp,omitempty"` UnixTime int64 `protobuf:"varint,6,opt,name=UnixTime,proto3" json:"UnixTime,omitempty"` // contains filtered or unexported fields }
func (*WSNoRightTips) Descriptor
deprecated
added in
v1.2.2
func (*WSNoRightTips) Descriptor() ([]byte, []int)
Deprecated: Use WSNoRightTips.ProtoReflect.Descriptor instead.
func (*WSNoRightTips) GetFrom ¶ added in v1.2.2
func (x *WSNoRightTips) GetFrom() string
func (*WSNoRightTips) GetIsGrp ¶ added in v1.2.2
func (x *WSNoRightTips) GetIsGrp() bool
func (*WSNoRightTips) GetTo ¶ added in v1.2.2
func (x *WSNoRightTips) GetTo() string
func (*WSNoRightTips) GetUnixTime ¶ added in v1.2.2
func (x *WSNoRightTips) GetUnixTime() int64
func (*WSNoRightTips) ProtoMessage ¶ added in v1.2.2
func (*WSNoRightTips) ProtoMessage()
func (*WSNoRightTips) ProtoReflect ¶ added in v1.2.2
func (x *WSNoRightTips) ProtoReflect() protoreflect.Message
func (*WSNoRightTips) Reset ¶ added in v1.2.2
func (x *WSNoRightTips) Reset()
func (*WSNoRightTips) String ¶ added in v1.2.2
func (x *WSNoRightTips) String() string
type WSOnline ¶
type WSOnline struct { UID string `protobuf:"bytes,1,opt,name=UID,proto3" json:"UID,omitempty"` UnixTime int64 `protobuf:"varint,3,opt,name=UnixTime,proto3" json:"UnixTime,omitempty"` DevToken string `protobuf:"bytes,4,opt,name=devToken,proto3" json:"devToken,omitempty"` DevTyp int32 `protobuf:"varint,5,opt,name=devTyp,proto3" json:"devTyp,omitempty"` Debug bool `protobuf:"varint,2,opt,name=debug,proto3" json:"debug,omitempty"` // contains filtered or unexported fields }
func (*WSOnline) Descriptor
deprecated
func (*WSOnline) GetDevToken ¶
func (*WSOnline) GetUnixTime ¶
func (*WSOnline) ProtoMessage ¶
func (*WSOnline) ProtoMessage()
func (*WSOnline) ProtoReflect ¶
func (x *WSOnline) ProtoReflect() protoreflect.Message
type WSOnlineAck ¶
type WSOnlineAck struct { Success bool `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"` Seq int64 `protobuf:"varint,2,opt,name=Seq,proto3" json:"Seq,omitempty"` // contains filtered or unexported fields }
func (*WSOnlineAck) Descriptor
deprecated
func (*WSOnlineAck) Descriptor() ([]byte, []int)
Deprecated: Use WSOnlineAck.ProtoReflect.Descriptor instead.
func (*WSOnlineAck) GetSeq ¶
func (x *WSOnlineAck) GetSeq() int64
func (*WSOnlineAck) GetSuccess ¶
func (x *WSOnlineAck) GetSuccess() bool
func (*WSOnlineAck) ProtoMessage ¶
func (*WSOnlineAck) ProtoMessage()
func (*WSOnlineAck) ProtoReflect ¶
func (x *WSOnlineAck) ProtoReflect() protoreflect.Message
func (*WSOnlineAck) Reset ¶
func (x *WSOnlineAck) Reset()
func (*WSOnlineAck) String ¶
func (x *WSOnlineAck) String() string
type WSPullUnread ¶
type WSPullUnread struct { Receiver string `protobuf:"bytes,1,opt,name=Receiver,proto3" json:"Receiver,omitempty"` FromUnixTime int64 `protobuf:"varint,2,opt,name=FromUnixTime,proto3" json:"FromUnixTime,omitempty"` // contains filtered or unexported fields }
func (*WSPullUnread) Descriptor
deprecated
func (*WSPullUnread) Descriptor() ([]byte, []int)
Deprecated: Use WSPullUnread.ProtoReflect.Descriptor instead.
func (*WSPullUnread) GetFromUnixTime ¶
func (x *WSPullUnread) GetFromUnixTime() int64
func (*WSPullUnread) GetReceiver ¶
func (x *WSPullUnread) GetReceiver() string
func (*WSPullUnread) ProtoMessage ¶
func (*WSPullUnread) ProtoMessage()
func (*WSPullUnread) ProtoReflect ¶
func (x *WSPullUnread) ProtoReflect() protoreflect.Message
func (*WSPullUnread) Reset ¶
func (x *WSPullUnread) Reset()
func (*WSPullUnread) String ¶
func (x *WSPullUnread) String() string
type WsMsg ¶
type WsMsg struct { Hash []byte `protobuf:"bytes,1,opt,name=Hash,proto3" json:"Hash,omitempty"` Sig []byte `protobuf:"bytes,2,opt,name=Sig,proto3" json:"Sig,omitempty"` Typ WsMsgType `protobuf:"varint,3,opt,name=typ,proto3,enum=WsMsgType" json:"typ,omitempty"` // Types that are assignable to Payload: // *WsMsg_Online // *WsMsg_OlAck // *WsMsg_Msg // *WsMsg_Unread // *WsMsg_UnreadAck // *WsMsg_NoRightTips Payload isWsMsg_Payload `protobuf_oneof:"payload"` // contains filtered or unexported fields }
func HashNoRight ¶ added in v1.2.2
func (*WsMsg) CodeGroupMsg ¶ added in v1.2.2
func (*WsMsg) CodeP2pMsg ¶ added in v1.2.2
func (*WsMsg) Descriptor
deprecated
func (*WsMsg) GetMsg ¶ added in v1.2.2
func (x *WsMsg) GetMsg() *WSCryptoMsg
func (*WsMsg) GetNoRightTips ¶ added in v1.2.2
func (x *WsMsg) GetNoRightTips() *WSNoRightTips
func (*WsMsg) GetOlAck ¶
func (x *WsMsg) GetOlAck() *WSOnlineAck
func (*WsMsg) GetPayload ¶
func (m *WsMsg) GetPayload() isWsMsg_Payload
func (*WsMsg) GetUnread ¶
func (x *WsMsg) GetUnread() *WSPullUnread
func (*WsMsg) GetUnreadAck ¶
func (x *WsMsg) GetUnreadAck() *WSCryptoMsg
func (*WsMsg) PackOnline ¶ added in v1.2.2
func (*WsMsg) ProtoMessage ¶
func (*WsMsg) ProtoMessage()
func (*WsMsg) ProtoReflect ¶
func (x *WsMsg) ProtoReflect() protoreflect.Message
func (*WsMsg) ReadOnlineFromCli ¶
type WsMsgType ¶
type WsMsgType int32
func (WsMsgType) Descriptor ¶
func (WsMsgType) Descriptor() protoreflect.EnumDescriptor
func (WsMsgType) EnumDescriptor
deprecated
func (WsMsgType) Number ¶
func (x WsMsgType) Number() protoreflect.EnumNumber
func (WsMsgType) Type ¶
func (WsMsgType) Type() protoreflect.EnumType
type WsMsg_Msg ¶ added in v1.2.2
type WsMsg_Msg struct {
Msg *WSCryptoMsg `protobuf:"bytes,6,opt,name=msg,proto3,oneof"`
}
type WsMsg_NoRightTips ¶ added in v1.2.2
type WsMsg_NoRightTips struct {
NoRightTips *WSNoRightTips `protobuf:"bytes,9,opt,name=noRightTips,proto3,oneof"`
}
type WsMsg_OlAck ¶
type WsMsg_OlAck struct {
OlAck *WSOnlineAck `protobuf:"bytes,5,opt,name=olAck,proto3,oneof"`
}
type WsMsg_Online ¶
type WsMsg_Online struct {
Online *WSOnline `protobuf:"bytes,4,opt,name=online,proto3,oneof"`
}
type WsMsg_Unread ¶
type WsMsg_Unread struct {
Unread *WSPullUnread `protobuf:"bytes,7,opt,name=unread,proto3,oneof"`
}
type WsMsg_UnreadAck ¶
type WsMsg_UnreadAck struct {
UnreadAck *WSCryptoMsg `protobuf:"bytes,8,opt,name=unreadAck,proto3,oneof"`
}
Click to show internal directories.
Click to hide internal directories.