github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/util/unresolved_addr.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: util/unresolved_addr.proto 3 4 package util 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 // UnresolvedAddr is an unresolved version of net.Addr. 27 type UnresolvedAddr struct { 28 NetworkField string `protobuf:"bytes,1,opt,name=network_field,json=networkField" json:"network_field"` 29 AddressField string `protobuf:"bytes,2,opt,name=address_field,json=addressField" json:"address_field"` 30 } 31 32 func (m *UnresolvedAddr) Reset() { *m = UnresolvedAddr{} } 33 func (*UnresolvedAddr) ProtoMessage() {} 34 func (*UnresolvedAddr) Descriptor() ([]byte, []int) { 35 return fileDescriptor_e843f4480e4927e4, []int{0} 36 } 37 func (m *UnresolvedAddr) XXX_Unmarshal(b []byte) error { 38 return m.Unmarshal(b) 39 } 40 func (m *UnresolvedAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 41 b = b[:cap(b)] 42 n, err := m.MarshalToSizedBuffer(b) 43 if err != nil { 44 return nil, err 45 } 46 return b[:n], nil 47 } 48 func (m *UnresolvedAddr) XXX_Merge(src proto.Message) { 49 xxx_messageInfo_UnresolvedAddr.Merge(m, src) 50 } 51 func (m *UnresolvedAddr) XXX_Size() int { 52 return m.Size() 53 } 54 func (m *UnresolvedAddr) XXX_DiscardUnknown() { 55 xxx_messageInfo_UnresolvedAddr.DiscardUnknown(m) 56 } 57 58 var xxx_messageInfo_UnresolvedAddr proto.InternalMessageInfo 59 60 func init() { 61 proto.RegisterType((*UnresolvedAddr)(nil), "cockroach.parser.util.UnresolvedAddr") 62 } 63 64 func init() { proto.RegisterFile("util/unresolved_addr.proto", fileDescriptor_e843f4480e4927e4) } 65 66 var fileDescriptor_e843f4480e4927e4 = []byte{ 67 // 215 bytes of a gzipped FileDescriptorProto 68 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x2d, 0xc9, 0xcc, 69 0xd1, 0x2f, 0xcd, 0x2b, 0x4a, 0x2d, 0xce, 0xcf, 0x29, 0x4b, 0x4d, 0x89, 0x4f, 0x4c, 0x49, 0x29, 70 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4b, 0xce, 0x4f, 0xce, 0x2e, 0xca, 0x4f, 0x4c, 71 0xce, 0xd0, 0x03, 0xa9, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xe9, 0x83, 0x58, 0x10, 72 0x55, 0x4a, 0x05, 0x5c, 0x7c, 0xa1, 0x70, 0xed, 0x8e, 0x29, 0x29, 0x45, 0x42, 0x9a, 0x5c, 0xbc, 73 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, 0xf1, 0x69, 0x99, 0xa9, 0x39, 0x29, 0x12, 0x8c, 0x0a, 74 0x8c, 0x1a, 0x9c, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0xf1, 0x40, 0xa5, 0xdc, 0x40, 0x32, 75 0x20, 0xa5, 0x20, 0x0b, 0x53, 0x8b, 0x8b, 0xa1, 0x4a, 0x99, 0x90, 0x95, 0x42, 0xa5, 0xc0, 0x4a, 76 0xad, 0x38, 0x66, 0x2c, 0x90, 0x67, 0x78, 0xb1, 0x40, 0x9e, 0xd1, 0xc9, 0xfb, 0xc4, 0x43, 0x39, 77 0x86, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0xbc, 0xf1, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 78 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 79 0x33, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xee, 0x89, 0x94, 0x24, 80 0x04, 0x5b, 0xbf, 0x20, 0x3b, 0x5d, 0x1f, 0xe4, 0x29, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc2, 81 0x21, 0xae, 0xea, 0x01, 0x01, 0x00, 0x00, 82 } 83 84 func (this *UnresolvedAddr) Equal(that interface{}) bool { 85 if that == nil { 86 return this == nil 87 } 88 89 that1, ok := that.(*UnresolvedAddr) 90 if !ok { 91 that2, ok := that.(UnresolvedAddr) 92 if ok { 93 that1 = &that2 94 } else { 95 return false 96 } 97 } 98 if that1 == nil { 99 return this == nil 100 } else if this == nil { 101 return false 102 } 103 if this.NetworkField != that1.NetworkField { 104 return false 105 } 106 if this.AddressField != that1.AddressField { 107 return false 108 } 109 return true 110 } 111 func (m *UnresolvedAddr) Marshal() (dAtA []byte, err error) { 112 size := m.Size() 113 dAtA = make([]byte, size) 114 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 115 if err != nil { 116 return nil, err 117 } 118 return dAtA[:n], nil 119 } 120 121 func (m *UnresolvedAddr) MarshalTo(dAtA []byte) (int, error) { 122 size := m.Size() 123 return m.MarshalToSizedBuffer(dAtA[:size]) 124 } 125 126 func (m *UnresolvedAddr) MarshalToSizedBuffer(dAtA []byte) (int, error) { 127 i := len(dAtA) 128 _ = i 129 var l int 130 _ = l 131 i -= len(m.AddressField) 132 copy(dAtA[i:], m.AddressField) 133 i = encodeVarintUnresolvedAddr(dAtA, i, uint64(len(m.AddressField))) 134 i-- 135 dAtA[i] = 0x12 136 i -= len(m.NetworkField) 137 copy(dAtA[i:], m.NetworkField) 138 i = encodeVarintUnresolvedAddr(dAtA, i, uint64(len(m.NetworkField))) 139 i-- 140 dAtA[i] = 0xa 141 return len(dAtA) - i, nil 142 } 143 144 func encodeVarintUnresolvedAddr(dAtA []byte, offset int, v uint64) int { 145 offset -= sovUnresolvedAddr(v) 146 base := offset 147 for v >= 1<<7 { 148 dAtA[offset] = uint8(v&0x7f | 0x80) 149 v >>= 7 150 offset++ 151 } 152 dAtA[offset] = uint8(v) 153 return base 154 } 155 func (m *UnresolvedAddr) Size() (n int) { 156 if m == nil { 157 return 0 158 } 159 var l int 160 _ = l 161 l = len(m.NetworkField) 162 n += 1 + l + sovUnresolvedAddr(uint64(l)) 163 l = len(m.AddressField) 164 n += 1 + l + sovUnresolvedAddr(uint64(l)) 165 return n 166 } 167 168 func sovUnresolvedAddr(x uint64) (n int) { 169 return (math_bits.Len64(x|1) + 6) / 7 170 } 171 func sozUnresolvedAddr(x uint64) (n int) { 172 return sovUnresolvedAddr(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 173 } 174 func (m *UnresolvedAddr) Unmarshal(dAtA []byte) error { 175 l := len(dAtA) 176 iNdEx := 0 177 for iNdEx < l { 178 preIndex := iNdEx 179 var wire uint64 180 for shift := uint(0); ; shift += 7 { 181 if shift >= 64 { 182 return ErrIntOverflowUnresolvedAddr 183 } 184 if iNdEx >= l { 185 return io.ErrUnexpectedEOF 186 } 187 b := dAtA[iNdEx] 188 iNdEx++ 189 wire |= uint64(b&0x7F) << shift 190 if b < 0x80 { 191 break 192 } 193 } 194 fieldNum := int32(wire >> 3) 195 wireType := int(wire & 0x7) 196 if wireType == 4 { 197 return fmt.Errorf("proto: UnresolvedAddr: wiretype end group for non-group") 198 } 199 if fieldNum <= 0 { 200 return fmt.Errorf("proto: UnresolvedAddr: illegal tag %d (wire type %d)", fieldNum, wire) 201 } 202 switch fieldNum { 203 case 1: 204 if wireType != 2 { 205 return fmt.Errorf("proto: wrong wireType = %d for field NetworkField", wireType) 206 } 207 var stringLen uint64 208 for shift := uint(0); ; shift += 7 { 209 if shift >= 64 { 210 return ErrIntOverflowUnresolvedAddr 211 } 212 if iNdEx >= l { 213 return io.ErrUnexpectedEOF 214 } 215 b := dAtA[iNdEx] 216 iNdEx++ 217 stringLen |= uint64(b&0x7F) << shift 218 if b < 0x80 { 219 break 220 } 221 } 222 intStringLen := int(stringLen) 223 if intStringLen < 0 { 224 return ErrInvalidLengthUnresolvedAddr 225 } 226 postIndex := iNdEx + intStringLen 227 if postIndex < 0 { 228 return ErrInvalidLengthUnresolvedAddr 229 } 230 if postIndex > l { 231 return io.ErrUnexpectedEOF 232 } 233 m.NetworkField = string(dAtA[iNdEx:postIndex]) 234 iNdEx = postIndex 235 case 2: 236 if wireType != 2 { 237 return fmt.Errorf("proto: wrong wireType = %d for field AddressField", wireType) 238 } 239 var stringLen uint64 240 for shift := uint(0); ; shift += 7 { 241 if shift >= 64 { 242 return ErrIntOverflowUnresolvedAddr 243 } 244 if iNdEx >= l { 245 return io.ErrUnexpectedEOF 246 } 247 b := dAtA[iNdEx] 248 iNdEx++ 249 stringLen |= uint64(b&0x7F) << shift 250 if b < 0x80 { 251 break 252 } 253 } 254 intStringLen := int(stringLen) 255 if intStringLen < 0 { 256 return ErrInvalidLengthUnresolvedAddr 257 } 258 postIndex := iNdEx + intStringLen 259 if postIndex < 0 { 260 return ErrInvalidLengthUnresolvedAddr 261 } 262 if postIndex > l { 263 return io.ErrUnexpectedEOF 264 } 265 m.AddressField = string(dAtA[iNdEx:postIndex]) 266 iNdEx = postIndex 267 default: 268 iNdEx = preIndex 269 skippy, err := skipUnresolvedAddr(dAtA[iNdEx:]) 270 if err != nil { 271 return err 272 } 273 if (skippy < 0) || (iNdEx+skippy) < 0 { 274 return ErrInvalidLengthUnresolvedAddr 275 } 276 if (iNdEx + skippy) > l { 277 return io.ErrUnexpectedEOF 278 } 279 iNdEx += skippy 280 } 281 } 282 283 if iNdEx > l { 284 return io.ErrUnexpectedEOF 285 } 286 return nil 287 } 288 func skipUnresolvedAddr(dAtA []byte) (n int, err error) { 289 l := len(dAtA) 290 iNdEx := 0 291 depth := 0 292 for iNdEx < l { 293 var wire uint64 294 for shift := uint(0); ; shift += 7 { 295 if shift >= 64 { 296 return 0, ErrIntOverflowUnresolvedAddr 297 } 298 if iNdEx >= l { 299 return 0, io.ErrUnexpectedEOF 300 } 301 b := dAtA[iNdEx] 302 iNdEx++ 303 wire |= (uint64(b) & 0x7F) << shift 304 if b < 0x80 { 305 break 306 } 307 } 308 wireType := int(wire & 0x7) 309 switch wireType { 310 case 0: 311 for shift := uint(0); ; shift += 7 { 312 if shift >= 64 { 313 return 0, ErrIntOverflowUnresolvedAddr 314 } 315 if iNdEx >= l { 316 return 0, io.ErrUnexpectedEOF 317 } 318 iNdEx++ 319 if dAtA[iNdEx-1] < 0x80 { 320 break 321 } 322 } 323 case 1: 324 iNdEx += 8 325 case 2: 326 var length int 327 for shift := uint(0); ; shift += 7 { 328 if shift >= 64 { 329 return 0, ErrIntOverflowUnresolvedAddr 330 } 331 if iNdEx >= l { 332 return 0, io.ErrUnexpectedEOF 333 } 334 b := dAtA[iNdEx] 335 iNdEx++ 336 length |= (int(b) & 0x7F) << shift 337 if b < 0x80 { 338 break 339 } 340 } 341 if length < 0 { 342 return 0, ErrInvalidLengthUnresolvedAddr 343 } 344 iNdEx += length 345 case 3: 346 depth++ 347 case 4: 348 if depth == 0 { 349 return 0, ErrUnexpectedEndOfGroupUnresolvedAddr 350 } 351 depth-- 352 case 5: 353 iNdEx += 4 354 default: 355 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 356 } 357 if iNdEx < 0 { 358 return 0, ErrInvalidLengthUnresolvedAddr 359 } 360 if depth == 0 { 361 return iNdEx, nil 362 } 363 } 364 return 0, io.ErrUnexpectedEOF 365 } 366 367 var ( 368 ErrInvalidLengthUnresolvedAddr = fmt.Errorf("proto: negative length found during unmarshaling") 369 ErrIntOverflowUnresolvedAddr = fmt.Errorf("proto: integer overflow") 370 ErrUnexpectedEndOfGroupUnresolvedAddr = fmt.Errorf("proto: unexpected end of group") 371 ) 372