1
2
3
4
5
6
7
8 package proto3
9
10 import (
11 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
12 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
13 reflect "reflect"
14 sync "sync"
15 )
16
17 type Enum int32
18
19 const (
20 Enum_ZERO Enum = 0
21 Enum_ONE Enum = 1
22 Enum_TWO Enum = 2
23 )
24
25
26 var (
27 Enum_name = map[int32]string{
28 0: "ZERO",
29 1: "ONE",
30 2: "TWO",
31 }
32 Enum_value = map[string]int32{
33 "ZERO": 0,
34 "ONE": 1,
35 "TWO": 2,
36 }
37 )
38
39 func (x Enum) Enum() *Enum {
40 p := new(Enum)
41 *p = x
42 return p
43 }
44
45 func (x Enum) String() string {
46 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
47 }
48
49 func (Enum) Descriptor() protoreflect.EnumDescriptor {
50 return file_cmd_protoc_gen_go_testdata_proto3_enum_proto_enumTypes[0].Descriptor()
51 }
52
53 func (Enum) Type() protoreflect.EnumType {
54 return &file_cmd_protoc_gen_go_testdata_proto3_enum_proto_enumTypes[0]
55 }
56
57 func (x Enum) Number() protoreflect.EnumNumber {
58 return protoreflect.EnumNumber(x)
59 }
60
61
62 func (Enum) EnumDescriptor() ([]byte, []int) {
63 return file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDescGZIP(), []int{0}
64 }
65
66 var File_cmd_protoc_gen_go_testdata_proto3_enum_proto protoreflect.FileDescriptor
67
68 var file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDesc = []byte{
69 0x0a, 0x2c, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e,
70 0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x70, 0x72, 0x6f,
71 0x74, 0x6f, 0x33, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15,
72 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x70,
73 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2a, 0x22, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x08, 0x0a,
74 0x04, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01,
75 0x12, 0x07, 0x0a, 0x03, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x6f, 0x6f,
76 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70,
77 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74,
78 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61,
79 0x74, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
80 0x33,
81 }
82
83 var (
84 file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDescOnce sync.Once
85 file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDescData = file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDesc
86 )
87
88 func file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDescGZIP() []byte {
89 file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDescOnce.Do(func() {
90 file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDescData = protoimpl.X.CompressGZIP(file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDescData)
91 })
92 return file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDescData
93 }
94
95 var file_cmd_protoc_gen_go_testdata_proto3_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
96 var file_cmd_protoc_gen_go_testdata_proto3_enum_proto_goTypes = []interface{}{
97 (Enum)(0),
98 }
99 var file_cmd_protoc_gen_go_testdata_proto3_enum_proto_depIdxs = []int32{
100 0,
101 0,
102 0,
103 0,
104 0,
105 }
106
107 func init() { file_cmd_protoc_gen_go_testdata_proto3_enum_proto_init() }
108 func file_cmd_protoc_gen_go_testdata_proto3_enum_proto_init() {
109 if File_cmd_protoc_gen_go_testdata_proto3_enum_proto != nil {
110 return
111 }
112 type x struct{}
113 out := protoimpl.TypeBuilder{
114 File: protoimpl.DescBuilder{
115 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
116 RawDescriptor: file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDesc,
117 NumEnums: 1,
118 NumMessages: 0,
119 NumExtensions: 0,
120 NumServices: 0,
121 },
122 GoTypes: file_cmd_protoc_gen_go_testdata_proto3_enum_proto_goTypes,
123 DependencyIndexes: file_cmd_protoc_gen_go_testdata_proto3_enum_proto_depIdxs,
124 EnumInfos: file_cmd_protoc_gen_go_testdata_proto3_enum_proto_enumTypes,
125 }.Build()
126 File_cmd_protoc_gen_go_testdata_proto3_enum_proto = out.File
127 file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDesc = nil
128 file_cmd_protoc_gen_go_testdata_proto3_enum_proto_goTypes = nil
129 file_cmd_protoc_gen_go_testdata_proto3_enum_proto_depIdxs = nil
130 }
131
View as plain text