github.com/songzhibin97/gkit@v1.2.13/errors/errors.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.26.0 4 // protoc v3.11.4 5 // source: errors.proto 6 7 package errors 8 9 import ( 10 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 reflect "reflect" 13 sync "sync" 14 ) 15 16 const ( 17 // Verify that this generated code is sufficiently up-to-date. 18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 // Verify that runtime/protoimpl is sufficiently up-to-date. 20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 ) 22 23 type Error struct { 24 state protoimpl.MessageState 25 sizeCache protoimpl.SizeCache 26 unknownFields protoimpl.UnknownFields 27 28 // code: status code 29 Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` 30 // reason: 31 Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` 32 // message: 33 Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` 34 // metadata: 35 Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 36 } 37 38 func (x *Error) Reset() { 39 *x = Error{} 40 if protoimpl.UnsafeEnabled { 41 mi := &file_errors_proto_msgTypes[0] 42 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 43 ms.StoreMessageInfo(mi) 44 } 45 } 46 47 func (x *Error) String() string { 48 return protoimpl.X.MessageStringOf(x) 49 } 50 51 func (*Error) ProtoMessage() {} 52 53 func (x *Error) ProtoReflect() protoreflect.Message { 54 mi := &file_errors_proto_msgTypes[0] 55 if protoimpl.UnsafeEnabled && x != nil { 56 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 57 if ms.LoadMessageInfo() == nil { 58 ms.StoreMessageInfo(mi) 59 } 60 return ms 61 } 62 return mi.MessageOf(x) 63 } 64 65 // Deprecated: Use Error.ProtoReflect.Descriptor instead. 66 func (*Error) Descriptor() ([]byte, []int) { 67 return file_errors_proto_rawDescGZIP(), []int{0} 68 } 69 70 func (x *Error) GetCode() int32 { 71 if x != nil { 72 return x.Code 73 } 74 return 0 75 } 76 77 func (x *Error) GetReason() string { 78 if x != nil { 79 return x.Reason 80 } 81 return "" 82 } 83 84 func (x *Error) GetMessage() string { 85 if x != nil { 86 return x.Message 87 } 88 return "" 89 } 90 91 func (x *Error) GetMetadata() map[string]string { 92 if x != nil { 93 return x.Metadata 94 } 95 return nil 96 } 97 98 var File_errors_proto protoreflect.FileDescriptor 99 100 var file_errors_proto_rawDesc = []byte{ 101 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 102 0x67, 0x6b, 0x69, 0x74, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x05, 103 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 104 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 105 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 106 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 107 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x6d, 108 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 109 0x67, 0x6b, 0x69, 0x74, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 110 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 111 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 112 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 113 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 114 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 115 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x3b, 0x65, 0x72, 0x72, 116 0x6f, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 117 } 118 119 var ( 120 file_errors_proto_rawDescOnce sync.Once 121 file_errors_proto_rawDescData = file_errors_proto_rawDesc 122 ) 123 124 func file_errors_proto_rawDescGZIP() []byte { 125 file_errors_proto_rawDescOnce.Do(func() { 126 file_errors_proto_rawDescData = protoimpl.X.CompressGZIP(file_errors_proto_rawDescData) 127 }) 128 return file_errors_proto_rawDescData 129 } 130 131 var file_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 132 var file_errors_proto_goTypes = []interface{}{ 133 (*Error)(nil), // 0: gkit.errors.Error 134 nil, // 1: gkit.errors.Error.MetadataEntry 135 } 136 var file_errors_proto_depIdxs = []int32{ 137 1, // 0: gkit.errors.Error.metadata:type_name -> gkit.errors.Error.MetadataEntry 138 1, // [1:1] is the sub-list for method output_type 139 1, // [1:1] is the sub-list for method input_type 140 1, // [1:1] is the sub-list for extension type_name 141 1, // [1:1] is the sub-list for extension extendee 142 0, // [0:1] is the sub-list for field type_name 143 } 144 145 func init() { file_errors_proto_init() } 146 func file_errors_proto_init() { 147 if File_errors_proto != nil { 148 return 149 } 150 if !protoimpl.UnsafeEnabled { 151 file_errors_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 152 switch v := v.(*Error); i { 153 case 0: 154 return &v.state 155 case 1: 156 return &v.sizeCache 157 case 2: 158 return &v.unknownFields 159 default: 160 return nil 161 } 162 } 163 } 164 type x struct{} 165 out := protoimpl.TypeBuilder{ 166 File: protoimpl.DescBuilder{ 167 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 168 RawDescriptor: file_errors_proto_rawDesc, 169 NumEnums: 0, 170 NumMessages: 2, 171 NumExtensions: 0, 172 NumServices: 0, 173 }, 174 GoTypes: file_errors_proto_goTypes, 175 DependencyIndexes: file_errors_proto_depIdxs, 176 MessageInfos: file_errors_proto_msgTypes, 177 }.Build() 178 File_errors_proto = out.File 179 file_errors_proto_rawDesc = nil 180 file_errors_proto_goTypes = nil 181 file_errors_proto_depIdxs = nil 182 }