-
Notifications
You must be signed in to change notification settings - Fork 0
/
message.pb.go
156 lines (135 loc) · 4.87 KB
/
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
// Code generated by protoc-gen-go.
// source: message.proto
// DO NOT EDIT!
/*
Package dht is a generated protocol buffer package.
It is generated from these files:
message.proto
It has these top-level messages:
Message
*/
package dht
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
type Message_Action int32
const (
Message_REGISTER Message_Action = 100
Message_UNREGISTER Message_Action = 101
Message_GET Message_Action = 102
Message_SET Message_Action = 103
Message_DELETE Message_Action = 104
Message_NOOP Message_Action = 105
)
var Message_Action_name = map[int32]string{
100: "REGISTER",
101: "UNREGISTER",
102: "GET",
103: "SET",
104: "DELETE",
105: "NOOP",
}
var Message_Action_value = map[string]int32{
"REGISTER": 100,
"UNREGISTER": 101,
"GET": 102,
"SET": 103,
"DELETE": 104,
"NOOP": 105,
}
func (x Message_Action) Enum() *Message_Action {
p := new(Message_Action)
*p = x
return p
}
func (x Message_Action) String() string {
return proto.EnumName(Message_Action_name, int32(x))
}
func (x *Message_Action) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Message_Action_value, data, "Message_Action")
if err != nil {
return err
}
*x = Message_Action(value)
return nil
}
func (Message_Action) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
type Message struct {
Action *Message_Action `protobuf:"varint,1,req,name=action,enum=dht.Message_Action" json:"action,omitempty"`
Id []byte `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
Key *string `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
Value *string `protobuf:"bytes,4,opt,name=value" json:"value,omitempty"`
Success *bool `protobuf:"varint,5,opt,name=success" json:"success,omitempty"`
Host *string `protobuf:"bytes,6,opt,name=host" json:"host,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Message) GetAction() Message_Action {
if m != nil && m.Action != nil {
return *m.Action
}
return Message_REGISTER
}
func (m *Message) GetId() []byte {
if m != nil {
return m.Id
}
return nil
}
func (m *Message) GetKey() string {
if m != nil && m.Key != nil {
return *m.Key
}
return ""
}
func (m *Message) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
func (m *Message) GetSuccess() bool {
if m != nil && m.Success != nil {
return *m.Success
}
return false
}
func (m *Message) GetHost() string {
if m != nil && m.Host != nil {
return *m.Host
}
return ""
}
func init() {
proto.RegisterType((*Message)(nil), "dht.Message")
proto.RegisterEnum("dht.Message_Action", Message_Action_name, Message_Action_value)
}
func init() { proto.RegisterFile("message.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 205 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x3c, 0x8e, 0x4f, 0x4e, 0x87, 0x30,
0x10, 0x85, 0x03, 0xe5, 0x57, 0x70, 0x04, 0x6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