github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/acm/validator/validator.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: validator.proto 3 4 package validator 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 golang_proto "github.com/golang/protobuf/proto" 15 crypto "github.com/hyperledger/burrow/crypto" 16 github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var _ = proto.Marshal 21 var _ = golang_proto.Marshal 22 var _ = fmt.Errorf 23 var _ = math.Inf 24 25 // This is a compile-time assertion to ensure that this generated file 26 // is compatible with the proto package it is being compiled against. 27 // A compilation error at this line likely means your copy of the 28 // proto package needs to be updated. 29 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 30 31 type Validator struct { 32 Address *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address,omitempty"` 33 PublicKey *crypto.PublicKey `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` 34 Power uint64 `protobuf:"varint,3,opt,name=Power,proto3" json:"Power,omitempty"` 35 XXX_NoUnkeyedLiteral struct{} `json:"-"` 36 XXX_unrecognized []byte `json:"-"` 37 XXX_sizecache int32 `json:"-"` 38 } 39 40 func (m *Validator) Reset() { *m = Validator{} } 41 func (*Validator) ProtoMessage() {} 42 func (*Validator) Descriptor() ([]byte, []int) { 43 return fileDescriptor_bf1c6ec7c0d80dd5, []int{0} 44 } 45 func (m *Validator) XXX_Unmarshal(b []byte) error { 46 return m.Unmarshal(b) 47 } 48 func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 49 b = b[:cap(b)] 50 n, err := m.MarshalToSizedBuffer(b) 51 if err != nil { 52 return nil, err 53 } 54 return b[:n], nil 55 } 56 func (m *Validator) XXX_Merge(src proto.Message) { 57 xxx_messageInfo_Validator.Merge(m, src) 58 } 59 func (m *Validator) XXX_Size() int { 60 return m.Size() 61 } 62 func (m *Validator) XXX_DiscardUnknown() { 63 xxx_messageInfo_Validator.DiscardUnknown(m) 64 } 65 66 var xxx_messageInfo_Validator proto.InternalMessageInfo 67 68 func (m *Validator) GetPublicKey() *crypto.PublicKey { 69 if m != nil { 70 return m.PublicKey 71 } 72 return nil 73 } 74 75 func (m *Validator) GetPower() uint64 { 76 if m != nil { 77 return m.Power 78 } 79 return 0 80 } 81 82 func (*Validator) XXX_MessageName() string { 83 return "validator.Validator" 84 } 85 func init() { 86 proto.RegisterType((*Validator)(nil), "validator.Validator") 87 golang_proto.RegisterType((*Validator)(nil), "validator.Validator") 88 } 89 90 func init() { proto.RegisterFile("validator.proto", fileDescriptor_bf1c6ec7c0d80dd5) } 91 func init() { golang_proto.RegisterFile("validator.proto", fileDescriptor_bf1c6ec7c0d80dd5) } 92 93 var fileDescriptor_bf1c6ec7c0d80dd5 = []byte{ 94 // 231 bytes of a gzipped FileDescriptorProto 95 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x4b, 0xcc, 0xc9, 96 0x4c, 0x49, 0x2c, 0xc9, 0x2f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48, 97 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x45, 0xf5, 0x41, 0x2c, 0x88, 0x02, 0x29, 0x9e, 0xe4, 0xa2, 98 0xca, 0x82, 0x12, 0x28, 0x4f, 0x69, 0x09, 0x23, 0x17, 0x67, 0x18, 0x4c, 0x87, 0x90, 0x17, 0x17, 99 0xbb, 0x63, 0x4a, 0x4a, 0x51, 0x6a, 0x71, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x8f, 0x93, 0xc1, 100 0xad, 0x7b, 0xf2, 0x3a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x19, 101 0x95, 0x05, 0xa9, 0x45, 0x39, 0xa9, 0x29, 0xe9, 0xa9, 0x45, 0xfa, 0x49, 0xa5, 0x45, 0x45, 0xf9, 102 0xe5, 0xfa, 0x50, 0xe3, 0xa0, 0xfa, 0x82, 0x60, 0x06, 0x08, 0xe9, 0x73, 0x71, 0x06, 0x94, 0x26, 103 0xe5, 0x64, 0x26, 0x7b, 0xa7, 0x56, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x1b, 0x09, 0xea, 0x41, 104 0x15, 0xc3, 0x25, 0x82, 0x10, 0x6a, 0x84, 0x44, 0xb8, 0x58, 0x03, 0xf2, 0xcb, 0x53, 0x8b, 0x24, 105 0x98, 0x15, 0x18, 0x35, 0x58, 0x82, 0x20, 0x1c, 0x2b, 0x96, 0x19, 0x0b, 0xe4, 0x19, 0x9c, 0x5c, 106 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc6, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 107 0x18, 0x0f, 0x3c, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x31, 0x4a, 0x1b, 0xbf, 0xeb, 0x12, 0x93, 108 0x73, 0xf5, 0xe1, 0x21, 0x92, 0xc4, 0x06, 0xf6, 0xb4, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xd4, 109 0x46, 0xd6, 0x6e, 0x36, 0x01, 0x00, 0x00, 110 } 111 112 func (m *Validator) Marshal() (dAtA []byte, err error) { 113 size := m.Size() 114 dAtA = make([]byte, size) 115 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 116 if err != nil { 117 return nil, err 118 } 119 return dAtA[:n], nil 120 } 121 122 func (m *Validator) MarshalTo(dAtA []byte) (int, error) { 123 size := m.Size() 124 return m.MarshalToSizedBuffer(dAtA[:size]) 125 } 126 127 func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { 128 i := len(dAtA) 129 _ = i 130 var l int 131 _ = l 132 if m.XXX_unrecognized != nil { 133 i -= len(m.XXX_unrecognized) 134 copy(dAtA[i:], m.XXX_unrecognized) 135 } 136 if m.Power != 0 { 137 i = encodeVarintValidator(dAtA, i, uint64(m.Power)) 138 i-- 139 dAtA[i] = 0x18 140 } 141 if m.PublicKey != nil { 142 { 143 size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) 144 if err != nil { 145 return 0, err 146 } 147 i -= size 148 i = encodeVarintValidator(dAtA, i, uint64(size)) 149 } 150 i-- 151 dAtA[i] = 0x12 152 } 153 if m.Address != nil { 154 { 155 size := m.Address.Size() 156 i -= size 157 if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { 158 return 0, err 159 } 160 i = encodeVarintValidator(dAtA, i, uint64(size)) 161 } 162 i-- 163 dAtA[i] = 0xa 164 } 165 return len(dAtA) - i, nil 166 } 167 168 func encodeVarintValidator(dAtA []byte, offset int, v uint64) int { 169 offset -= sovValidator(v) 170 base := offset 171 for v >= 1<<7 { 172 dAtA[offset] = uint8(v&0x7f | 0x80) 173 v >>= 7 174 offset++ 175 } 176 dAtA[offset] = uint8(v) 177 return base 178 } 179 func (m *Validator) Size() (n int) { 180 if m == nil { 181 return 0 182 } 183 var l int 184 _ = l 185 if m.Address != nil { 186 l = m.Address.Size() 187 n += 1 + l + sovValidator(uint64(l)) 188 } 189 if m.PublicKey != nil { 190 l = m.PublicKey.Size() 191 n += 1 + l + sovValidator(uint64(l)) 192 } 193 if m.Power != 0 { 194 n += 1 + sovValidator(uint64(m.Power)) 195 } 196 if m.XXX_unrecognized != nil { 197 n += len(m.XXX_unrecognized) 198 } 199 return n 200 } 201 202 func sovValidator(x uint64) (n int) { 203 return (math_bits.Len64(x|1) + 6) / 7 204 } 205 func sozValidator(x uint64) (n int) { 206 return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 207 } 208 func (m *Validator) Unmarshal(dAtA []byte) error { 209 l := len(dAtA) 210 iNdEx := 0 211 for iNdEx < l { 212 preIndex := iNdEx 213 var wire uint64 214 for shift := uint(0); ; shift += 7 { 215 if shift >= 64 { 216 return ErrIntOverflowValidator 217 } 218 if iNdEx >= l { 219 return io.ErrUnexpectedEOF 220 } 221 b := dAtA[iNdEx] 222 iNdEx++ 223 wire |= uint64(b&0x7F) << shift 224 if b < 0x80 { 225 break 226 } 227 } 228 fieldNum := int32(wire >> 3) 229 wireType := int(wire & 0x7) 230 if wireType == 4 { 231 return fmt.Errorf("proto: Validator: wiretype end group for non-group") 232 } 233 if fieldNum <= 0 { 234 return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) 235 } 236 switch fieldNum { 237 case 1: 238 if wireType != 2 { 239 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 240 } 241 var byteLen int 242 for shift := uint(0); ; shift += 7 { 243 if shift >= 64 { 244 return ErrIntOverflowValidator 245 } 246 if iNdEx >= l { 247 return io.ErrUnexpectedEOF 248 } 249 b := dAtA[iNdEx] 250 iNdEx++ 251 byteLen |= int(b&0x7F) << shift 252 if b < 0x80 { 253 break 254 } 255 } 256 if byteLen < 0 { 257 return ErrInvalidLengthValidator 258 } 259 postIndex := iNdEx + byteLen 260 if postIndex < 0 { 261 return ErrInvalidLengthValidator 262 } 263 if postIndex > l { 264 return io.ErrUnexpectedEOF 265 } 266 var v github_com_hyperledger_burrow_crypto.Address 267 m.Address = &v 268 if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 269 return err 270 } 271 iNdEx = postIndex 272 case 2: 273 if wireType != 2 { 274 return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) 275 } 276 var msglen int 277 for shift := uint(0); ; shift += 7 { 278 if shift >= 64 { 279 return ErrIntOverflowValidator 280 } 281 if iNdEx >= l { 282 return io.ErrUnexpectedEOF 283 } 284 b := dAtA[iNdEx] 285 iNdEx++ 286 msglen |= int(b&0x7F) << shift 287 if b < 0x80 { 288 break 289 } 290 } 291 if msglen < 0 { 292 return ErrInvalidLengthValidator 293 } 294 postIndex := iNdEx + msglen 295 if postIndex < 0 { 296 return ErrInvalidLengthValidator 297 } 298 if postIndex > l { 299 return io.ErrUnexpectedEOF 300 } 301 if m.PublicKey == nil { 302 m.PublicKey = &crypto.PublicKey{} 303 } 304 if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 305 return err 306 } 307 iNdEx = postIndex 308 case 3: 309 if wireType != 0 { 310 return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) 311 } 312 m.Power = 0 313 for shift := uint(0); ; shift += 7 { 314 if shift >= 64 { 315 return ErrIntOverflowValidator 316 } 317 if iNdEx >= l { 318 return io.ErrUnexpectedEOF 319 } 320 b := dAtA[iNdEx] 321 iNdEx++ 322 m.Power |= uint64(b&0x7F) << shift 323 if b < 0x80 { 324 break 325 } 326 } 327 default: 328 iNdEx = preIndex 329 skippy, err := skipValidator(dAtA[iNdEx:]) 330 if err != nil { 331 return err 332 } 333 if (skippy < 0) || (iNdEx+skippy) < 0 { 334 return ErrInvalidLengthValidator 335 } 336 if (iNdEx + skippy) > l { 337 return io.ErrUnexpectedEOF 338 } 339 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 340 iNdEx += skippy 341 } 342 } 343 344 if iNdEx > l { 345 return io.ErrUnexpectedEOF 346 } 347 return nil 348 } 349 func skipValidator(dAtA []byte) (n int, err error) { 350 l := len(dAtA) 351 iNdEx := 0 352 depth := 0 353 for iNdEx < l { 354 var wire uint64 355 for shift := uint(0); ; shift += 7 { 356 if shift >= 64 { 357 return 0, ErrIntOverflowValidator 358 } 359 if iNdEx >= l { 360 return 0, io.ErrUnexpectedEOF 361 } 362 b := dAtA[iNdEx] 363 iNdEx++ 364 wire |= (uint64(b) & 0x7F) << shift 365 if b < 0x80 { 366 break 367 } 368 } 369 wireType := int(wire & 0x7) 370 switch wireType { 371 case 0: 372 for shift := uint(0); ; shift += 7 { 373 if shift >= 64 { 374 return 0, ErrIntOverflowValidator 375 } 376 if iNdEx >= l { 377 return 0, io.ErrUnexpectedEOF 378 } 379 iNdEx++ 380 if dAtA[iNdEx-1] < 0x80 { 381 break 382 } 383 } 384 case 1: 385 iNdEx += 8 386 case 2: 387 var length int 388 for shift := uint(0); ; shift += 7 { 389 if shift >= 64 { 390 return 0, ErrIntOverflowValidator 391 } 392 if iNdEx >= l { 393 return 0, io.ErrUnexpectedEOF 394 } 395 b := dAtA[iNdEx] 396 iNdEx++ 397 length |= (int(b) & 0x7F) << shift 398 if b < 0x80 { 399 break 400 } 401 } 402 if length < 0 { 403 return 0, ErrInvalidLengthValidator 404 } 405 iNdEx += length 406 case 3: 407 depth++ 408 case 4: 409 if depth == 0 { 410 return 0, ErrUnexpectedEndOfGroupValidator 411 } 412 depth-- 413 case 5: 414 iNdEx += 4 415 default: 416 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 417 } 418 if iNdEx < 0 { 419 return 0, ErrInvalidLengthValidator 420 } 421 if depth == 0 { 422 return iNdEx, nil 423 } 424 } 425 return 0, io.ErrUnexpectedEOF 426 } 427 428 var ( 429 ErrInvalidLengthValidator = fmt.Errorf("proto: negative length found during unmarshaling") 430 ErrIntOverflowValidator = fmt.Errorf("proto: integer overflow") 431 ErrUnexpectedEndOfGroupValidator = fmt.Errorf("proto: unexpected end of group") 432 )