1 // Code generated by protoc-gen-go from "test.proto"
6 import proto "goprotobuf.googlecode.com/hg/proto"
10 // Reference proto, math & os imports to suppress error if they are not otherwise used.
11 var _ = proto.GetString
22 var FOO_name = map[int32]string{
25 var FOO_value = map[string]int32{
29 func NewFOO(x int32) *FOO {
33 func (x FOO) String() string {
34 return proto.EnumName(FOO_name, int32(x))
37 type GoTest_KIND int32
43 GoTest_FINGERPRINT = 3
55 var GoTest_KIND_name = map[int32]string{
70 var GoTest_KIND_value = map[string]int32{
86 func NewGoTest_KIND(x int32) *GoTest_KIND {
90 func (x GoTest_KIND) String() string {
91 return proto.EnumName(GoTest_KIND_name, int32(x))
94 type MyMessage_Color int32
102 var MyMessage_Color_name = map[int32]string{
107 var MyMessage_Color_value = map[string]int32{
113 func NewMyMessage_Color(x int32) *MyMessage_Color {
114 e := MyMessage_Color(x)
117 func (x MyMessage_Color) String() string {
118 return proto.EnumName(MyMessage_Color_name, int32(x))
122 Foo *FOO `protobuf:"varint,1,req,name=foo,enum=test_proto.FOO"`
123 XXX_unrecognized []byte
126 func (this *GoEnum) Reset() { *this = GoEnum{} }
127 func (this *GoEnum) String() string { return proto.CompactTextString(this) }
129 type GoTestField struct {
130 Label *string `protobuf:"bytes,1,req"`
131 Type *string `protobuf:"bytes,2,req"`
132 XXX_unrecognized []byte
135 func (this *GoTestField) Reset() { *this = GoTestField{} }
136 func (this *GoTestField) String() string { return proto.CompactTextString(this) }
139 Kind *int32 `protobuf:"varint,1,req"`
140 Table *string `protobuf:"bytes,2,opt"`
141 Param *int32 `protobuf:"varint,3,opt"`
142 RequiredField *GoTestField `protobuf:"bytes,4,req"`
143 RepeatedField []*GoTestField `protobuf:"bytes,5,rep"`
144 OptionalField *GoTestField `protobuf:"bytes,6,opt"`
145 F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required"`
146 F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required"`
147 F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required"`
148 F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required"`
149 F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required"`
150 F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required"`
151 F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required"`
152 F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required"`
153 F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required"`
154 F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required"`
155 F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required"`
156 F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required"`
157 F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required"`
158 F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated"`
159 F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated"`
160 F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated"`
161 F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated"`
162 F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated"`
163 F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated"`
164 F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated"`
165 F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated"`
166 F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated"`
167 F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated"`
168 F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated"`
169 F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated"`
170 F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated"`
171 F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional"`
172 F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional"`
173 F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional"`
174 F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional"`
175 F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional"`
176 F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional"`
177 F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional"`
178 F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional"`
179 F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional"`
180 F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional"`
181 F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional"`
182 F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional"`
183 F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional"`
184 F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1"`
185 F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32"`
186 F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64"`
187 F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320"`
188 F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640"`
189 F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200"`
190 F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400"`
191 F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159"`
192 F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828"`
193 F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \\\"world!\\\"\\n"`
194 F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose"`
195 F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32"`
196 F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64"`
197 F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed"`
198 F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed"`
199 F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed"`
200 F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed"`
201 F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed"`
202 F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed"`
203 F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed"`
204 F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed"`
205 F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed"`
206 F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed"`
207 F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed"`
208 Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup"`
209 Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup"`
210 Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup"`
211 XXX_unrecognized []byte
214 func (this *GoTest) Reset() { *this = GoTest{} }
215 func (this *GoTest) String() string { return proto.CompactTextString(this) }
217 const Default_GoTest_F_BoolDefaulted bool = true
218 const Default_GoTest_F_Int32Defaulted int32 = 32
219 const Default_GoTest_F_Int64Defaulted int64 = 64
220 const Default_GoTest_F_Fixed32Defaulted uint32 = 320
221 const Default_GoTest_F_Fixed64Defaulted uint64 = 640
222 const Default_GoTest_F_Uint32Defaulted uint32 = 3200
223 const Default_GoTest_F_Uint64Defaulted uint64 = 6400
224 const Default_GoTest_F_FloatDefaulted float32 = 314159
225 const Default_GoTest_F_DoubleDefaulted float64 = 271828
226 const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
228 var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
230 const Default_GoTest_F_Sint32Defaulted int32 = -32
231 const Default_GoTest_F_Sint64Defaulted int64 = -64
233 type GoTest_RequiredGroup struct {
234 RequiredField *string `protobuf:"bytes,71,req"`
235 XXX_unrecognized []byte
238 func (this *GoTest_RequiredGroup) Reset() { *this = GoTest_RequiredGroup{} }
239 func (this *GoTest_RequiredGroup) String() string { return proto.CompactTextString(this) }
241 type GoTest_RepeatedGroup struct {
242 RequiredField *string `protobuf:"bytes,81,req"`
243 XXX_unrecognized []byte
246 func (this *GoTest_RepeatedGroup) Reset() { *this = GoTest_RepeatedGroup{} }
247 func (this *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(this) }
249 type GoTest_OptionalGroup struct {
250 RequiredField *string `protobuf:"bytes,91,req"`
251 XXX_unrecognized []byte
254 func (this *GoTest_OptionalGroup) Reset() { *this = GoTest_OptionalGroup{} }
255 func (this *GoTest_OptionalGroup) String() string { return proto.CompactTextString(this) }
257 type GoSkipTest struct {
258 SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32"`
259 SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32"`
260 SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64"`
261 SkipString *string `protobuf:"bytes,14,req,name=skip_string"`
262 Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup"`
263 XXX_unrecognized []byte
266 func (this *GoSkipTest) Reset() { *this = GoSkipTest{} }
267 func (this *GoSkipTest) String() string { return proto.CompactTextString(this) }
269 type GoSkipTest_SkipGroup struct {
270 GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32"`
271 GroupString *string `protobuf:"bytes,17,req,name=group_string"`
272 XXX_unrecognized []byte
275 func (this *GoSkipTest_SkipGroup) Reset() { *this = GoSkipTest_SkipGroup{} }
276 func (this *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(this) }
278 type NonPackedTest struct {
279 A []int32 `protobuf:"varint,1,rep,name=a"`
280 XXX_unrecognized []byte
283 func (this *NonPackedTest) Reset() { *this = NonPackedTest{} }
284 func (this *NonPackedTest) String() string { return proto.CompactTextString(this) }
286 type PackedTest struct {
287 B []int32 `protobuf:"varint,1,rep,packed,name=b"`
288 XXX_unrecognized []byte
291 func (this *PackedTest) Reset() { *this = PackedTest{} }
292 func (this *PackedTest) String() string { return proto.CompactTextString(this) }
294 type InnerMessage struct {
295 Host *string `protobuf:"bytes,1,req,name=host"`
296 Port *int32 `protobuf:"varint,2,opt,name=port,def=4000"`
297 Connected *bool `protobuf:"varint,3,opt,name=connected"`
298 XXX_unrecognized []byte
301 func (this *InnerMessage) Reset() { *this = InnerMessage{} }
302 func (this *InnerMessage) String() string { return proto.CompactTextString(this) }
304 const Default_InnerMessage_Port int32 = 4000
306 type OtherMessage struct {
307 Key *int64 `protobuf:"varint,1,opt,name=key"`
308 Value []byte `protobuf:"bytes,2,opt,name=value"`
309 Weight *float32 `protobuf:"fixed32,3,opt,name=weight"`
310 Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner"`
311 XXX_unrecognized []byte
314 func (this *OtherMessage) Reset() { *this = OtherMessage{} }
315 func (this *OtherMessage) String() string { return proto.CompactTextString(this) }
317 type MyMessage struct {
318 Count *int32 `protobuf:"varint,1,req,name=count"`
319 Name *string `protobuf:"bytes,2,opt,name=name"`
320 Quote *string `protobuf:"bytes,3,opt,name=quote"`
321 Pet []string `protobuf:"bytes,4,rep,name=pet"`
322 Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner"`
323 Others []*OtherMessage `protobuf:"bytes,6,rep,name=others"`
324 Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=test_proto.MyMessage_Color"`
325 Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup"`
326 XXX_extensions map[int32][]byte
327 XXX_unrecognized []byte
330 func (this *MyMessage) Reset() { *this = MyMessage{} }
331 func (this *MyMessage) String() string { return proto.CompactTextString(this) }
333 var extRange_MyMessage = []proto.ExtensionRange{
334 proto.ExtensionRange{100, 536870911},
337 func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
338 return extRange_MyMessage
340 func (this *MyMessage) ExtensionMap() map[int32][]byte {
341 if this.XXX_extensions == nil {
342 this.XXX_extensions = make(map[int32][]byte)
344 return this.XXX_extensions
347 type MyMessage_SomeGroup struct {
348 GroupField *int32 `protobuf:"varint,9,opt,name=group_field"`
349 XXX_unrecognized []byte
352 func (this *MyMessage_SomeGroup) Reset() { *this = MyMessage_SomeGroup{} }
353 func (this *MyMessage_SomeGroup) String() string { return proto.CompactTextString(this) }
356 Data *string `protobuf:"bytes,1,opt,name=data"`
357 XXX_unrecognized []byte
360 func (this *Ext) Reset() { *this = Ext{} }
361 func (this *Ext) String() string { return proto.CompactTextString(this) }
363 var E_Ext_More = &proto.ExtensionDesc{
364 ExtendedType: (*MyMessage)(nil),
365 ExtensionType: (*Ext)(nil),
367 Name: "test_proto.more",
368 Tag: "bytes,103,opt,name=more",
371 type MessageList struct {
372 Message []*MessageList_Message `protobuf:"group,1,rep"`
373 XXX_unrecognized []byte
376 func (this *MessageList) Reset() { *this = MessageList{} }
377 func (this *MessageList) String() string { return proto.CompactTextString(this) }
379 type MessageList_Message struct {
380 Name *string `protobuf:"bytes,2,req,name=name"`
381 Count *int32 `protobuf:"varint,3,req,name=count"`
382 XXX_unrecognized []byte
385 func (this *MessageList_Message) Reset() { *this = MessageList_Message{} }
386 func (this *MessageList_Message) String() string { return proto.CompactTextString(this) }
389 proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value)
390 proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
391 proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
392 proto.RegisterExtension(E_Ext_More)