-
Notifications
You must be signed in to change notification settings - Fork 242
/
chat.pb.go
335 lines (298 loc) · 12 KB
/
chat.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: chat.proto
package chat
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// What is sent through the wire
type ChatMessagePayload struct {
// Message content
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
// MIME type
ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
// Message type
MessageType string `protobuf:"bytes,3,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"`
// Sender's clock value for message ordering
ClockValue float64 `protobuf:"fixed64,4,opt,name=clock_value,json=clockValue,proto3" json:"clock_value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ChatMessagePayload) Reset() { *m = ChatMessagePayload{} }
func (m *ChatMessagePayload) String() string { return proto.CompactTextString(m) }
func (*ChatMessagePayload) ProtoMessage() {}
func (*ChatMessagePayload) Descriptor() ([]byte, []int) {
return fileDescriptor_8c585a45e2093e54, []int{0}
}
func (m *ChatMessagePayload) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChatMessagePayload.Unmarshal(m, b)
}
func (m *ChatMessagePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ChatMessagePayload.Marshal(b, m, deterministic)
}
func (m *ChatMessagePayload) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChatMessagePayload.Merge(m, src)
}
func (m *ChatMessagePayload) XXX_Size() int {
return xxx_messageInfo_ChatMessagePayload.Size(m)
}
func (m *ChatMessagePayload) XXX_DiscardUnknown() {
xxx_messageInfo_ChatMessagePayload.DiscardUnknown(m)
}
var xxx_messageInfo_ChatMessagePayload proto.InternalMessageInfo
func (m *ChatMessagePayload) GetContent() string {
if m != nil {
return m.Content
}
return ""
}
func (m *ChatMessagePayload) GetContentType() string {
if m != nil {
return m.ContentType
}
return ""
}
func (m *ChatMessagePayload) GetMessageType() string {
if m != nil {
return m.MessageType
}
return ""
}
func (m *ChatMessagePayload) GetClockValue() float64 {
if m != nil {
return m.ClockValue
}
return 0
}
// ContactUpdatePayload is sent when a user updates its profile
type ContactUpdatePayload struct {
// Contact display name
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Contact profile image, using the data URI scheme (e.g. "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAA...")
ProfileImage string `protobuf:"bytes,2,opt,name=profile_image,json=profileImage,proto3" json:"profile_image,omitempty"`
// Contact address
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
// Contact Firebase Cloud Messaging token
FcmToken string `protobuf:"bytes,4,opt,name=fcm_token,json=fcmToken,proto3" json:"fcm_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ContactUpdatePayload) Reset() { *m = ContactUpdatePayload{} }
func (m *ContactUpdatePayload) String() string { return proto.CompactTextString(m) }
func (*ContactUpdatePayload) ProtoMessage() {}
func (*ContactUpdatePayload) Descriptor() ([]byte, []int) {
return fileDescriptor_8c585a45e2093e54, []int{1}
}
func (m *ContactUpdatePayload) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContactUpdatePayload.Unmarshal(m, b)
}
func (m *ContactUpdatePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ContactUpdatePayload.Marshal(b, m, deterministic)
}
func (m *ContactUpdatePayload) XXX_Merge(src proto.Message) {
xxx_messageInfo_ContactUpdatePayload.Merge(m, src)
}
func (m *ContactUpdatePayload) XXX_Size() int {
return xxx_messageInfo_ContactUpdatePayload.Size(m)
}
func (m *ContactUpdatePayload) XXX_DiscardUnknown() {
xxx_messageInfo_ContactUpdatePayload.DiscardUnknown(m)
}
var xxx_messageInfo_ContactUpdatePayload proto.InternalMessageInfo
func (m *ContactUpdatePayload) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ContactUpdatePayload) GetProfileImage() string {
if m != nil {
return m.ProfileImage
}
return ""
}
func (m *ContactUpdatePayload) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func (m *ContactUpdatePayload) GetFcmToken() string {
if m != nil {
return m.FcmToken
}
return ""
}
// Incoming RPC messages
type OneToOneRPC struct {
Src string `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"`
Dst string `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"`
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OneToOneRPC) Reset() { *m = OneToOneRPC{} }
func (m *OneToOneRPC) String() string { return proto.CompactTextString(m) }
func (*OneToOneRPC) ProtoMessage() {}
func (*OneToOneRPC) Descriptor() ([]byte, []int) {
return fileDescriptor_8c585a45e2093e54, []int{2}
}
func (m *OneToOneRPC) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OneToOneRPC.Unmarshal(m, b)
}
func (m *OneToOneRPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OneToOneRPC.Marshal(b, m, deterministic)
}
func (m *OneToOneRPC) XXX_Merge(src proto.Message) {
xxx_messageInfo_OneToOneRPC.Merge(m, src)
}
func (m *OneToOneRPC) XXX_Size() int {
return xxx_messageInfo_OneToOneRPC.Size(m)
}
func (m *OneToOneRPC) XXX_DiscardUnknown() {
xxx_messageInfo_OneToOneRPC.DiscardUnknown(m)
}
var xxx_messageInfo_OneToOneRPC proto.InternalMessageInfo
func (m *OneToOneRPC) GetSrc() string {
if m != nil {
return m.Src
}
return ""
}
func (m *OneToOneRPC) GetDst() string {
if m != nil {
return m.Dst
}
return ""
}
func (m *OneToOneRPC) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
type ContactUpdateRPC struct {
Src string `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"`
Dst string `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"`
Payload *ContactUpdatePayload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ContactUpdateRPC) Reset() { *m = ContactUpdateRPC{} }
func (m *ContactUpdateRPC) String() string { return proto.CompactTextString(m) }
func (*ContactUpdateRPC) ProtoMessage() {}
func (*ContactUpdateRPC) Descriptor() ([]byte, []int) {
return fileDescriptor_8c585a45e2093e54, []int{3}
}
func (m *ContactUpdateRPC) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContactUpdateRPC.Unmarshal(m, b)
}
func (m *ContactUpdateRPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ContactUpdateRPC.Marshal(b, m, deterministic)
}
func (m *ContactUpdateRPC) XXX_Merge(src proto.Message) {
xxx_messageInfo_ContactUpdateRPC.Merge(m, src)
}
func (m *ContactUpdateRPC) XXX_Size() int {
return xxx_messageInfo_ContactUpdateRPC.Size(m)
}
func (m *ContactUpdateRPC) XXX_DiscardUnknown() {
xxx_messageInfo_ContactUpdateRPC.DiscardUnknown(m)
}
var xxx_messageInfo_ContactUpdateRPC proto.InternalMessageInfo
func (m *ContactUpdateRPC) GetSrc() string {
if m != nil {
return m.Src
}
return ""
}
func (m *ContactUpdateRPC) GetDst() string {
if m != nil {
return m.Dst
}
return ""
}
func (m *ContactUpdateRPC) GetPayload() *ContactUpdatePayload {
if m != nil {
return m.Payload
}
return nil
}
// Incoming messages
type ChatProtocolMessage struct {
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ChatProtocolMessage) Reset() { *m = ChatProtocolMessage{} }
func (m *ChatProtocolMessage) String() string { return proto.CompactTextString(m) }
func (*ChatProtocolMessage) ProtoMessage() {}
func (*ChatProtocolMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_8c585a45e2093e54, []int{4}
}
func (m *ChatProtocolMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChatProtocolMessage.Unmarshal(m, b)
}
func (m *ChatProtocolMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ChatProtocolMessage.Marshal(b, m, deterministic)
}
func (m *ChatProtocolMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChatProtocolMessage.Merge(m, src)
}
func (m *ChatProtocolMessage) XXX_Size() int {
return xxx_messageInfo_ChatProtocolMessage.Size(m)
}
func (m *ChatProtocolMessage) XXX_DiscardUnknown() {
xxx_messageInfo_ChatProtocolMessage.DiscardUnknown(m)
}
var xxx_messageInfo_ChatProtocolMessage proto.InternalMessageInfo
func (m *ChatProtocolMessage) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func init() {
proto.RegisterType((*ChatMessagePayload)(nil), "chat.ChatMessagePayload")
proto.RegisterType((*ContactUpdatePayload)(nil), "chat.ContactUpdatePayload")
proto.RegisterType((*OneToOneRPC)(nil), "chat.OneToOneRPC")
proto.RegisterType((*ContactUpdateRPC)(nil), "chat.ContactUpdateRPC")
proto.RegisterType((*ChatProtocolMessage)(nil), "chat.ChatProtocolMessage")
}
func init() { proto.RegisterFile("chat.proto", fileDescriptor_8c585a45e2093e54) }
var fileDescriptor_8c585a45e2093e54 = []byte{
// 314 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x4a, 0xc3, 0x40,
0x10, 0xc6, 0x59, 0x5b, 0xd4, 0x4e, 0x2a, 0x94, 0xd5, 0x43, 0xd0, 0x83, 0x35, 0x5e, 0x7a, 0xaa,
0xa0, 0xbe, 0x41, 0x4f, 0x22, 0xd2, 0x12, 0xaa, 0xd7, 0xb0, 0x6e, 0xa6, 0x7f, 0xe8, 0x66, 0x77,
0xc9, 0xae, 0x42, 0x5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