blob: b2379963b1cb26effc064217eaa4f7b57ce23a3d [file] [log] [blame]
Rob Pikeaaa3a622010-03-20 22:32:34 -07001// Code generated by protoc-gen-go from "test.proto"
2// DO NOT EDIT!
3
4package test_proto
5
6import "goprotobuf.googlecode.com/hg/proto"
7
8type FOO int32
9const (
10 FOO_FOO1 = 1
11)
12var FOO_name = map[int32] string {
13 1: "FOO1",
14}
15var FOO_value = map[string] int32 {
16 "FOO1": 1,
17}
18func NewFOO(x int32) *FOO {
19 e := FOO(x)
20 return &e
21}
22
23type GoTest_KIND int32
24const (
25 GoTest_VOID = 0
26 GoTest_BOOL = 1
27 GoTest_BYTES = 2
28 GoTest_FINGERPRINT = 3
29 GoTest_FLOAT = 4
30 GoTest_INT = 5
31 GoTest_STRING = 6
32 GoTest_TIME = 7
33 GoTest_TUPLE = 8
34 GoTest_ARRAY = 9
35 GoTest_MAP = 10
36 GoTest_TABLE = 11
37 GoTest_FUNCTION = 12
38)
39var GoTest_KIND_name = map[int32] string {
40 0: "VOID",
41 1: "BOOL",
42 2: "BYTES",
43 3: "FINGERPRINT",
44 4: "FLOAT",
45 5: "INT",
46 6: "STRING",
47 7: "TIME",
48 8: "TUPLE",
49 9: "ARRAY",
50 10: "MAP",
51 11: "TABLE",
52 12: "FUNCTION",
53}
54var GoTest_KIND_value = map[string] int32 {
55 "VOID": 0,
56 "BOOL": 1,
57 "BYTES": 2,
58 "FINGERPRINT": 3,
59 "FLOAT": 4,
60 "INT": 5,
61 "STRING": 6,
62 "TIME": 7,
63 "TUPLE": 8,
64 "ARRAY": 9,
65 "MAP": 10,
66 "TABLE": 11,
67 "FUNCTION": 12,
68}
69func NewGoTest_KIND(x int32) *GoTest_KIND {
70 e := GoTest_KIND(x)
71 return &e
72}
73
74type MyMessage_Color int32
75const (
76 MyMessage_RED = 0
77 MyMessage_GREEN = 1
78 MyMessage_BLUE = 2
79)
80var MyMessage_Color_name = map[int32] string {
81 0: "RED",
82 1: "GREEN",
83 2: "BLUE",
84}
85var MyMessage_Color_value = map[string] int32 {
86 "RED": 0,
87 "GREEN": 1,
88 "BLUE": 2,
89}
90func NewMyMessage_Color(x int32) *MyMessage_Color {
91 e := MyMessage_Color(x)
92 return &e
93}
94
95type GoEnum struct {
96 Foo *FOO "PB(varint,1,req,name=foo,enum=test_proto.FOO)"
97 XXX_unrecognized []byte
98}
99func (this *GoEnum) Reset() {
100 *this = GoEnum{}
101}
102func NewGoEnum() *GoEnum {
103 return new(GoEnum)
104}
105
106type GoTestField struct {
107 Label *string "PB(bytes,1,req)"
108 Type *string "PB(bytes,2,req)"
109 XXX_unrecognized []byte
110}
111func (this *GoTestField) Reset() {
112 *this = GoTestField{}
113}
114func NewGoTestField() *GoTestField {
115 return new(GoTestField)
116}
117
118type GoTest struct {
119 Kind *int32 "PB(varint,1,req)"
120 Table *string "PB(bytes,2,opt)"
121 Param *int32 "PB(varint,3,opt)"
122 RequiredField *GoTestField "PB(bytes,4,req)"
123 RepeatedField []*GoTestField "PB(bytes,5,rep)"
124 OptionalField *GoTestField "PB(bytes,6,opt)"
125 F_BoolRequired *bool "PB(varint,10,req,name=F_Bool_required)"
126 F_Int32Required *int32 "PB(varint,11,req,name=F_Int32_required)"
127 F_Int64Required *int64 "PB(varint,12,req,name=F_Int64_required)"
128 F_Fixed32Required *uint32 "PB(fixed32,13,req,name=F_Fixed32_required)"
129 F_Fixed64Required *uint64 "PB(fixed64,14,req,name=F_Fixed64_required)"
130 F_Uint32Required *uint32 "PB(varint,15,req,name=F_Uint32_required)"
131 F_Uint64Required *uint64 "PB(varint,16,req,name=F_Uint64_required)"
132 F_FloatRequired *float32 "PB(fixed32,17,req,name=F_Float_required)"
133 F_DoubleRequired *float64 "PB(fixed64,18,req,name=F_Double_required)"
134 F_StringRequired *string "PB(bytes,19,req,name=F_String_required)"
135 F_BytesRequired []byte "PB(bytes,101,req,name=F_Bytes_required)"
136 F_Sint32Required *int32 "PB(zigzag32,102,req,name=F_Sint32_required)"
137 F_Sint64Required *int64 "PB(zigzag64,103,req,name=F_Sint64_required)"
138 F_BoolRepeated []bool "PB(varint,20,rep,name=F_Bool_repeated)"
139 F_Int32Repeated []int32 "PB(varint,21,rep,name=F_Int32_repeated)"
140 F_Int64Repeated []int64 "PB(varint,22,rep,name=F_Int64_repeated)"
141 F_Fixed32Repeated []uint32 "PB(fixed32,23,rep,name=F_Fixed32_repeated)"
142 F_Fixed64Repeated []uint64 "PB(fixed64,24,rep,name=F_Fixed64_repeated)"
143 F_Uint32Repeated []uint32 "PB(varint,25,rep,name=F_Uint32_repeated)"
144 F_Uint64Repeated []uint64 "PB(varint,26,rep,name=F_Uint64_repeated)"
145 F_FloatRepeated []float32 "PB(fixed32,27,rep,name=F_Float_repeated)"
146 F_DoubleRepeated []float64 "PB(fixed64,28,rep,name=F_Double_repeated)"
147 F_StringRepeated []string "PB(bytes,29,rep,name=F_String_repeated)"
148 F_BytesRepeated [][]byte "PB(bytes,201,rep,name=F_Bytes_repeated)"
149 F_Sint32Repeated []int32 "PB(zigzag32,202,rep,name=F_Sint32_repeated)"
150 F_Sint64Repeated []int64 "PB(zigzag64,203,rep,name=F_Sint64_repeated)"
151 F_BoolOptional *bool "PB(varint,30,opt,name=F_Bool_optional)"
152 F_Int32Optional *int32 "PB(varint,31,opt,name=F_Int32_optional)"
153 F_Int64Optional *int64 "PB(varint,32,opt,name=F_Int64_optional)"
154 F_Fixed32Optional *uint32 "PB(fixed32,33,opt,name=F_Fixed32_optional)"
155 F_Fixed64Optional *uint64 "PB(fixed64,34,opt,name=F_Fixed64_optional)"
156 F_Uint32Optional *uint32 "PB(varint,35,opt,name=F_Uint32_optional)"
157 F_Uint64Optional *uint64 "PB(varint,36,opt,name=F_Uint64_optional)"
158 F_FloatOptional *float32 "PB(fixed32,37,opt,name=F_Float_optional)"
159 F_DoubleOptional *float64 "PB(fixed64,38,opt,name=F_Double_optional)"
160 F_StringOptional *string "PB(bytes,39,opt,name=F_String_optional)"
161 F_BytesOptional []byte "PB(bytes,301,opt,name=F_Bytes_optional)"
162 F_Sint32Optional *int32 "PB(zigzag32,302,opt,name=F_Sint32_optional)"
163 F_Sint64Optional *int64 "PB(zigzag64,303,opt,name=F_Sint64_optional)"
164 F_BoolDefaulted *bool "PB(varint,40,opt,name=F_Bool_defaulted,def=1)"
165 F_Int32Defaulted *int32 "PB(varint,41,opt,name=F_Int32_defaulted,def=32)"
166 F_Int64Defaulted *int64 "PB(varint,42,opt,name=F_Int64_defaulted,def=64)"
167 F_Fixed32Defaulted *uint32 "PB(fixed32,43,opt,name=F_Fixed32_defaulted,def=320)"
168 F_Fixed64Defaulted *uint64 "PB(fixed64,44,opt,name=F_Fixed64_defaulted,def=640)"
169 F_Uint32Defaulted *uint32 "PB(varint,45,opt,name=F_Uint32_defaulted,def=3200)"
170 F_Uint64Defaulted *uint64 "PB(varint,46,opt,name=F_Uint64_defaulted,def=6400)"
171 F_FloatDefaulted *float32 "PB(fixed32,47,opt,name=F_Float_defaulted,def=314159)"
172 F_DoubleDefaulted *float64 "PB(fixed64,48,opt,name=F_Double_defaulted,def=271828)"
173 F_StringDefaulted *string "PB(bytes,49,opt,name=F_String_defaulted,def=hello, \\\"world!\\\"\\n)"
174 F_BytesDefaulted []byte "PB(bytes,401,opt,name=F_Bytes_defaulted,def=Bignose)"
175 F_Sint32Defaulted *int32 "PB(zigzag32,402,opt,name=F_Sint32_defaulted,def=-32)"
176 F_Sint64Defaulted *int64 "PB(zigzag64,403,opt,name=F_Sint64_defaulted,def=-64)"
177 Requiredgroup *GoTest_RequiredGroup "PB(group,70,req,name=requiredgroup)"
178 Repeatedgroup []*GoTest_RepeatedGroup "PB(group,80,rep,name=repeatedgroup)"
179 Optionalgroup *GoTest_OptionalGroup "PB(group,90,opt,name=optionalgroup)"
180 XXX_unrecognized []byte
181}
182func (this *GoTest) Reset() {
183 *this = GoTest{}
184}
185func NewGoTest() *GoTest {
186 return new(GoTest)
187}
188const Default_GoTest_F_BoolDefaulted bool = true
189const Default_GoTest_F_Int32Defaulted int32 = 32
190const Default_GoTest_F_Int64Defaulted int64 = 64
191const Default_GoTest_F_Fixed32Defaulted uint32 = 320
192const Default_GoTest_F_Fixed64Defaulted uint64 = 640
193const Default_GoTest_F_Uint32Defaulted uint32 = 3200
194const Default_GoTest_F_Uint64Defaulted uint64 = 6400
195const Default_GoTest_F_FloatDefaulted float32 = 314159
196const Default_GoTest_F_DoubleDefaulted float64 = 271828
197const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
198var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
199const Default_GoTest_F_Sint32Defaulted int32 = -32
200const Default_GoTest_F_Sint64Defaulted int64 = -64
201
202type GoTest_RequiredGroup struct {
203 RequiredField *string "PB(bytes,71,req)"
204 XXX_unrecognized []byte
205}
206func (this *GoTest_RequiredGroup) Reset() {
207 *this = GoTest_RequiredGroup{}
208}
209func NewGoTest_RequiredGroup() *GoTest_RequiredGroup {
210 return new(GoTest_RequiredGroup)
211}
212
213type GoTest_RepeatedGroup struct {
214 RequiredField *string "PB(bytes,81,req)"
215 XXX_unrecognized []byte
216}
217func (this *GoTest_RepeatedGroup) Reset() {
218 *this = GoTest_RepeatedGroup{}
219}
220func NewGoTest_RepeatedGroup() *GoTest_RepeatedGroup {
221 return new(GoTest_RepeatedGroup)
222}
223
224type GoTest_OptionalGroup struct {
225 RequiredField *string "PB(bytes,91,req)"
226 XXX_unrecognized []byte
227}
228func (this *GoTest_OptionalGroup) Reset() {
229 *this = GoTest_OptionalGroup{}
230}
231func NewGoTest_OptionalGroup() *GoTest_OptionalGroup {
232 return new(GoTest_OptionalGroup)
233}
234
235type GoSkipTest struct {
236 SkipInt32 *int32 "PB(varint,11,req,name=skip_int32)"
237 SkipFixed32 *uint32 "PB(fixed32,12,req,name=skip_fixed32)"
238 SkipFixed64 *uint64 "PB(fixed64,13,req,name=skip_fixed64)"
239 SkipString *string "PB(bytes,14,req,name=skip_string)"
240 Skipgroup *GoSkipTest_SkipGroup "PB(group,15,req,name=skipgroup)"
241 XXX_unrecognized []byte
242}
243func (this *GoSkipTest) Reset() {
244 *this = GoSkipTest{}
245}
246func NewGoSkipTest() *GoSkipTest {
247 return new(GoSkipTest)
248}
249
250type GoSkipTest_SkipGroup struct {
251 GroupInt32 *int32 "PB(varint,16,req,name=group_int32)"
252 GroupString *string "PB(bytes,17,req,name=group_string)"
253 XXX_unrecognized []byte
254}
255func (this *GoSkipTest_SkipGroup) Reset() {
256 *this = GoSkipTest_SkipGroup{}
257}
258func NewGoSkipTest_SkipGroup() *GoSkipTest_SkipGroup {
259 return new(GoSkipTest_SkipGroup)
260}
261
262type InnerMessage struct {
263 Host *string "PB(bytes,1,req,name=host)"
264 Port *int32 "PB(varint,2,opt,name=port,def=4000)"
265 Connected *bool "PB(varint,3,opt,name=connected)"
266 XXX_unrecognized []byte
267}
268func (this *InnerMessage) Reset() {
269 *this = InnerMessage{}
270}
271func NewInnerMessage() *InnerMessage {
272 return new(InnerMessage)
273}
274const Default_InnerMessage_Port int32 = 4000
275
276type OtherMessage struct {
277 Key *int64 "PB(varint,1,opt,name=key)"
278 Value []byte "PB(bytes,2,opt,name=value)"
279 Weight *float32 "PB(fixed32,3,opt,name=weight)"
280 Inner *InnerMessage "PB(bytes,4,opt,name=inner)"
281 XXX_unrecognized []byte
282}
283func (this *OtherMessage) Reset() {
284 *this = OtherMessage{}
285}
286func NewOtherMessage() *OtherMessage {
287 return new(OtherMessage)
288}
289
290type MyMessage struct {
291 Count *int32 "PB(varint,1,req,name=count)"
292 Name *string "PB(bytes,2,opt,name=name)"
293 Quote *string "PB(bytes,3,opt,name=quote)"
294 Pet []string "PB(bytes,4,rep,name=pet)"
295 Inner *InnerMessage "PB(bytes,5,opt,name=inner)"
296 Others []*OtherMessage "PB(bytes,6,rep,name=others)"
297 Bikeshed *MyMessage_Color "PB(varint,7,opt,name=bikeshed,enum=test_proto.MyMessage_Color)"
298 XXX_unrecognized []byte
299}
300func (this *MyMessage) Reset() {
301 *this = MyMessage{}
302}
303func NewMyMessage() *MyMessage {
304 return new(MyMessage)
305}
306
307type MessageList struct {
308 Message []*MessageList_Message "PB(group,1,rep,name=message)"
309 XXX_unrecognized []byte
310}
311func (this *MessageList) Reset() {
312 *this = MessageList{}
313}
314func NewMessageList() *MessageList {
315 return new(MessageList)
316}
317
318type MessageList_Message struct {
319 Name *string "PB(bytes,2,req,name=name)"
320 Count *int32 "PB(varint,3,req,name=count)"
321 XXX_unrecognized []byte
322}
323func (this *MessageList_Message) Reset() {
324 *this = MessageList_Message{}
325}
326func NewMessageList_Message() *MessageList_Message {
327 return new(MessageList_Message)
328}
329
330func init() {
331 proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value)
332 proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
333 proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
334}