-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.pb.go
140 lines (118 loc) · 4.28 KB
/
test.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
// Code generated by protoc-gen-go.
// source: test.proto
// DO NOT EDIT!
/*
Package example is a generated protocol buffer package.
It is generated from these files:
test.proto
It has these top-level messages:
Test
*/
package example
import proto "uframework/message/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.
const _ = proto.ProtoPackageIsVersion1
type FOO int32
const (
FOO_X FOO = 17
)
var FOO_name = map[int32]string{
17: "X",
}
var FOO_value = map[string]int32{
"X": 17,
}
func (x FOO) Enum() *FOO {
p := new(FOO)
*p = x
return p
}
func (x FOO) String() string {
return proto.EnumName(FOO_name, int32(x))
}
func (x *FOO) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO")
if err != nil {
return err
}
*x = FOO(value)
return nil
}
func (FOO) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type Test struct {
Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"`
Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"`
Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"`
Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Test) Reset() { *m = Test{} }
func (m *Test) String() string { return proto.CompactTextString(m) }
func (*Test) ProtoMessage() {}
func (*Test) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
const Default_Test_Type int32 = 77
func (m *Test) GetLabel() string {
if m != nil && m.Label != nil {
return *m.Label
}
return ""
}
func (m *Test) GetType() int32 {
if m != nil && m.Type != nil {
return *m.Type
}
return Default_Test_Type
}
func (m *Test) GetReps() []int64 {
if m != nil {
return m.Reps
}
return nil
}
func (m *Test) GetOptionalgroup() *Test_OptionalGroup {
if m != nil {
return m.Optionalgroup
}
return nil
}
type Test_OptionalGroup struct {
RequiredField *string `protobuf:"bytes,5,req,name=RequiredField" json:"RequiredField,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} }
func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) }
func (*Test_OptionalGroup) ProtoMessage() {}
func (*Test_OptionalGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
func (m *Test_OptionalGroup) GetRequiredField() string {
if m != nil && m.RequiredField != nil {
return *m.RequiredField
}
return ""
}
func init() {
proto.RegisterType((*Test)(nil), "example.Test")
proto.RegisterType((*Test_OptionalGroup)(nil), "example.Test.OptionalGroup")
proto.RegisterEnum("example.FOO", FOO_name, FOO_value)
}
var fileDescriptor0 = []byte{
// 179 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0xcd, 0xb1, 0x0a, 0xc2, 0x30,
0x14, 0x85, 0x61, 0xd2, 0x24, 0x88, 0x97, 0x06, 0x6a, 0x40, 0x08, 0xba, 0x04, 0x07, 0x09, 0x0e,
0x19, 0xba, 0x14, 0x7c, 0x80, 0x3a, 0x16, 0xc4, 0xc1, 0xb5, 0xd2, 0x8b, 0x14, 0xa2, 0x89, 0x69,
0x0a, 0xfa, 0x18, 0xbe, 0xb1, 0x14, 0xba, 0xb8, 0x1e, 0x7e, 0xbe, 0x03, 0x90, 0x70, 0x48, 0x36,
0x44, 0x9f, 0xbc, 0x5c, 0xe0, 0xbb, 0x7d, 0x04, 0x87, 0xbb, 0x2f, 0x01, 0x76, 0xc1, 0x21, 0x49,
0x01, 0xdc, 0xb5, 0x37, 0x74, 0x8a, 0xe8, 0xcc, 0x2c, 0x65, 0x01, 0x2c, 0x7d, 0x02, 0xaa, 0x4c,
0x13, 0xc3, 0x8f, 0x59, 0x55, 0xc9, 0x1c, 0x58, 0xc4, 0x30, 0x28, 0xaa, 0xa9, 0xa1, 0xb2, 0x04,
0xe1, 0x43, 0xea, 0xfd, 0xb3, 0x75, 0xf7, 0xe8, 0xc7, 0xa0, 0x98, 0x26, 0x06, 0xca, 0xad, 0x9d,
0x61, 0x3b, 0xa1, 0xb6, 0x99, 0x93, 0xd3, 0x94, 0x6c, 0xf6, 0x20, 0xfe, 0x06, 0xb9, 0x06, 0x71,
0xc6, 0xd7, 0xd8, 0x47, 0xec, 0xea, 0x1e, 0x5d, 0xa7, 0xf8, 0xf4, 0x7d, 0xc8, 0x81, 0xd6, 0x4d,
0x23, 0x39, 0x90, 0x6b, 0xb1, 0xfa, 0x05, 0x00, 0x00, 0xff, 0xff, 0x24, 0xb1, 0x18, 0x6a, 0xb7,
0x00, 0x00, 0x00,
}