forked from tinode/chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel.pb.go
3076 lines (2728 loc) · 92 KB
/
model.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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: model.proto
/*
Package pbx is a generated protocol buffer package.
It is generated from these files:
model.proto
It has these top-level messages:
Unused
DefaultAcsMode
AccessMode
SetSub
SetDesc
GetOpts
BrowseOpts
GetQuery
SetQuery
SeqRange
Credential
ClientHi
ClientAcc
ClientLogin
ClientSub
ClientLeave
ClientPub
ClientGet
ClientSet
ClientDel
ClientNote
ClientMsg
TopicDesc
TopicSub
DelValues
ServerCtrl
ServerData
ServerPres
ServerMeta
ServerInfo
ServerMsg
ServerResp
Session
ClientReq
SearchQuery
SearchFound
TopicEvent
AccountEvent
SubscriptionEvent
MessageEvent
*/
package pbx
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// 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
type InfoNote int32
const (
InfoNote_READ InfoNote = 0
InfoNote_RECV InfoNote = 1
InfoNote_KP InfoNote = 2
)
var InfoNote_name = map[int32]string{
0: "READ",
1: "RECV",
2: "KP",
}
var InfoNote_value = map[string]int32{
"READ": 0,
"RECV": 1,
"KP": 2,
}
func (x InfoNote) String() string {
return proto.EnumName(InfoNote_name, int32(x))
}
func (InfoNote) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// Plugin response codes
type RespCode int32
const (
// Instruct Tinode server to continue with default processing of the client request.
RespCode_CONTINUE RespCode = 0
// Drop the request as if the client did not send it
RespCode_DROP RespCode = 1
// Send the the provided response to the client.
RespCode_RESPOND RespCode = 2
// Replace client's original request with the provided request then continue with
// processing.
RespCode_REPLACE RespCode = 3
)
var RespCode_name = map[int32]string{
0: "CONTINUE",
1: "DROP",
2: "RESPOND",
3: "REPLACE",
}
var RespCode_value = map[string]int32{
"CONTINUE": 0,
"DROP": 1,
"RESPOND": 2,
"REPLACE": 3,
}
func (x RespCode) String() string {
return proto.EnumName(RespCode_name, int32(x))
}
func (RespCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
type Crud int32
const (
Crud_CREATE Crud = 0
Crud_UPDATE Crud = 1
Crud_DELETE Crud = 2
)
var Crud_name = map[int32]string{
0: "CREATE",
1: "UPDATE",
2: "DELETE",
}
var Crud_value = map[string]int32{
"CREATE": 0,
"UPDATE": 1,
"DELETE": 2,
}
func (x Crud) String() string {
return proto.EnumName(Crud_name, int32(x))
}
func (Crud) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
// What to delete, either "msg" to delete messages (default) or "topic" to delete the topic or "sub"
// to delete a subscription to topic.
type ClientDel_What int32
const (
ClientDel_MSG ClientDel_What = 0
ClientDel_TOPIC ClientDel_What = 1
ClientDel_SUB ClientDel_What = 2
)
var ClientDel_What_name = map[int32]string{
0: "MSG",
1: "TOPIC",
2: "SUB",
}
var ClientDel_What_value = map[string]int32{
"MSG": 0,
"TOPIC": 1,
"SUB": 2,
}
func (x ClientDel_What) String() string {
return proto.EnumName(ClientDel_What_name, int32(x))
}
func (ClientDel_What) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{19, 0} }
type ServerPres_What int32
const (
ServerPres_ON ServerPres_What = 0
ServerPres_OFF ServerPres_What = 1
ServerPres_UA ServerPres_What = 3
ServerPres_UPD ServerPres_What = 4
ServerPres_GONE ServerPres_What = 5
ServerPres_ACS ServerPres_What = 6
ServerPres_TERM ServerPres_What = 7
ServerPres_MSG ServerPres_What = 8
ServerPres_READ ServerPres_What = 9
ServerPres_RECV ServerPres_What = 10
ServerPres_DEL ServerPres_What = 11
)
var ServerPres_What_name = map[int32]string{
0: "ON",
1: "OFF",
3: "UA",
4: "UPD",
5: "GONE",
6: "ACS",
7: "TERM",
8: "MSG",
9: "READ",
10: "RECV",
11: "DEL",
}
var ServerPres_What_value = map[string]int32{
"ON": 0,
"OFF": 1,
"UA": 3,
"UPD": 4,
"GONE": 5,
"ACS": 6,
"TERM": 7,
"MSG": 8,
"READ": 9,
"RECV": 10,
"DEL": 11,
}
func (x ServerPres_What) String() string {
return proto.EnumName(ServerPres_What_name, int32(x))
}
func (ServerPres_What) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{27, 0} }
type Session_AuthLevel int32
const (
Session_NONE Session_AuthLevel = 0
Session_ANON Session_AuthLevel = 10
Session_AUTH Session_AuthLevel = 20
Session_ROOT Session_AuthLevel = 30
)
var Session_AuthLevel_name = map[int32]string{
0: "NONE",
10: "ANON",
20: "AUTH",
30: "ROOT",
}
var Session_AuthLevel_value = map[string]int32{
"NONE": 0,
"ANON": 10,
"AUTH": 20,
"ROOT": 30,
}
func (x Session_AuthLevel) String() string {
return proto.EnumName(Session_AuthLevel_name, int32(x))
}
func (Session_AuthLevel) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{32, 0} }
// Dummy placeholder message.
type Unused struct {
}
func (m *Unused) Reset() { *m = Unused{} }
func (m *Unused) String() string { return proto.CompactTextString(m) }
func (*Unused) ProtoMessage() {}
func (*Unused) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// Topic default access mode
type DefaultAcsMode struct {
Auth string `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
Anon string `protobuf:"bytes,2,opt,name=anon" json:"anon,omitempty"`
}
func (m *DefaultAcsMode) Reset() { *m = DefaultAcsMode{} }
func (m *DefaultAcsMode) String() string { return proto.CompactTextString(m) }
func (*DefaultAcsMode) ProtoMessage() {}
func (*DefaultAcsMode) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *DefaultAcsMode) GetAuth() string {
if m != nil {
return m.Auth
}
return ""
}
func (m *DefaultAcsMode) GetAnon() string {
if m != nil {
return m.Anon
}
return ""
}
// Actual access mode
type AccessMode struct {
// Access mode requested by the user
Want string `protobuf:"bytes,1,opt,name=want" json:"want,omitempty"`
// Access mode granted to the user by the admin
Given string `protobuf:"bytes,2,opt,name=given" json:"given,omitempty"`
}
func (m *AccessMode) Reset() { *m = AccessMode{} }
func (m *AccessMode) String() string { return proto.CompactTextString(m) }
func (*AccessMode) ProtoMessage() {}
func (*AccessMode) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *AccessMode) GetWant() string {
if m != nil {
return m.Want
}
return ""
}
func (m *AccessMode) GetGiven() string {
if m != nil {
return m.Given
}
return ""
}
// SetSub: payload in set.sub request to update current subscription or invite another user, {sub.what} == "sub"
type SetSub struct {
// User affected by this request. Default (empty): current user
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
// Access mode change, either Given or Want depending on context
Mode string `protobuf:"bytes,2,opt,name=mode" json:"mode,omitempty"`
}
func (m *SetSub) Reset() { *m = SetSub{} }
func (m *SetSub) String() string { return proto.CompactTextString(m) }
func (*SetSub) ProtoMessage() {}
func (*SetSub) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *SetSub) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
func (m *SetSub) GetMode() string {
if m != nil {
return m.Mode
}
return ""
}
// SetDesc: C2S in set.what == "desc" and sub.init message
type SetDesc struct {
DefaultAcs *DefaultAcsMode `protobuf:"bytes,1,opt,name=default_acs,json=defaultAcs" json:"default_acs,omitempty"`
Public []byte `protobuf:"bytes,2,opt,name=public,proto3" json:"public,omitempty"`
Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
}
func (m *SetDesc) Reset() { *m = SetDesc{} }
func (m *SetDesc) String() string { return proto.CompactTextString(m) }
func (*SetDesc) ProtoMessage() {}
func (*SetDesc) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *SetDesc) GetDefaultAcs() *DefaultAcsMode {
if m != nil {
return m.DefaultAcs
}
return nil
}
func (m *SetDesc) GetPublic() []byte {
if m != nil {
return m.Public
}
return nil
}
func (m *SetDesc) GetPrivate() []byte {
if m != nil {
return m.Private
}
return nil
}
type GetOpts struct {
IfModifiedSince int64 `protobuf:"varint,1,opt,name=if_modified_since,json=ifModifiedSince" json:"if_modified_since,omitempty"`
Limit int32 `protobuf:"varint,2,opt,name=limit" json:"limit,omitempty"`
}
func (m *GetOpts) Reset() { *m = GetOpts{} }
func (m *GetOpts) String() string { return proto.CompactTextString(m) }
func (*GetOpts) ProtoMessage() {}
func (*GetOpts) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *GetOpts) GetIfModifiedSince() int64 {
if m != nil {
return m.IfModifiedSince
}
return 0
}
func (m *GetOpts) GetLimit() int32 {
if m != nil {
return m.Limit
}
return 0
}
type BrowseOpts struct {
// Load messages with seq id equal or greater than this
SinceId int32 `protobuf:"varint,1,opt,name=since_id,json=sinceId" json:"since_id,omitempty"`
// Load messages with seq id lower than this
BeforeId int32 `protobuf:"varint,3,opt,name=before_id,json=beforeId" json:"before_id,omitempty"`
// Limit the number of messages loaded
Limit int32 `protobuf:"varint,5,opt,name=limit" json:"limit,omitempty"`
}
func (m *BrowseOpts) Reset() { *m = BrowseOpts{} }
func (m *BrowseOpts) String() string { return proto.CompactTextString(m) }
func (*BrowseOpts) ProtoMessage() {}
func (*BrowseOpts) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *BrowseOpts) GetSinceId() int32 {
if m != nil {
return m.SinceId
}
return 0
}
func (m *BrowseOpts) GetBeforeId() int32 {
if m != nil {
return m.BeforeId
}
return 0
}
func (m *BrowseOpts) GetLimit() int32 {
if m != nil {
return m.Limit
}
return 0
}
type GetQuery struct {
What string `protobuf:"bytes,1,opt,name=what" json:"what,omitempty"`
// Parameters of "desc" request
Desc *GetOpts `protobuf:"bytes,2,opt,name=desc" json:"desc,omitempty"`
// Parameters of "sub" request
Sub *GetOpts `protobuf:"bytes,3,opt,name=sub" json:"sub,omitempty"`
// Parameters of "data" request
Data *BrowseOpts `protobuf:"bytes,4,opt,name=data" json:"data,omitempty"`
}
func (m *GetQuery) Reset() { *m = GetQuery{} }
func (m *GetQuery) String() string { return proto.CompactTextString(m) }
func (*GetQuery) ProtoMessage() {}
func (*GetQuery) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *GetQuery) GetWhat() string {
if m != nil {
return m.What
}
return ""
}
func (m *GetQuery) GetDesc() *GetOpts {
if m != nil {
return m.Desc
}
return nil
}
func (m *GetQuery) GetSub() *GetOpts {
if m != nil {
return m.Sub
}
return nil
}
func (m *GetQuery) GetData() *BrowseOpts {
if m != nil {
return m.Data
}
return nil
}
type SetQuery struct {
// Topic metadata, new topic & new subscriptions only
Desc *SetDesc `protobuf:"bytes,1,opt,name=desc" json:"desc,omitempty"`
// Subscription parameters
Sub *SetSub `protobuf:"bytes,2,opt,name=sub" json:"sub,omitempty"`
}
func (m *SetQuery) Reset() { *m = SetQuery{} }
func (m *SetQuery) String() string { return proto.CompactTextString(m) }
func (*SetQuery) ProtoMessage() {}
func (*SetQuery) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *SetQuery) GetDesc() *SetDesc {
if m != nil {
return m.Desc
}
return nil
}
func (m *SetQuery) GetSub() *SetSub {
if m != nil {
return m.Sub
}
return nil
}
type SeqRange struct {
Low int32 `protobuf:"varint,1,opt,name=low" json:"low,omitempty"`
Hi int32 `protobuf:"varint,2,opt,name=hi" json:"hi,omitempty"`
}
func (m *SeqRange) Reset() { *m = SeqRange{} }
func (m *SeqRange) String() string { return proto.CompactTextString(m) }
func (*SeqRange) ProtoMessage() {}
func (*SeqRange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *SeqRange) GetLow() int32 {
if m != nil {
return m.Low
}
return 0
}
func (m *SeqRange) GetHi() int32 {
if m != nil {
return m.Hi
}
return 0
}
type Credential struct {
// Credential type, i.e. `email` or `tel`.
Method string `protobuf:"bytes,1,opt,name=method" json:"method,omitempty"`
// Value to verify, i.e. `user@example.com` or `+18003287448`
Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
// Verification response
Response string `protobuf:"bytes,3,opt,name=response" json:"response,omitempty"`
// Request parameters, such as preferences.
Params []byte `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"`
}
func (m *Credential) Reset() { *m = Credential{} }
func (m *Credential) String() string { return proto.CompactTextString(m) }
func (*Credential) ProtoMessage() {}
func (*Credential) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *Credential) GetMethod() string {
if m != nil {
return m.Method
}
return ""
}
func (m *Credential) GetValue() string {
if m != nil {
return m.Value
}
return ""
}
func (m *Credential) GetResponse() string {
if m != nil {
return m.Response
}
return ""
}
func (m *Credential) GetParams() []byte {
if m != nil {
return m.Params
}
return nil
}
// Client handshake
type ClientHi struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
UserAgent string `protobuf:"bytes,2,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"`
Ver string `protobuf:"bytes,3,opt,name=ver" json:"ver,omitempty"`
DeviceId string `protobuf:"bytes,4,opt,name=device_id,json=deviceId" json:"device_id,omitempty"`
Lang string `protobuf:"bytes,5,opt,name=lang" json:"lang,omitempty"`
}
func (m *ClientHi) Reset() { *m = ClientHi{} }
func (m *ClientHi) String() string { return proto.CompactTextString(m) }
func (*ClientHi) ProtoMessage() {}
func (*ClientHi) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *ClientHi) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClientHi) GetUserAgent() string {
if m != nil {
return m.UserAgent
}
return ""
}
func (m *ClientHi) GetVer() string {
if m != nil {
return m.Ver
}
return ""
}
func (m *ClientHi) GetDeviceId() string {
if m != nil {
return m.DeviceId
}
return ""
}
func (m *ClientHi) GetLang() string {
if m != nil {
return m.Lang
}
return ""
}
// User creation message {acc}
type ClientAcc struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
// User being created or updated
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId" json:"user_id,omitempty"`
// The initial authentication scheme the account can use
Scheme string `protobuf:"bytes,3,opt,name=scheme" json:"scheme,omitempty"`
// Shared secret
Secret []byte `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"`
// Authenticate session with the newly created account
Login bool `protobuf:"varint,5,opt,name=login" json:"login,omitempty"`
// Indexable tags for user discovery
Tags []string `protobuf:"bytes,6,rep,name=tags" json:"tags,omitempty"`
// User initialization data when creating a new user, otherwise ignored
Desc *SetDesc `protobuf:"bytes,7,opt,name=desc" json:"desc,omitempty"`
// Credentials for verification.
Cred []*Credential `protobuf:"bytes,8,rep,name=cred" json:"cred,omitempty"`
}
func (m *ClientAcc) Reset() { *m = ClientAcc{} }
func (m *ClientAcc) String() string { return proto.CompactTextString(m) }
func (*ClientAcc) ProtoMessage() {}
func (*ClientAcc) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
func (m *ClientAcc) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClientAcc) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
func (m *ClientAcc) GetScheme() string {
if m != nil {
return m.Scheme
}
return ""
}
func (m *ClientAcc) GetSecret() []byte {
if m != nil {
return m.Secret
}
return nil
}
func (m *ClientAcc) GetLogin() bool {
if m != nil {
return m.Login
}
return false
}
func (m *ClientAcc) GetTags() []string {
if m != nil {
return m.Tags
}
return nil
}
func (m *ClientAcc) GetDesc() *SetDesc {
if m != nil {
return m.Desc
}
return nil
}
func (m *ClientAcc) GetCred() []*Credential {
if m != nil {
return m.Cred
}
return nil
}
// Login {login} message
type ClientLogin struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
// Authentication scheme
Scheme string `protobuf:"bytes,2,opt,name=scheme" json:"scheme,omitempty"`
// Shared secret
Secret []byte `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"`
// Credentials for verification.
Cred []*Credential `protobuf:"bytes,4,rep,name=cred" json:"cred,omitempty"`
}
func (m *ClientLogin) Reset() { *m = ClientLogin{} }
func (m *ClientLogin) String() string { return proto.CompactTextString(m) }
func (*ClientLogin) ProtoMessage() {}
func (*ClientLogin) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
func (m *ClientLogin) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClientLogin) GetScheme() string {
if m != nil {
return m.Scheme
}
return ""
}
func (m *ClientLogin) GetSecret() []byte {
if m != nil {
return m.Secret
}
return nil
}
func (m *ClientLogin) GetCred() []*Credential {
if m != nil {
return m.Cred
}
return nil
}
// Subscription request {sub} message
type ClientSub struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
// mirrors {set}
SetQuery *SetQuery `protobuf:"bytes,3,opt,name=set_query,json=setQuery" json:"set_query,omitempty"`
// mirrors {get}
GetQuery *GetQuery `protobuf:"bytes,4,opt,name=get_query,json=getQuery" json:"get_query,omitempty"`
}
func (m *ClientSub) Reset() { *m = ClientSub{} }
func (m *ClientSub) String() string { return proto.CompactTextString(m) }
func (*ClientSub) ProtoMessage() {}
func (*ClientSub) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
func (m *ClientSub) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClientSub) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *ClientSub) GetSetQuery() *SetQuery {
if m != nil {
return m.SetQuery
}
return nil
}
func (m *ClientSub) GetGetQuery() *GetQuery {
if m != nil {
return m.GetQuery
}
return nil
}
// Unsubscribe {leave} request message
type ClientLeave struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
Unsub bool `protobuf:"varint,3,opt,name=unsub" json:"unsub,omitempty"`
}
func (m *ClientLeave) Reset() { *m = ClientLeave{} }
func (m *ClientLeave) String() string { return proto.CompactTextString(m) }
func (*ClientLeave) ProtoMessage() {}
func (*ClientLeave) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
func (m *ClientLeave) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClientLeave) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *ClientLeave) GetUnsub() bool {
if m != nil {
return m.Unsub
}
return false
}
// ClientPub is client's request to publish data to topic subscribers {pub}
type ClientPub struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
NoEcho bool `protobuf:"varint,3,opt,name=no_echo,json=noEcho" json:"no_echo,omitempty"`
Head map[string]string `protobuf:"bytes,4,rep,name=head" json:"head,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Content []byte `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
}
func (m *ClientPub) Reset() { *m = ClientPub{} }
func (m *ClientPub) String() string { return proto.CompactTextString(m) }
func (*ClientPub) ProtoMessage() {}
func (*ClientPub) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
func (m *ClientPub) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClientPub) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *ClientPub) GetNoEcho() bool {
if m != nil {
return m.NoEcho
}
return false
}
func (m *ClientPub) GetHead() map[string]string {
if m != nil {
return m.Head
}
return nil
}
func (m *ClientPub) GetContent() []byte {
if m != nil {
return m.Content
}
return nil
}
// Query topic state {get}
type ClientGet struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
Query *GetQuery `protobuf:"bytes,3,opt,name=query" json:"query,omitempty"`
}
func (m *ClientGet) Reset() { *m = ClientGet{} }
func (m *ClientGet) String() string { return proto.CompactTextString(m) }
func (*ClientGet) ProtoMessage() {}
func (*ClientGet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
func (m *ClientGet) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClientGet) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *ClientGet) GetQuery() *GetQuery {
if m != nil {
return m.Query
}
return nil
}
// Update topic state {set}
type ClientSet struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
Query *SetQuery `protobuf:"bytes,3,opt,name=query" json:"query,omitempty"`
}
func (m *ClientSet) Reset() { *m = ClientSet{} }
func (m *ClientSet) String() string { return proto.CompactTextString(m) }
func (*ClientSet) ProtoMessage() {}
func (*ClientSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
func (m *ClientSet) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClientSet) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *ClientSet) GetQuery() *SetQuery {
if m != nil {
return m.Query
}
return nil
}
// ClientDel delete messages or topic
type ClientDel struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
What ClientDel_What `protobuf:"varint,3,opt,name=what,enum=pbx.ClientDel_What" json:"what,omitempty"`
// Delete messages by id or range of ids
DelSeq []*SeqRange `protobuf:"bytes,4,rep,name=del_seq,json=delSeq" json:"del_seq,omitempty"`
// User ID of the subscription to delete
UserId string `protobuf:"bytes,5,opt,name=user_id,json=userId" json:"user_id,omitempty"`
// Request to hard-delete messages for all users, if such option is available.
Hard bool `protobuf:"varint,6,opt,name=hard" json:"hard,omitempty"`
}
func (m *ClientDel) Reset() { *m = ClientDel{} }
func (m *ClientDel) String() string { return proto.CompactTextString(m) }
func (*ClientDel) ProtoMessage() {}
func (*ClientDel) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
func (m *ClientDel) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ClientDel) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *ClientDel) GetWhat() ClientDel_What {
if m != nil {
return m.What
}
return ClientDel_MSG
}
func (m *ClientDel) GetDelSeq() []*SeqRange {
if m != nil {
return m.DelSeq
}
return nil
}
func (m *ClientDel) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
func (m *ClientDel) GetHard() bool {
if m != nil {
return m.Hard
}
return false
}
// ClientNote is a client-generated notification for topic subscribers
type ClientNote struct {
Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
// what is being reported: "recv" - message received, "read" - message read, "kp" - typing notification