-
Notifications
You must be signed in to change notification settings - Fork 244
/
membership_update_message.pb.go
274 lines (238 loc) · 10.7 KB
/
membership_update_message.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: membership_update_message.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
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.ProtoPackageIsVersion3 // please upgrade the proto package
type MembershipUpdateEvent_EventType int32
const (
MembershipUpdateEvent_UNKNOWN MembershipUpdateEvent_EventType = 0
MembershipUpdateEvent_CHAT_CREATED MembershipUpdateEvent_EventType = 1
MembershipUpdateEvent_NAME_CHANGED MembershipUpdateEvent_EventType = 2
MembershipUpdateEvent_MEMBERS_ADDED MembershipUpdateEvent_EventType = 3
MembershipUpdateEvent_MEMBER_JOINED MembershipUpdateEvent_EventType = 4
MembershipUpdateEvent_MEMBER_REMOVED MembershipUpdateEvent_EventType = 5
MembershipUpdateEvent_ADMINS_ADDED MembershipUpdateEvent_EventType = 6
MembershipUpdateEvent_ADMIN_REMOVED MembershipUpdateEvent_EventType = 7
)
var MembershipUpdateEvent_EventType_name = map[int32]string{
0: "UNKNOWN",
1: "CHAT_CREATED",
2: "NAME_CHANGED",
3: "MEMBERS_ADDED",
4: "MEMBER_JOINED",
5: "MEMBER_REMOVED",
6: "ADMINS_ADDED",
7: "ADMIN_REMOVED",
}
var MembershipUpdateEvent_EventType_value = map[string]int32{
"UNKNOWN": 0,
"CHAT_CREATED": 1,
"NAME_CHANGED": 2,
"MEMBERS_ADDED": 3,
"MEMBER_JOINED": 4,
"MEMBER_REMOVED": 5,
"ADMINS_ADDED": 6,
"ADMIN_REMOVED": 7,
}
func (x MembershipUpdateEvent_EventType) String() string {
return proto.EnumName(MembershipUpdateEvent_EventType_name, int32(x))
}
func (MembershipUpdateEvent_EventType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_8d37dd0dc857a6be, []int{0, 0}
}
type MembershipUpdateEvent struct {
// Lamport timestamp of the event
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
// List of public keys of objects of the action
Members []string `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"`
// Name of the chat for the CHAT_CREATED/NAME_CHANGED event types
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// The type of the event
Type MembershipUpdateEvent_EventType `protobuf:"varint,4,opt,name=type,proto3,enum=protobuf.MembershipUpdateEvent_EventType" json:"type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MembershipUpdateEvent) Reset() { *m = MembershipUpdateEvent{} }
func (m *MembershipUpdateEvent) String() string { return proto.CompactTextString(m) }
func (*MembershipUpdateEvent) ProtoMessage() {}
func (*MembershipUpdateEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_8d37dd0dc857a6be, []int{0}
}
func (m *MembershipUpdateEvent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MembershipUpdateEvent.Unmarshal(m, b)
}
func (m *MembershipUpdateEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MembershipUpdateEvent.Marshal(b, m, deterministic)
}
func (m *MembershipUpdateEvent) XXX_Merge(src proto.Message) {
xxx_messageInfo_MembershipUpdateEvent.Merge(m, src)
}
func (m *MembershipUpdateEvent) XXX_Size() int {
return xxx_messageInfo_MembershipUpdateEvent.Size(m)
}
func (m *MembershipUpdateEvent) XXX_DiscardUnknown() {
xxx_messageInfo_MembershipUpdateEvent.DiscardUnknown(m)
}
var xxx_messageInfo_MembershipUpdateEvent proto.InternalMessageInfo
func (m *MembershipUpdateEvent) GetClock() uint64 {
if m != nil {
return m.Clock
}
return 0
}
func (m *MembershipUpdateEvent) GetMembers() []string {
if m != nil {
return m.Members
}
return nil
}
func (m *MembershipUpdateEvent) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *MembershipUpdateEvent) GetType() MembershipUpdateEvent_EventType {
if m != nil {
return m.Type
}
return MembershipUpdateEvent_UNKNOWN
}
// MembershipUpdateMessage is a message used to propagate information
// about group membership changes.
// For more information, see https://github.com/status-im/specs/blob/master/status-group-chats-spec.md.
type MembershipUpdateMessage struct {
// The chat id of the private group chat
ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
// A list of events for this group chat, first x bytes are the signature, then is a
// protobuf encoded MembershipUpdateEvent
Events [][]byte `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"`
// An optional chat message
//
// Types that are valid to be assigned to ChatEntity:
// *MembershipUpdateMessage_Message
// *MembershipUpdateMessage_EmojiReaction
ChatEntity isMembershipUpdateMessage_ChatEntity `protobuf_oneof:"chat_entity"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MembershipUpdateMessage) Reset() { *m = MembershipUpdateMessage{} }
func (m *MembershipUpdateMessage) String() string { return proto.CompactTextString(m) }
func (*MembershipUpdateMessage) ProtoMessage() {}
func (*MembershipUpdateMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_8d37dd0dc857a6be, []int{1}
}
func (m *MembershipUpdateMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MembershipUpdateMessage.Unmarshal(m, b)
}
func (m *MembershipUpdateMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MembershipUpdateMessage.Marshal(b, m, deterministic)
}
func (m *MembershipUpdateMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_MembershipUpdateMessage.Merge(m, src)
}
func (m *MembershipUpdateMessage) XXX_Size() int {
return xxx_messageInfo_MembershipUpdateMessage.Size(m)
}
func (m *MembershipUpdateMessage) XXX_DiscardUnknown() {
xxx_messageInfo_MembershipUpdateMessage.DiscardUnknown(m)
}
var xxx_messageInfo_MembershipUpdateMessage proto.InternalMessageInfo
func (m *MembershipUpdateMessage) GetChatId() string {
if m != nil {
return m.ChatId
}
return ""
}
func (m *MembershipUpdateMessage) GetEvents() [][]byte {
if m != nil {
return m.Events
}
return nil
}
type isMembershipUpdateMessage_ChatEntity interface {
isMembershipUpdateMessage_ChatEntity()
}
type MembershipUpdateMessage_Message struct {
Message *ChatMessage `protobuf:"bytes,3,opt,name=message,proto3,oneof"`
}
type MembershipUpdateMessage_EmojiReaction struct {
EmojiReaction *EmojiReaction `protobuf:"bytes,4,opt,name=emoji_reaction,json=emojiReaction,proto3,oneof"`
}
func (*MembershipUpdateMessage_Message) isMembershipUpdateMessage_ChatEntity() {}
func (*MembershipUpdateMessage_EmojiReaction) isMembershipUpdateMessage_ChatEntity() {}
func (m *MembershipUpdateMessage) GetChatEntity() isMembershipUpdateMessage_ChatEntity {
if m != nil {
return m.ChatEntity
}
return nil
}
func (m *MembershipUpdateMessage) GetMessage() *ChatMessage {
if x, ok := m.GetChatEntity().(*MembershipUpdateMessage_Message); ok {
return x.Message
}
return nil
}
func (m *MembershipUpdateMessage) GetEmojiReaction() *EmojiReaction {
if x, ok := m.GetChatEntity().(*MembershipUpdateMessage_EmojiReaction); ok {
return x.EmojiReaction
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*MembershipUpdateMessage) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*MembershipUpdateMessage_Message)(nil),
(*MembershipUpdateMessage_EmojiReaction)(nil),
}
}
func init() {
proto.RegisterEnum("protobuf.MembershipUpdateEvent_EventType", MembershipUpdateEvent_EventType_name, MembershipUpdateEvent_EventType_value)
proto.RegisterType((*MembershipUpdateEvent)(nil), "protobuf.MembershipUpdateEvent")
proto.RegisterType((*MembershipUpdateMessage)(nil), "protobuf.MembershipUpdateMessage")
}
func init() {
proto.RegisterFile("membership_update_message.proto", fileDescriptor_8d37dd0dc857a6be)
}
var fileDescriptor_8d37dd0dc857a6be = []byte{
// 393 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x4d, 0xaf, 0x93, 0x50,
0x10, 0x2d, 0x2d, 0x0f, 0x64, 0x78, 0x6d, 0x70, 0xf2, 0x9e, 0x25, 0x6f, 0x23, 0xe9, 0x0a, 0x37,
0x24, 0xd6, 0xb5, 0x89, 0x3c, 0xee, 0x8d, 0x54, 0x03, 0x4d, 0xae, 0xad, 0x2e, 0x09, 0xa5, 0x57,
0x8b, 0xca, 0x47, 0xda, 0x5b, 0x93, 0xfe, 0x16, 0xff, 0x88, 0xbf, 0xc2, 0xdf, 0x64, 0xb8, 0x40,
0x6b, 0x8d, 0x1b, 0xe0, 0x9c, 0x99, 0x73,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