Documentation
¶
Index ¶
- Variables
- type ApplicationMetadataMessage
- func (*ApplicationMetadataMessage) Descriptor() ([]byte, []int)
- func (m *ApplicationMetadataMessage) GetMessageType() ApplicationMetadataMessage_MessageType
- func (m *ApplicationMetadataMessage) GetPayload() []byte
- func (m *ApplicationMetadataMessage) GetSignature() []byte
- func (*ApplicationMetadataMessage) ProtoMessage()
- func (m *ApplicationMetadataMessage) RecoverKey() (*ecdsa.PublicKey, error)
- func (m *ApplicationMetadataMessage) Reset()
- func (m *ApplicationMetadataMessage) String() string
- func (m *ApplicationMetadataMessage) XXX_DiscardUnknown()
- func (m *ApplicationMetadataMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ApplicationMetadataMessage) XXX_Merge(src proto.Message)
- func (m *ApplicationMetadataMessage) XXX_Size() int
- func (m *ApplicationMetadataMessage) XXX_Unmarshal(b []byte) error
- type ApplicationMetadataMessage_MessageType
- type ChatMessage
- func (*ChatMessage) Descriptor() ([]byte, []int)
- func (m *ChatMessage) GetChatId() string
- func (m *ChatMessage) GetClock() uint64
- func (m *ChatMessage) GetContentType() ChatMessage_ContentType
- func (m *ChatMessage) GetEnsName() string
- func (m *ChatMessage) GetMessageType() ChatMessage_MessageType
- func (m *ChatMessage) GetPayload() isChatMessage_Payload
- func (m *ChatMessage) GetResponseTo() string
- func (m *ChatMessage) GetSticker() *StickerMessage
- func (m *ChatMessage) GetText() string
- func (m *ChatMessage) GetTimestamp() uint64
- func (*ChatMessage) ProtoMessage()
- func (m *ChatMessage) Reset()
- func (m *ChatMessage) String() string
- func (m *ChatMessage) XXX_DiscardUnknown()
- func (m *ChatMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChatMessage) XXX_Merge(src proto.Message)
- func (*ChatMessage) XXX_OneofWrappers() []interface{}
- func (m *ChatMessage) XXX_Size() int
- func (m *ChatMessage) XXX_Unmarshal(b []byte) error
- type ChatMessage_ContentType
- type ChatMessage_MessageType
- type ChatMessage_Sticker
- type StickerMessage
- func (*StickerMessage) Descriptor() ([]byte, []int)
- func (m *StickerMessage) GetHash() string
- func (m *StickerMessage) GetPack() int32
- func (*StickerMessage) ProtoMessage()
- func (m *StickerMessage) Reset()
- func (m *StickerMessage) String() string
- func (m *StickerMessage) XXX_DiscardUnknown()
- func (m *StickerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StickerMessage) XXX_Merge(src proto.Message)
- func (m *StickerMessage) XXX_Size() int
- func (m *StickerMessage) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ApplicationMetadataMessage_MessageType_name = map[int32]string{
0: "TEXT_MESSAGE",
1: "CONTACT_REQUEST",
2: "MEMBERSHIP_UPDATE",
3: "PAIR_INSTALLATION",
4: "SYNC_INSTALLATION",
}
View Source
var ApplicationMetadataMessage_MessageType_value = map[string]int32{
"TEXT_MESSAGE": 0,
"CONTACT_REQUEST": 1,
"MEMBERSHIP_UPDATE": 2,
"PAIR_INSTALLATION": 3,
"SYNC_INSTALLATION": 4,
}
View Source
var ChatMessage_ContentType_name = map[int32]string{
0: "TEXT_PLAIN",
1: "STICKER",
2: "STATUS",
3: "EMOJI",
4: "COMMAND",
5: "COMMAND_REQUEST",
}
View Source
var ChatMessage_ContentType_value = map[string]int32{
"TEXT_PLAIN": 0,
"STICKER": 1,
"STATUS": 2,
"EMOJI": 3,
"COMMAND": 4,
"COMMAND_REQUEST": 5,
}
View Source
var ChatMessage_MessageType_name = map[int32]string{
0: "ONE_TO_ONE",
1: "PUBLIC_GROUP",
2: "PRIVATE_GROUP",
3: "SYSTEM_MESSAGE_PRIVATE_GROUP",
}
View Source
var ChatMessage_MessageType_value = map[string]int32{
"ONE_TO_ONE": 0,
"PUBLIC_GROUP": 1,
"PRIVATE_GROUP": 2,
"SYSTEM_MESSAGE_PRIVATE_GROUP": 3,
}
Functions ¶
This section is empty.
Types ¶
type ApplicationMetadataMessage ¶
type ApplicationMetadataMessage struct {
// Signature of the payload field
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
// This is the encoded protobuf of the application level message, i.e ChatMessage
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
// The type of protobuf message sent
MessageType ApplicationMetadataMessage_MessageType `` /* 148-byte string literal not displayed */
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func Unmarshal ¶
func Unmarshal(payload []byte) (*ApplicationMetadataMessage, error)
func (*ApplicationMetadataMessage) Descriptor ¶
func (*ApplicationMetadataMessage) Descriptor() ([]byte, []int)
func (*ApplicationMetadataMessage) GetMessageType ¶
func (m *ApplicationMetadataMessage) GetMessageType() ApplicationMetadataMessage_MessageType
func (*ApplicationMetadataMessage) GetPayload ¶
func (m *ApplicationMetadataMessage) GetPayload() []byte
func (*ApplicationMetadataMessage) GetSignature ¶
func (m *ApplicationMetadataMessage) GetSignature() []byte
func (*ApplicationMetadataMessage) ProtoMessage ¶
func (*ApplicationMetadataMessage) ProtoMessage()
func (*ApplicationMetadataMessage) RecoverKey ¶
func (m *ApplicationMetadataMessage) RecoverKey() (*ecdsa.PublicKey, error)
func (*ApplicationMetadataMessage) Reset ¶
func (m *ApplicationMetadataMessage) Reset()
func (*ApplicationMetadataMessage) String ¶
func (m *ApplicationMetadataMessage) String() string
func (*ApplicationMetadataMessage) XXX_DiscardUnknown ¶
func (m *ApplicationMetadataMessage) XXX_DiscardUnknown()
func (*ApplicationMetadataMessage) XXX_Marshal ¶
func (m *ApplicationMetadataMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ApplicationMetadataMessage) XXX_Merge ¶
func (m *ApplicationMetadataMessage) XXX_Merge(src proto.Message)
func (*ApplicationMetadataMessage) XXX_Size ¶
func (m *ApplicationMetadataMessage) XXX_Size() int
func (*ApplicationMetadataMessage) XXX_Unmarshal ¶
func (m *ApplicationMetadataMessage) XXX_Unmarshal(b []byte) error
type ApplicationMetadataMessage_MessageType ¶
type ApplicationMetadataMessage_MessageType int32
const ( ApplicationMetadataMessage_TEXT_MESSAGE ApplicationMetadataMessage_MessageType = 0 ApplicationMetadataMessage_CONTACT_REQUEST ApplicationMetadataMessage_MessageType = 1 ApplicationMetadataMessage_MEMBERSHIP_UPDATE ApplicationMetadataMessage_MessageType = 2 ApplicationMetadataMessage_PAIR_INSTALLATION ApplicationMetadataMessage_MessageType = 3 ApplicationMetadataMessage_SYNC_INSTALLATION ApplicationMetadataMessage_MessageType = 4 )
func (ApplicationMetadataMessage_MessageType) EnumDescriptor ¶
func (ApplicationMetadataMessage_MessageType) EnumDescriptor() ([]byte, []int)
func (ApplicationMetadataMessage_MessageType) String ¶
func (x ApplicationMetadataMessage_MessageType) String() string
type ChatMessage ¶
type ChatMessage struct {
// Lamport timestamp of the chat message
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
// Unix timestamps in milliseconds, currently not used as we use whisper as more reliable, but here
// so that we don't rely on it
Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Text of the message
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
// Id of the message that we are replying to
ResponseTo string `protobuf:"bytes,4,opt,name=response_to,json=responseTo,proto3" json:"response_to,omitempty"`
// Ens name of the sender
EnsName string `protobuf:"bytes,5,opt,name=ens_name,json=ensName,proto3" json:"ens_name,omitempty"`
// Chat id, this field is symmetric for public-chats and private group chats,
// but asymmetric in case of one-to-ones, as the sender will use the chat-id
// of the received, while the receiver will use the chat-id of the sender.
// Probably should be the concatenation of sender-pk & receiver-pk in alphabetical order
ChatId string `protobuf:"bytes,6,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
// The type of message (public/one-to-one/private-group-chat)
MessageType ChatMessage_MessageType `` /* 133-byte string literal not displayed */
// The type of the content of the message
ContentType ChatMessage_ContentType `` /* 133-byte string literal not displayed */
// Types that are valid to be assigned to Payload:
// *ChatMessage_Sticker
Payload isChatMessage_Payload `protobuf_oneof:"payload"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ChatMessage) Descriptor ¶
func (*ChatMessage) Descriptor() ([]byte, []int)
func (*ChatMessage) GetChatId ¶
func (m *ChatMessage) GetChatId() string
func (*ChatMessage) GetClock ¶
func (m *ChatMessage) GetClock() uint64
func (*ChatMessage) GetContentType ¶
func (m *ChatMessage) GetContentType() ChatMessage_ContentType
func (*ChatMessage) GetEnsName ¶
func (m *ChatMessage) GetEnsName() string
func (*ChatMessage) GetMessageType ¶
func (m *ChatMessage) GetMessageType() ChatMessage_MessageType
func (*ChatMessage) GetPayload ¶
func (m *ChatMessage) GetPayload() isChatMessage_Payload
func (*ChatMessage) GetResponseTo ¶
func (m *ChatMessage) GetResponseTo() string
func (*ChatMessage) GetSticker ¶
func (m *ChatMessage) GetSticker() *StickerMessage
func (*ChatMessage) GetText ¶
func (m *ChatMessage) GetText() string
func (*ChatMessage) GetTimestamp ¶
func (m *ChatMessage) GetTimestamp() uint64
func (*ChatMessage) ProtoMessage ¶
func (*ChatMessage) ProtoMessage()
func (*ChatMessage) Reset ¶
func (m *ChatMessage) Reset()
func (*ChatMessage) String ¶
func (m *ChatMessage) String() string
func (*ChatMessage) XXX_DiscardUnknown ¶
func (m *ChatMessage) XXX_DiscardUnknown()
func (*ChatMessage) XXX_Marshal ¶
func (m *ChatMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChatMessage) XXX_Merge ¶
func (m *ChatMessage) XXX_Merge(src proto.Message)
func (*ChatMessage) XXX_OneofWrappers ¶
func (*ChatMessage) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*ChatMessage) XXX_Size ¶
func (m *ChatMessage) XXX_Size() int
func (*ChatMessage) XXX_Unmarshal ¶
func (m *ChatMessage) XXX_Unmarshal(b []byte) error
type ChatMessage_ContentType ¶
type ChatMessage_ContentType int32
const ( ChatMessage_TEXT_PLAIN ChatMessage_ContentType = 0 ChatMessage_STICKER ChatMessage_ContentType = 1 ChatMessage_STATUS ChatMessage_ContentType = 2 ChatMessage_EMOJI ChatMessage_ContentType = 3 ChatMessage_COMMAND ChatMessage_ContentType = 4 ChatMessage_COMMAND_REQUEST ChatMessage_ContentType = 5 )
func (ChatMessage_ContentType) EnumDescriptor ¶
func (ChatMessage_ContentType) EnumDescriptor() ([]byte, []int)
func (ChatMessage_ContentType) String ¶
func (x ChatMessage_ContentType) String() string
type ChatMessage_MessageType ¶
type ChatMessage_MessageType int32
const ( ChatMessage_ONE_TO_ONE ChatMessage_MessageType = 0 ChatMessage_PUBLIC_GROUP ChatMessage_MessageType = 1 ChatMessage_PRIVATE_GROUP ChatMessage_MessageType = 2 // Only local ChatMessage_SYSTEM_MESSAGE_PRIVATE_GROUP ChatMessage_MessageType = 3 )
func (ChatMessage_MessageType) EnumDescriptor ¶
func (ChatMessage_MessageType) EnumDescriptor() ([]byte, []int)
func (ChatMessage_MessageType) String ¶
func (x ChatMessage_MessageType) String() string
type ChatMessage_Sticker ¶
type ChatMessage_Sticker struct {
Sticker *StickerMessage `protobuf:"bytes,9,opt,name=sticker,proto3,oneof"`
}
type StickerMessage ¶
type StickerMessage struct {
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
Pack int32 `protobuf:"varint,2,opt,name=pack,proto3" json:"pack,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*StickerMessage) Descriptor ¶
func (*StickerMessage) Descriptor() ([]byte, []int)
func (*StickerMessage) GetHash ¶
func (m *StickerMessage) GetHash() string
func (*StickerMessage) GetPack ¶
func (m *StickerMessage) GetPack() int32
func (*StickerMessage) ProtoMessage ¶
func (*StickerMessage) ProtoMessage()
func (*StickerMessage) Reset ¶
func (m *StickerMessage) Reset()
func (*StickerMessage) String ¶
func (m *StickerMessage) String() string
func (*StickerMessage) XXX_DiscardUnknown ¶
func (m *StickerMessage) XXX_DiscardUnknown()
func (*StickerMessage) XXX_Marshal ¶
func (m *StickerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StickerMessage) XXX_Merge ¶
func (m *StickerMessage) XXX_Merge(src proto.Message)
func (*StickerMessage) XXX_Size ¶
func (m *StickerMessage) XXX_Size() int
func (*StickerMessage) XXX_Unmarshal ¶
func (m *StickerMessage) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.