forked from libp2p/go-libp2p
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chat.pb.go
237 lines (205 loc) · 7.64 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
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: chat.proto
package main
import (
fmt "fmt"
math "math"
proto "github.com/gogo/protobuf/proto"
)
// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Request_Type int32
const (
Request_SEND_MESSAGE Request_Type = 0
Request_UPDATE_PEER Request_Type = 1
)
var Request_Type_name = map[int32]string{
0: "SEND_MESSAGE",
1: "UPDATE_PEER",
}
var Request_Type_value = map[string]int32{
"SEND_MESSAGE": 0,
"UPDATE_PEER": 1,
}
func (x Request_Type) Enum() *Request_Type {
p := new(Request_Type)
*p = x
return p
}
func (x Request_Type) String() string {
return proto.EnumName(Request_Type_name, int32(x))
}
func (x *Request_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Request_Type_value, data, "Request_Type")
if err != nil {
return err
}
*x = Request_Type(value)
return nil
}
func (Request_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_8c585a45e2093e54, []int{0, 0}
}
type Request struct {
Type *Request_Type `protobuf:"varint,1,req,name=type,enum=main.Request_Type" json:"type,omitempty"`
SendMessage *SendMessage `protobuf:"bytes,2,opt,name=sendMessage" json:"sendMessage,omitempty"`
UpdatePeer *UpdatePeer `protobuf:"bytes,3,opt,name=updatePeer" json:"updatePeer,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Request) Reset() { *m = Request{} }
func (m *Request) String() string { return proto.CompactTextString(m) }
func (*Request) ProtoMessage() {}
func (*Request) Descriptor() ([]byte, []int) {
return fileDescriptor_8c585a45e2093e54, []int{0}
}
func (m *Request) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Request.Unmarshal(m, b)
}
func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Request.Marshal(b, m, deterministic)
}
func (m *Request) XXX_Merge(src proto.Message) {
xxx_messageInfo_Request.Merge(m, src)
}
func (m *Request) XXX_Size() int {
return xxx_messageInfo_Request.Size(m)
}
func (m *Request) XXX_DiscardUnknown() {
xxx_messageInfo_Request.DiscardUnknown(m)
}
var xxx_messageInfo_Request proto.InternalMessageInfo
func (m *Request) GetType() Request_Type {
if m != nil && m.Type != nil {
return *m.Type
}
return Request_SEND_MESSAGE
}
func (m *Request) GetSendMessage() *SendMessage {
if m != nil {
return m.SendMessage
}
return nil
}
func (m *Request) GetUpdatePeer() *UpdatePeer {
if m != nil {
return m.UpdatePeer
}
return nil
}
type SendMessage struct {
Data []byte `protobuf:"bytes,1,req,name=data" json:"data,omitempty"`
Created *int64 `protobuf:"varint,2,req,name=created" json:"created,omitempty"`
Id []byte `protobuf:"bytes,3,req,name=id" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SendMessage) Reset() { *m = SendMessage{} }
func (m *SendMessage) String() string { return proto.CompactTextString(m) }
func (*SendMessage) ProtoMessage() {}
func (*SendMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_8c585a45e2093e54, []int{1}
}
func (m *SendMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SendMessage.Unmarshal(m, b)
}
func (m *SendMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SendMessage.Marshal(b, m, deterministic)
}
func (m *SendMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_SendMessage.Merge(m, src)
}
func (m *SendMessage) XXX_Size() int {
return xxx_messageInfo_SendMessage.Size(m)
}
func (m *SendMessage) XXX_DiscardUnknown() {
xxx_messageInfo_SendMessage.DiscardUnknown(m)
}
var xxx_messageInfo_SendMessage proto.InternalMessageInfo
func (m *SendMessage) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func (m *SendMessage) GetCreated() int64 {
if m != nil && m.Created != nil {
return *m.Created
}
return 0
}
func (m *SendMessage) GetId() []byte {
if m != nil {
return m.Id
}
return nil
}
type UpdatePeer struct {
UserHandle []byte `protobuf:"bytes,1,opt,name=userHandle" json:"userHandle,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdatePeer) Reset() { *m = UpdatePeer{} }
func (m *UpdatePeer) String() string { return proto.CompactTextString(m) }
func (*UpdatePeer) ProtoMessage() {}
func (*UpdatePeer) Descriptor() ([]byte, []int) {
return fileDescriptor_8c585a45e2093e54, []int{2}
}
func (m *UpdatePeer) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdatePeer.Unmarshal(m, b)
}
func (m *UpdatePeer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdatePeer.Marshal(b, m, deterministic)
}
func (m *UpdatePeer) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdatePeer.Merge(m, src)
}
func (m *UpdatePeer) XXX_Size() int {
return xxx_messageInfo_UpdatePeer.Size(m)
}
func (m *UpdatePeer) XXX_DiscardUnknown() {
xxx_messageInfo_UpdatePeer.DiscardUnknown(m)
}
var xxx_messageInfo_UpdatePeer proto.InternalMessageInfo
func (m *UpdatePeer) GetUserHandle() []byte {
if m != nil {
return m.UserHandle
}
return nil
}
func init() {
proto.RegisterEnum("main.Request_Type", Request_Type_name, Request_Type_value)
proto.RegisterType((*Request)(nil), "main.Request")
proto.RegisterType((*SendMessage)(nil), "main.SendMessage")
proto.RegisterType((*UpdatePeer)(nil), "main.UpdatePeer")
}
func init() { proto.RegisterFile("chat.proto", fileDescriptor_8c585a45e2093e54) }
var fileDescriptor_8c585a45e2093e54 = []byte{
// 251 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x51, 0x4b, 0xc3, 0x30,
0x14, 0x85, 0x4d, 0x5a, 0x18, 0xdc, 0x96, 0x59, 0xef, 0x53, 0x9e, 0xa4, 0xf4, 0x41, 0x2a, 0x48,
0x91, 0xf9, 0x0b, 0x06, 0x0b, 0x0a, 0x32, 0x29, 0xe9, 0xf6, 0x3c, 0xc2, 0x72, 0xd1, 0x82, 0x76,
0xb5, 0x49, 0x1f, 0xf6, 0xfb, 0xfc, 0x63, 0xd2, 0x4c, 0xb7, 0xbc, 0x25, 0xe7, 0x7c, 0x87, 0x73,
0xef, 0x05, 0xd8, 0x7f, 0x68, 0x57, 0xf5, 0xc3, 0xc1, 0x1d, 0x30, 0xfe, 0xd2, 0x6d, 0x57, 0xfc,
0x30, 0x98, 0x29, 0xfa, 0x1e, 0xc9, 0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