github.com/matrixorigin/matrixone@v1.2.0/pkg/pb/moerr/moerr.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: moerr.proto 3 4 package moerr 5 6 import ( 7 fmt "fmt" 8 io "io" 9 math "math" 10 math_bits "math/bits" 11 12 _ "github.com/gogo/protobuf/gogoproto" 13 proto "github.com/gogo/protobuf/proto" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 26 27 type Error struct { 28 Code uint16 `protobuf:"varint,1,opt,name=code,proto3,casttype=uint16" json:"code,omitempty"` 29 MysqlCode uint16 `protobuf:"varint,2,opt,name=mysql_code,json=mysqlCode,proto3,casttype=uint16" json:"mysql_code,omitempty"` 30 Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` 31 SqlState string `protobuf:"bytes,4,opt,name=sql_state,json=sqlState,proto3" json:"sql_state,omitempty"` 32 XXX_NoUnkeyedLiteral struct{} `json:"-"` 33 XXX_unrecognized []byte `json:"-"` 34 XXX_sizecache int32 `json:"-"` 35 } 36 37 func (m *Error) Reset() { *m = Error{} } 38 func (m *Error) String() string { return proto.CompactTextString(m) } 39 func (*Error) ProtoMessage() {} 40 func (*Error) Descriptor() ([]byte, []int) { 41 return fileDescriptor_a40d64a1a90a209d, []int{0} 42 } 43 func (m *Error) XXX_Unmarshal(b []byte) error { 44 return m.Unmarshal(b) 45 } 46 func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 47 if deterministic { 48 return xxx_messageInfo_Error.Marshal(b, m, deterministic) 49 } else { 50 b = b[:cap(b)] 51 n, err := m.MarshalToSizedBuffer(b) 52 if err != nil { 53 return nil, err 54 } 55 return b[:n], nil 56 } 57 } 58 func (m *Error) XXX_Merge(src proto.Message) { 59 xxx_messageInfo_Error.Merge(m, src) 60 } 61 func (m *Error) XXX_Size() int { 62 return m.ProtoSize() 63 } 64 func (m *Error) XXX_DiscardUnknown() { 65 xxx_messageInfo_Error.DiscardUnknown(m) 66 } 67 68 var xxx_messageInfo_Error proto.InternalMessageInfo 69 70 func (m *Error) GetCode() uint16 { 71 if m != nil { 72 return m.Code 73 } 74 return 0 75 } 76 77 func (m *Error) GetMysqlCode() uint16 { 78 if m != nil { 79 return m.MysqlCode 80 } 81 return 0 82 } 83 84 func (m *Error) GetMessage() string { 85 if m != nil { 86 return m.Message 87 } 88 return "" 89 } 90 91 func (m *Error) GetSqlState() string { 92 if m != nil { 93 return m.SqlState 94 } 95 return "" 96 } 97 98 func init() { 99 proto.RegisterType((*Error)(nil), "moerr.Error") 100 } 101 102 func init() { proto.RegisterFile("moerr.proto", fileDescriptor_a40d64a1a90a209d) } 103 104 var fileDescriptor_a40d64a1a90a209d = []byte{ 105 // 226 bytes of a gzipped FileDescriptorProto 106 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0xcd, 0x4f, 0x2d, 107 0x2a, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, 108 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, 109 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0x75, 0x32, 0x72, 0xb1, 0xba, 0x16, 110 0x15, 0xe5, 0x17, 0x09, 0xc9, 0x71, 0xb1, 0x24, 0xe7, 0xa7, 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 111 0xf0, 0x3a, 0x71, 0xfd, 0xba, 0x27, 0xcf, 0x56, 0x9a, 0x99, 0x57, 0x62, 0x68, 0x16, 0x04, 0x16, 112 0x17, 0xd2, 0xe4, 0xe2, 0xca, 0xad, 0x2c, 0x2e, 0xcc, 0x89, 0x07, 0xab, 0x62, 0xc2, 0x50, 0xc5, 113 0x09, 0x96, 0x75, 0x06, 0x29, 0x95, 0xe0, 0x62, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x95, 114 0x60, 0x56, 0x60, 0xd4, 0xe0, 0x0c, 0x82, 0x71, 0x85, 0xa4, 0xb9, 0x38, 0x41, 0x46, 0x14, 0x97, 115 0x24, 0x96, 0xa4, 0x4a, 0xb0, 0x80, 0xe5, 0x38, 0x8a, 0x0b, 0x73, 0x82, 0x41, 0x7c, 0x27, 0x87, 116 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x61, 0xc1, 0x63, 0x39, 117 0xc6, 0x28, 0x3d, 0x24, 0xcf, 0xe4, 0x26, 0x96, 0x14, 0x65, 0x56, 0xe4, 0x17, 0x65, 0xa6, 0x67, 118 0xe6, 0xc1, 0x38, 0x79, 0xa9, 0xfa, 0x05, 0xd9, 0xe9, 0xfa, 0x05, 0x49, 0xfa, 0x60, 0xcf, 0x27, 119 0xb1, 0x81, 0x3d, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x53, 0xb7, 0x33, 0xc2, 0x19, 0x01, 120 0x00, 0x00, 121 } 122 123 func (m *Error) Marshal() (dAtA []byte, err error) { 124 size := m.ProtoSize() 125 dAtA = make([]byte, size) 126 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 127 if err != nil { 128 return nil, err 129 } 130 return dAtA[:n], nil 131 } 132 133 func (m *Error) MarshalTo(dAtA []byte) (int, error) { 134 size := m.ProtoSize() 135 return m.MarshalToSizedBuffer(dAtA[:size]) 136 } 137 138 func (m *Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { 139 i := len(dAtA) 140 _ = i 141 var l int 142 _ = l 143 if m.XXX_unrecognized != nil { 144 i -= len(m.XXX_unrecognized) 145 copy(dAtA[i:], m.XXX_unrecognized) 146 } 147 if len(m.SqlState) > 0 { 148 i -= len(m.SqlState) 149 copy(dAtA[i:], m.SqlState) 150 i = encodeVarintMoerr(dAtA, i, uint64(len(m.SqlState))) 151 i-- 152 dAtA[i] = 0x22 153 } 154 if len(m.Message) > 0 { 155 i -= len(m.Message) 156 copy(dAtA[i:], m.Message) 157 i = encodeVarintMoerr(dAtA, i, uint64(len(m.Message))) 158 i-- 159 dAtA[i] = 0x1a 160 } 161 if m.MysqlCode != 0 { 162 i = encodeVarintMoerr(dAtA, i, uint64(m.MysqlCode)) 163 i-- 164 dAtA[i] = 0x10 165 } 166 if m.Code != 0 { 167 i = encodeVarintMoerr(dAtA, i, uint64(m.Code)) 168 i-- 169 dAtA[i] = 0x8 170 } 171 return len(dAtA) - i, nil 172 } 173 174 func encodeVarintMoerr(dAtA []byte, offset int, v uint64) int { 175 offset -= sovMoerr(v) 176 base := offset 177 for v >= 1<<7 { 178 dAtA[offset] = uint8(v&0x7f | 0x80) 179 v >>= 7 180 offset++ 181 } 182 dAtA[offset] = uint8(v) 183 return base 184 } 185 func (m *Error) ProtoSize() (n int) { 186 if m == nil { 187 return 0 188 } 189 var l int 190 _ = l 191 if m.Code != 0 { 192 n += 1 + sovMoerr(uint64(m.Code)) 193 } 194 if m.MysqlCode != 0 { 195 n += 1 + sovMoerr(uint64(m.MysqlCode)) 196 } 197 l = len(m.Message) 198 if l > 0 { 199 n += 1 + l + sovMoerr(uint64(l)) 200 } 201 l = len(m.SqlState) 202 if l > 0 { 203 n += 1 + l + sovMoerr(uint64(l)) 204 } 205 if m.XXX_unrecognized != nil { 206 n += len(m.XXX_unrecognized) 207 } 208 return n 209 } 210 211 func sovMoerr(x uint64) (n int) { 212 return (math_bits.Len64(x|1) + 6) / 7 213 } 214 func sozMoerr(x uint64) (n int) { 215 return sovMoerr(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 216 } 217 func (m *Error) Unmarshal(dAtA []byte) error { 218 l := len(dAtA) 219 iNdEx := 0 220 for iNdEx < l { 221 preIndex := iNdEx 222 var wire uint64 223 for shift := uint(0); ; shift += 7 { 224 if shift >= 64 { 225 return ErrIntOverflowMoerr 226 } 227 if iNdEx >= l { 228 return io.ErrUnexpectedEOF 229 } 230 b := dAtA[iNdEx] 231 iNdEx++ 232 wire |= uint64(b&0x7F) << shift 233 if b < 0x80 { 234 break 235 } 236 } 237 fieldNum := int32(wire >> 3) 238 wireType := int(wire & 0x7) 239 if wireType == 4 { 240 return fmt.Errorf("proto: Error: wiretype end group for non-group") 241 } 242 if fieldNum <= 0 { 243 return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) 244 } 245 switch fieldNum { 246 case 1: 247 if wireType != 0 { 248 return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) 249 } 250 m.Code = 0 251 for shift := uint(0); ; shift += 7 { 252 if shift >= 64 { 253 return ErrIntOverflowMoerr 254 } 255 if iNdEx >= l { 256 return io.ErrUnexpectedEOF 257 } 258 b := dAtA[iNdEx] 259 iNdEx++ 260 m.Code |= uint16(b&0x7F) << shift 261 if b < 0x80 { 262 break 263 } 264 } 265 case 2: 266 if wireType != 0 { 267 return fmt.Errorf("proto: wrong wireType = %d for field MysqlCode", wireType) 268 } 269 m.MysqlCode = 0 270 for shift := uint(0); ; shift += 7 { 271 if shift >= 64 { 272 return ErrIntOverflowMoerr 273 } 274 if iNdEx >= l { 275 return io.ErrUnexpectedEOF 276 } 277 b := dAtA[iNdEx] 278 iNdEx++ 279 m.MysqlCode |= uint16(b&0x7F) << shift 280 if b < 0x80 { 281 break 282 } 283 } 284 case 3: 285 if wireType != 2 { 286 return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) 287 } 288 var stringLen uint64 289 for shift := uint(0); ; shift += 7 { 290 if shift >= 64 { 291 return ErrIntOverflowMoerr 292 } 293 if iNdEx >= l { 294 return io.ErrUnexpectedEOF 295 } 296 b := dAtA[iNdEx] 297 iNdEx++ 298 stringLen |= uint64(b&0x7F) << shift 299 if b < 0x80 { 300 break 301 } 302 } 303 intStringLen := int(stringLen) 304 if intStringLen < 0 { 305 return ErrInvalidLengthMoerr 306 } 307 postIndex := iNdEx + intStringLen 308 if postIndex < 0 { 309 return ErrInvalidLengthMoerr 310 } 311 if postIndex > l { 312 return io.ErrUnexpectedEOF 313 } 314 m.Message = string(dAtA[iNdEx:postIndex]) 315 iNdEx = postIndex 316 case 4: 317 if wireType != 2 { 318 return fmt.Errorf("proto: wrong wireType = %d for field SqlState", wireType) 319 } 320 var stringLen uint64 321 for shift := uint(0); ; shift += 7 { 322 if shift >= 64 { 323 return ErrIntOverflowMoerr 324 } 325 if iNdEx >= l { 326 return io.ErrUnexpectedEOF 327 } 328 b := dAtA[iNdEx] 329 iNdEx++ 330 stringLen |= uint64(b&0x7F) << shift 331 if b < 0x80 { 332 break 333 } 334 } 335 intStringLen := int(stringLen) 336 if intStringLen < 0 { 337 return ErrInvalidLengthMoerr 338 } 339 postIndex := iNdEx + intStringLen 340 if postIndex < 0 { 341 return ErrInvalidLengthMoerr 342 } 343 if postIndex > l { 344 return io.ErrUnexpectedEOF 345 } 346 m.SqlState = string(dAtA[iNdEx:postIndex]) 347 iNdEx = postIndex 348 default: 349 iNdEx = preIndex 350 skippy, err := skipMoerr(dAtA[iNdEx:]) 351 if err != nil { 352 return err 353 } 354 if (skippy < 0) || (iNdEx+skippy) < 0 { 355 return ErrInvalidLengthMoerr 356 } 357 if (iNdEx + skippy) > l { 358 return io.ErrUnexpectedEOF 359 } 360 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 361 iNdEx += skippy 362 } 363 } 364 365 if iNdEx > l { 366 return io.ErrUnexpectedEOF 367 } 368 return nil 369 } 370 func skipMoerr(dAtA []byte) (n int, err error) { 371 l := len(dAtA) 372 iNdEx := 0 373 depth := 0 374 for iNdEx < l { 375 var wire uint64 376 for shift := uint(0); ; shift += 7 { 377 if shift >= 64 { 378 return 0, ErrIntOverflowMoerr 379 } 380 if iNdEx >= l { 381 return 0, io.ErrUnexpectedEOF 382 } 383 b := dAtA[iNdEx] 384 iNdEx++ 385 wire |= (uint64(b) & 0x7F) << shift 386 if b < 0x80 { 387 break 388 } 389 } 390 wireType := int(wire & 0x7) 391 switch wireType { 392 case 0: 393 for shift := uint(0); ; shift += 7 { 394 if shift >= 64 { 395 return 0, ErrIntOverflowMoerr 396 } 397 if iNdEx >= l { 398 return 0, io.ErrUnexpectedEOF 399 } 400 iNdEx++ 401 if dAtA[iNdEx-1] < 0x80 { 402 break 403 } 404 } 405 case 1: 406 iNdEx += 8 407 case 2: 408 var length int 409 for shift := uint(0); ; shift += 7 { 410 if shift >= 64 { 411 return 0, ErrIntOverflowMoerr 412 } 413 if iNdEx >= l { 414 return 0, io.ErrUnexpectedEOF 415 } 416 b := dAtA[iNdEx] 417 iNdEx++ 418 length |= (int(b) & 0x7F) << shift 419 if b < 0x80 { 420 break 421 } 422 } 423 if length < 0 { 424 return 0, ErrInvalidLengthMoerr 425 } 426 iNdEx += length 427 case 3: 428 depth++ 429 case 4: 430 if depth == 0 { 431 return 0, ErrUnexpectedEndOfGroupMoerr 432 } 433 depth-- 434 case 5: 435 iNdEx += 4 436 default: 437 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 438 } 439 if iNdEx < 0 { 440 return 0, ErrInvalidLengthMoerr 441 } 442 if depth == 0 { 443 return iNdEx, nil 444 } 445 } 446 return 0, io.ErrUnexpectedEOF 447 } 448 449 var ( 450 ErrInvalidLengthMoerr = fmt.Errorf("proto: negative length found during unmarshaling") 451 ErrIntOverflowMoerr = fmt.Errorf("proto: integer overflow") 452 ErrUnexpectedEndOfGroupMoerr = fmt.Errorf("proto: unexpected end of group") 453 )