-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.pb.go
184 lines (154 loc) · 4.62 KB
/
header.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
// Code generated by protoc-gen-go from "header.proto"
// DO NOT EDIT!
package main
import proto "code.google.com/p/goprotobuf/proto"
import "math"
// Reference proto and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
type Header_Compression int32
const (
Header_NONE Header_Compression = 0
Header_ZLIB Header_Compression = 1
Header_SNAPPY Header_Compression = 2
)
var Header_Compression_name = map[int32]string{
0: "NONE",
1: "ZLIB",
2: "SNAPPY",
}
var Header_Compression_value = map[string]int32{
"NONE": 0,
"ZLIB": 1,
"SNAPPY": 2,
}
func (x Header_Compression) Enum() *Header_Compression {
p := new(Header_Compression)
*p = x
return p
}
func (x Header_Compression) String() string {
return proto.EnumName(Header_Compression_name, int32(x))
}
type Header_Type int32
const (
Header_QUERY Header_Type = 0
Header_RESPONSE Header_Type = 1
Header_ERROR Header_Type = 2
Header_EVENT Header_Type = 3
)
var Header_Type_name = map[int32]string{
0: "QUERY",
1: "RESPONSE",
2: "ERROR",
3: "EVENT",
}
var Header_Type_value = map[string]int32{
"QUERY": 0,
"RESPONSE": 1,
"ERROR": 2,
"EVENT": 3,
}
func (x Header_Type) Enum() *Header_Type {
p := new(Header_Type)
*p = x
return p
}
func (x Header_Type) String() string {
return proto.EnumName(Header_Type_name, int32(x))
}
type Header_Hash_Method int32
const (
Header_Hash_MD5 Header_Hash_Method = 0
)
var Header_Hash_Method_name = map[int32]string{
0: "MD5",
}
var Header_Hash_Method_value = map[string]int32{
"MD5": 0,
}
func (x Header_Hash_Method) Enum() *Header_Hash_Method {
p := new(Header_Hash_Method)
*p = x
return p
}
func (x Header_Hash_Method) String() string {
return proto.EnumName(Header_Hash_Method_name, int32(x))
}
type Header struct {
Id *uint32 `protobuf:"varint,1,opt,name=id,def=0" json:"id,omitempty"`
Path []byte `protobuf:"bytes,2,req,name=path" json:"path,omitempty"`
Length *int32 `protobuf:"varint,3,req,name=length" json:"length,omitempty"`
Compression *Header_Compression `protobuf:"varint,4,opt,name=compression,enum=main.Header_Compression,def=0" json:"compression,omitempty"`
Type *Header_Type `protobuf:"varint,5,opt,name=type,enum=main.Header_Type,def=3" json:"type,omitempty"`
Hash *Header_Hash `protobuf:"bytes,6,opt,name=hash" json:"hash,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (this *Header) Reset() { *this = Header{} }
func (this *Header) String() string { return proto.CompactTextString(this) }
func (*Header) ProtoMessage() {}
const Default_Header_Id uint32 = 0
const Default_Header_Compression Header_Compression = Header_NONE
const Default_Header_Type Header_Type = Header_EVENT
func (this *Header) GetId() uint32 {
if this != nil && this.Id != nil {
return *this.Id
}
return Default_Header_Id
}
func (this *Header) GetPath() []byte {
if this != nil {
return this.Path
}
return nil
}
func (this *Header) GetLength() int32 {
if this != nil && this.Length != nil {
return *this.Length
}
return 0
}
func (this *Header) GetCompression() Header_Compression {
if this != nil && this.Compression != nil {
return *this.Compression
}
return Default_Header_Compression
}
func (this *Header) GetType() Header_Type {
if this != nil && this.Type != nil {
return *this.Type
}
return Default_Header_Type
}
func (this *Header) GetHash() *Header_Hash {
if this != nil {
return this.Hash
}
return nil
}
type Header_Hash struct {
Method *Header_Hash_Method `protobuf:"varint,1,req,name=method,enum=main.Header_Hash_Method,def=0" json:"method,omitempty"`
Value []byte `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (this *Header_Hash) Reset() { *this = Header_Hash{} }
func (this *Header_Hash) String() string { return proto.CompactTextString(this) }
func (*Header_Hash) ProtoMessage() {}
const Default_Header_Hash_Method Header_Hash_Method = Header_Hash_MD5
func (this *Header_Hash) GetMethod() Header_Hash_Method {
if this != nil && this.Method != nil {
return *this.Method
}
return Default_Header_Hash_Method
}
func (this *Header_Hash) GetValue() []byte {
if this != nil {
return this.Value
}
return nil
}
func init() {
proto.RegisterEnum("main.Header_Compression", Header_Compression_name, Header_Compression_value)
proto.RegisterEnum("main.Header_Type", Header_Type_name, Header_Type_value)
proto.RegisterEnum("main.Header_Hash_Method", Header_Hash_Method_name, Header_Hash_Method_value)
}