github.com/argoproj/argo-cd@v1.8.7/pkg/apiclient/certificate/certificate.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: server/certificate/certificate.proto 3 4 // Certificate Service 5 // 6 // Certificate Service API performs CRUD actions against repository certificate 7 // resources. 8 9 package certificate 10 11 import ( 12 context "context" 13 fmt "fmt" 14 v1alpha1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" 15 _ "github.com/gogo/protobuf/gogoproto" 16 proto "github.com/gogo/protobuf/proto" 17 _ "google.golang.org/genproto/googleapis/api/annotations" 18 grpc "google.golang.org/grpc" 19 codes "google.golang.org/grpc/codes" 20 status "google.golang.org/grpc/status" 21 io "io" 22 math "math" 23 math_bits "math/bits" 24 ) 25 26 // Reference imports to suppress errors if they are not otherwise used. 27 var _ = proto.Marshal 28 var _ = fmt.Errorf 29 var _ = math.Inf 30 31 // This is a compile-time assertion to ensure that this generated file 32 // is compatible with the proto package it is being compiled against. 33 // A compilation error at this line likely means your copy of the 34 // proto package needs to be updated. 35 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 36 37 // Message to query the server for configured repository certificates 38 type RepositoryCertificateQuery struct { 39 // A file-glob pattern (not regular expression) the host name has to match 40 HostNamePattern string `protobuf:"bytes,1,opt,name=hostNamePattern,proto3" json:"hostNamePattern,omitempty"` 41 // The type of the certificate to match (ssh or https) 42 CertType string `protobuf:"bytes,2,opt,name=certType,proto3" json:"certType,omitempty"` 43 // The sub type of the certificate to match (protocol dependent, usually only used for ssh certs) 44 CertSubType string `protobuf:"bytes,3,opt,name=certSubType,proto3" json:"certSubType,omitempty"` 45 XXX_NoUnkeyedLiteral struct{} `json:"-"` 46 XXX_unrecognized []byte `json:"-"` 47 XXX_sizecache int32 `json:"-"` 48 } 49 50 func (m *RepositoryCertificateQuery) Reset() { *m = RepositoryCertificateQuery{} } 51 func (m *RepositoryCertificateQuery) String() string { return proto.CompactTextString(m) } 52 func (*RepositoryCertificateQuery) ProtoMessage() {} 53 func (*RepositoryCertificateQuery) Descriptor() ([]byte, []int) { 54 return fileDescriptor_387c41efc0710f00, []int{0} 55 } 56 func (m *RepositoryCertificateQuery) XXX_Unmarshal(b []byte) error { 57 return m.Unmarshal(b) 58 } 59 func (m *RepositoryCertificateQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 60 if deterministic { 61 return xxx_messageInfo_RepositoryCertificateQuery.Marshal(b, m, deterministic) 62 } else { 63 b = b[:cap(b)] 64 n, err := m.MarshalToSizedBuffer(b) 65 if err != nil { 66 return nil, err 67 } 68 return b[:n], nil 69 } 70 } 71 func (m *RepositoryCertificateQuery) XXX_Merge(src proto.Message) { 72 xxx_messageInfo_RepositoryCertificateQuery.Merge(m, src) 73 } 74 func (m *RepositoryCertificateQuery) XXX_Size() int { 75 return m.Size() 76 } 77 func (m *RepositoryCertificateQuery) XXX_DiscardUnknown() { 78 xxx_messageInfo_RepositoryCertificateQuery.DiscardUnknown(m) 79 } 80 81 var xxx_messageInfo_RepositoryCertificateQuery proto.InternalMessageInfo 82 83 func (m *RepositoryCertificateQuery) GetHostNamePattern() string { 84 if m != nil { 85 return m.HostNamePattern 86 } 87 return "" 88 } 89 90 func (m *RepositoryCertificateQuery) GetCertType() string { 91 if m != nil { 92 return m.CertType 93 } 94 return "" 95 } 96 97 func (m *RepositoryCertificateQuery) GetCertSubType() string { 98 if m != nil { 99 return m.CertSubType 100 } 101 return "" 102 } 103 104 // Request to create a set of certificates 105 type RepositoryCertificateCreateRequest struct { 106 // List of certificates to be created 107 Certificates *v1alpha1.RepositoryCertificateList `protobuf:"bytes,1,opt,name=certificates,proto3" json:"certificates,omitempty"` 108 // Whether to upsert already existing certificates 109 Upsert bool `protobuf:"varint,2,opt,name=upsert,proto3" json:"upsert,omitempty"` 110 XXX_NoUnkeyedLiteral struct{} `json:"-"` 111 XXX_unrecognized []byte `json:"-"` 112 XXX_sizecache int32 `json:"-"` 113 } 114 115 func (m *RepositoryCertificateCreateRequest) Reset() { *m = RepositoryCertificateCreateRequest{} } 116 func (m *RepositoryCertificateCreateRequest) String() string { return proto.CompactTextString(m) } 117 func (*RepositoryCertificateCreateRequest) ProtoMessage() {} 118 func (*RepositoryCertificateCreateRequest) Descriptor() ([]byte, []int) { 119 return fileDescriptor_387c41efc0710f00, []int{1} 120 } 121 func (m *RepositoryCertificateCreateRequest) XXX_Unmarshal(b []byte) error { 122 return m.Unmarshal(b) 123 } 124 func (m *RepositoryCertificateCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 125 if deterministic { 126 return xxx_messageInfo_RepositoryCertificateCreateRequest.Marshal(b, m, deterministic) 127 } else { 128 b = b[:cap(b)] 129 n, err := m.MarshalToSizedBuffer(b) 130 if err != nil { 131 return nil, err 132 } 133 return b[:n], nil 134 } 135 } 136 func (m *RepositoryCertificateCreateRequest) XXX_Merge(src proto.Message) { 137 xxx_messageInfo_RepositoryCertificateCreateRequest.Merge(m, src) 138 } 139 func (m *RepositoryCertificateCreateRequest) XXX_Size() int { 140 return m.Size() 141 } 142 func (m *RepositoryCertificateCreateRequest) XXX_DiscardUnknown() { 143 xxx_messageInfo_RepositoryCertificateCreateRequest.DiscardUnknown(m) 144 } 145 146 var xxx_messageInfo_RepositoryCertificateCreateRequest proto.InternalMessageInfo 147 148 func (m *RepositoryCertificateCreateRequest) GetCertificates() *v1alpha1.RepositoryCertificateList { 149 if m != nil { 150 return m.Certificates 151 } 152 return nil 153 } 154 155 func (m *RepositoryCertificateCreateRequest) GetUpsert() bool { 156 if m != nil { 157 return m.Upsert 158 } 159 return false 160 } 161 162 type RepositoryCertificateResponse struct { 163 XXX_NoUnkeyedLiteral struct{} `json:"-"` 164 XXX_unrecognized []byte `json:"-"` 165 XXX_sizecache int32 `json:"-"` 166 } 167 168 func (m *RepositoryCertificateResponse) Reset() { *m = RepositoryCertificateResponse{} } 169 func (m *RepositoryCertificateResponse) String() string { return proto.CompactTextString(m) } 170 func (*RepositoryCertificateResponse) ProtoMessage() {} 171 func (*RepositoryCertificateResponse) Descriptor() ([]byte, []int) { 172 return fileDescriptor_387c41efc0710f00, []int{2} 173 } 174 func (m *RepositoryCertificateResponse) XXX_Unmarshal(b []byte) error { 175 return m.Unmarshal(b) 176 } 177 func (m *RepositoryCertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 178 if deterministic { 179 return xxx_messageInfo_RepositoryCertificateResponse.Marshal(b, m, deterministic) 180 } else { 181 b = b[:cap(b)] 182 n, err := m.MarshalToSizedBuffer(b) 183 if err != nil { 184 return nil, err 185 } 186 return b[:n], nil 187 } 188 } 189 func (m *RepositoryCertificateResponse) XXX_Merge(src proto.Message) { 190 xxx_messageInfo_RepositoryCertificateResponse.Merge(m, src) 191 } 192 func (m *RepositoryCertificateResponse) XXX_Size() int { 193 return m.Size() 194 } 195 func (m *RepositoryCertificateResponse) XXX_DiscardUnknown() { 196 xxx_messageInfo_RepositoryCertificateResponse.DiscardUnknown(m) 197 } 198 199 var xxx_messageInfo_RepositoryCertificateResponse proto.InternalMessageInfo 200 201 func init() { 202 proto.RegisterType((*RepositoryCertificateQuery)(nil), "certificate.RepositoryCertificateQuery") 203 proto.RegisterType((*RepositoryCertificateCreateRequest)(nil), "certificate.RepositoryCertificateCreateRequest") 204 proto.RegisterType((*RepositoryCertificateResponse)(nil), "certificate.RepositoryCertificateResponse") 205 } 206 207 func init() { 208 proto.RegisterFile("server/certificate/certificate.proto", fileDescriptor_387c41efc0710f00) 209 } 210 211 var fileDescriptor_387c41efc0710f00 = []byte{ 212 // 451 bytes of a gzipped FileDescriptorProto 213 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x53, 0x4f, 0x6b, 0x14, 0x31, 214 0x14, 0x27, 0x55, 0x4a, 0x4d, 0x05, 0x6d, 0x28, 0xa5, 0x0c, 0x75, 0x2d, 0x43, 0xc1, 0x52, 0x30, 215 0x61, 0x2b, 0x5e, 0x3c, 0xba, 0x5e, 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0x78, 0x00, 0x15, 238 0x74, 0x85, 0xfc, 0x1f, 0xde, 0x1f, 0xf4, 0x0a, 0xb8, 0x3f, 0xfa, 0x32, 0x1f, 0x90, 0xaf, 0xf3, 239 0x01, 0xf9, 0x3e, 0x1f, 0x90, 0x67, 0x77, 0xff, 0xe1, 0xfb, 0x97, 0x95, 0x06, 0x83, 0xe9, 0x94, 240 0xf1, 0x6a, 0xfc, 0xf1, 0x77, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x67, 0xe0, 0x7a, 0x1e, 0xa5, 241 0x04, 0x00, 0x00, 242 } 243 244 // Reference imports to suppress errors if they are not otherwise used. 245 var _ context.Context 246 var _ grpc.ClientConn 247 248 // This is a compile-time assertion to ensure that this generated file 249 // is compatible with the grpc package it is being compiled against. 250 const _ = grpc.SupportPackageIsVersion4 251 252 // CertificateServiceClient is the client API for CertificateService service. 253 // 254 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 255 type CertificateServiceClient interface { 256 // List all available repository certificates 257 ListCertificates(ctx context.Context, in *RepositoryCertificateQuery, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error) 258 // Creates repository certificates on the server 259 CreateCertificate(ctx context.Context, in *RepositoryCertificateCreateRequest, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error) 260 // Delete the certificates that match the RepositoryCertificateQuery 261 DeleteCertificate(ctx context.Context, in *RepositoryCertificateQuery, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error) 262 } 263 264 type certificateServiceClient struct { 265 cc *grpc.ClientConn 266 } 267 268 func NewCertificateServiceClient(cc *grpc.ClientConn) CertificateServiceClient { 269 return &certificateServiceClient{cc} 270 } 271 272 func (c *certificateServiceClient) ListCertificates(ctx context.Context, in *RepositoryCertificateQuery, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error) { 273 out := new(v1alpha1.RepositoryCertificateList) 274 err := c.cc.Invoke(ctx, "/certificate.CertificateService/ListCertificates", in, out, opts...) 275 if err != nil { 276 return nil, err 277 } 278 return out, nil 279 } 280 281 func (c *certificateServiceClient) CreateCertificate(ctx context.Context, in *RepositoryCertificateCreateRequest, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error) { 282 out := new(v1alpha1.RepositoryCertificateList) 283 err := c.cc.Invoke(ctx, "/certificate.CertificateService/CreateCertificate", in, out, opts...) 284 if err != nil { 285 return nil, err 286 } 287 return out, nil 288 } 289 290 func (c *certificateServiceClient) DeleteCertificate(ctx context.Context, in *RepositoryCertificateQuery, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error) { 291 out := new(v1alpha1.RepositoryCertificateList) 292 err := c.cc.Invoke(ctx, "/certificate.CertificateService/DeleteCertificate", in, out, opts...) 293 if err != nil { 294 return nil, err 295 } 296 return out, nil 297 } 298 299 // CertificateServiceServer is the server API for CertificateService service. 300 type CertificateServiceServer interface { 301 // List all available repository certificates 302 ListCertificates(context.Context, *RepositoryCertificateQuery) (*v1alpha1.RepositoryCertificateList, error) 303 // Creates repository certificates on the server 304 CreateCertificate(context.Context, *RepositoryCertificateCreateRequest) (*v1alpha1.RepositoryCertificateList, error) 305 // Delete the certificates that match the RepositoryCertificateQuery 306 DeleteCertificate(context.Context, *RepositoryCertificateQuery) (*v1alpha1.RepositoryCertificateList, error) 307 } 308 309 // UnimplementedCertificateServiceServer can be embedded to have forward compatible implementations. 310 type UnimplementedCertificateServiceServer struct { 311 } 312 313 func (*UnimplementedCertificateServiceServer) ListCertificates(ctx context.Context, req *RepositoryCertificateQuery) (*v1alpha1.RepositoryCertificateList, error) { 314 return nil, status.Errorf(codes.Unimplemented, "method ListCertificates not implemented") 315 } 316 func (*UnimplementedCertificateServiceServer) CreateCertificate(ctx context.Context, req *RepositoryCertificateCreateRequest) (*v1alpha1.RepositoryCertificateList, error) { 317 return nil, status.Errorf(codes.Unimplemented, "method CreateCertificate not implemented") 318 } 319 func (*UnimplementedCertificateServiceServer) DeleteCertificate(ctx context.Context, req *RepositoryCertificateQuery) (*v1alpha1.RepositoryCertificateList, error) { 320 return nil, status.Errorf(codes.Unimplemented, "method DeleteCertificate not implemented") 321 } 322 323 func RegisterCertificateServiceServer(s *grpc.Server, srv CertificateServiceServer) { 324 s.RegisterService(&_CertificateService_serviceDesc, srv) 325 } 326 327 func _CertificateService_ListCertificates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 328 in := new(RepositoryCertificateQuery) 329 if err := dec(in); err != nil { 330 return nil, err 331 } 332 if interceptor == nil { 333 return srv.(CertificateServiceServer).ListCertificates(ctx, in) 334 } 335 info := &grpc.UnaryServerInfo{ 336 Server: srv, 337 FullMethod: "/certificate.CertificateService/ListCertificates", 338 } 339 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 340 return srv.(CertificateServiceServer).ListCertificates(ctx, req.(*RepositoryCertificateQuery)) 341 } 342 return interceptor(ctx, in, info, handler) 343 } 344 345 func _CertificateService_CreateCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 346 in := new(RepositoryCertificateCreateRequest) 347 if err := dec(in); err != nil { 348 return nil, err 349 } 350 if interceptor == nil { 351 return srv.(CertificateServiceServer).CreateCertificate(ctx, in) 352 } 353 info := &grpc.UnaryServerInfo{ 354 Server: srv, 355 FullMethod: "/certificate.CertificateService/CreateCertificate", 356 } 357 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 358 return srv.(CertificateServiceServer).CreateCertificate(ctx, req.(*RepositoryCertificateCreateRequest)) 359 } 360 return interceptor(ctx, in, info, handler) 361 } 362 363 func _CertificateService_DeleteCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 364 in := new(RepositoryCertificateQuery) 365 if err := dec(in); err != nil { 366 return nil, err 367 } 368 if interceptor == nil { 369 return srv.(CertificateServiceServer).DeleteCertificate(ctx, in) 370 } 371 info := &grpc.UnaryServerInfo{ 372 Server: srv, 373 FullMethod: "/certificate.CertificateService/DeleteCertificate", 374 } 375 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 376 return srv.(CertificateServiceServer).DeleteCertificate(ctx, req.(*RepositoryCertificateQuery)) 377 } 378 return interceptor(ctx, in, info, handler) 379 } 380 381 var _CertificateService_serviceDesc = grpc.ServiceDesc{ 382 ServiceName: "certificate.CertificateService", 383 HandlerType: (*CertificateServiceServer)(nil), 384 Methods: []grpc.MethodDesc{ 385 { 386 MethodName: "ListCertificates", 387 Handler: _CertificateService_ListCertificates_Handler, 388 }, 389 { 390 MethodName: "CreateCertificate", 391 Handler: _CertificateService_CreateCertificate_Handler, 392 }, 393 { 394 MethodName: "DeleteCertificate", 395 Handler: _CertificateService_DeleteCertificate_Handler, 396 }, 397 }, 398 Streams: []grpc.StreamDesc{}, 399 Metadata: "server/certificate/certificate.proto", 400 } 401 402 func (m *RepositoryCertificateQuery) Marshal() (dAtA []byte, err error) { 403 size := m.Size() 404 dAtA = make([]byte, size) 405 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 406 if err != nil { 407 return nil, err 408 } 409 return dAtA[:n], nil 410 } 411 412 func (m *RepositoryCertificateQuery) MarshalTo(dAtA []byte) (int, error) { 413 size := m.Size() 414 return m.MarshalToSizedBuffer(dAtA[:size]) 415 } 416 417 func (m *RepositoryCertificateQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { 418 i := len(dAtA) 419 _ = i 420 var l int 421 _ = l 422 if m.XXX_unrecognized != nil { 423 i -= len(m.XXX_unrecognized) 424 copy(dAtA[i:], m.XXX_unrecognized) 425 } 426 if len(m.CertSubType) > 0 { 427 i -= len(m.CertSubType) 428 copy(dAtA[i:], m.CertSubType) 429 i = encodeVarintCertificate(dAtA, i, uint64(len(m.CertSubType))) 430 i-- 431 dAtA[i] = 0x1a 432 } 433 if len(m.CertType) > 0 { 434 i -= len(m.CertType) 435 copy(dAtA[i:], m.CertType) 436 i = encodeVarintCertificate(dAtA, i, uint64(len(m.CertType))) 437 i-- 438 dAtA[i] = 0x12 439 } 440 if len(m.HostNamePattern) > 0 { 441 i -= len(m.HostNamePattern) 442 copy(dAtA[i:], m.HostNamePattern) 443 i = encodeVarintCertificate(dAtA, i, uint64(len(m.HostNamePattern))) 444 i-- 445 dAtA[i] = 0xa 446 } 447 return len(dAtA) - i, nil 448 } 449 450 func (m *RepositoryCertificateCreateRequest) Marshal() (dAtA []byte, err error) { 451 size := m.Size() 452 dAtA = make([]byte, size) 453 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 454 if err != nil { 455 return nil, err 456 } 457 return dAtA[:n], nil 458 } 459 460 func (m *RepositoryCertificateCreateRequest) MarshalTo(dAtA []byte) (int, error) { 461 size := m.Size() 462 return m.MarshalToSizedBuffer(dAtA[:size]) 463 } 464 465 func (m *RepositoryCertificateCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 466 i := len(dAtA) 467 _ = i 468 var l int 469 _ = l 470 if m.XXX_unrecognized != nil { 471 i -= len(m.XXX_unrecognized) 472 copy(dAtA[i:], m.XXX_unrecognized) 473 } 474 if m.Upsert { 475 i-- 476 if m.Upsert { 477 dAtA[i] = 1 478 } else { 479 dAtA[i] = 0 480 } 481 i-- 482 dAtA[i] = 0x10 483 } 484 if m.Certificates != nil { 485 { 486 size, err := m.Certificates.MarshalToSizedBuffer(dAtA[:i]) 487 if err != nil { 488 return 0, err 489 } 490 i -= size 491 i = encodeVarintCertificate(dAtA, i, uint64(size)) 492 } 493 i-- 494 dAtA[i] = 0xa 495 } 496 return len(dAtA) - i, nil 497 } 498 499 func (m *RepositoryCertificateResponse) Marshal() (dAtA []byte, err error) { 500 size := m.Size() 501 dAtA = make([]byte, size) 502 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 503 if err != nil { 504 return nil, err 505 } 506 return dAtA[:n], nil 507 } 508 509 func (m *RepositoryCertificateResponse) MarshalTo(dAtA []byte) (int, error) { 510 size := m.Size() 511 return m.MarshalToSizedBuffer(dAtA[:size]) 512 } 513 514 func (m *RepositoryCertificateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 515 i := len(dAtA) 516 _ = i 517 var l int 518 _ = l 519 if m.XXX_unrecognized != nil { 520 i -= len(m.XXX_unrecognized) 521 copy(dAtA[i:], m.XXX_unrecognized) 522 } 523 return len(dAtA) - i, nil 524 } 525 526 func encodeVarintCertificate(dAtA []byte, offset int, v uint64) int { 527 offset -= sovCertificate(v) 528 base := offset 529 for v >= 1<<7 { 530 dAtA[offset] = uint8(v&0x7f | 0x80) 531 v >>= 7 532 offset++ 533 } 534 dAtA[offset] = uint8(v) 535 return base 536 } 537 func (m *RepositoryCertificateQuery) Size() (n int) { 538 if m == nil { 539 return 0 540 } 541 var l int 542 _ = l 543 l = len(m.HostNamePattern) 544 if l > 0 { 545 n += 1 + l + sovCertificate(uint64(l)) 546 } 547 l = len(m.CertType) 548 if l > 0 { 549 n += 1 + l + sovCertificate(uint64(l)) 550 } 551 l = len(m.CertSubType) 552 if l > 0 { 553 n += 1 + l + sovCertificate(uint64(l)) 554 } 555 if m.XXX_unrecognized != nil { 556 n += len(m.XXX_unrecognized) 557 } 558 return n 559 } 560 561 func (m *RepositoryCertificateCreateRequest) Size() (n int) { 562 if m == nil { 563 return 0 564 } 565 var l int 566 _ = l 567 if m.Certificates != nil { 568 l = m.Certificates.Size() 569 n += 1 + l + sovCertificate(uint64(l)) 570 } 571 if m.Upsert { 572 n += 2 573 } 574 if m.XXX_unrecognized != nil { 575 n += len(m.XXX_unrecognized) 576 } 577 return n 578 } 579 580 func (m *RepositoryCertificateResponse) Size() (n int) { 581 if m == nil { 582 return 0 583 } 584 var l int 585 _ = l 586 if m.XXX_unrecognized != nil { 587 n += len(m.XXX_unrecognized) 588 } 589 return n 590 } 591 592 func sovCertificate(x uint64) (n int) { 593 return (math_bits.Len64(x|1) + 6) / 7 594 } 595 func sozCertificate(x uint64) (n int) { 596 return sovCertificate(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 597 } 598 func (m *RepositoryCertificateQuery) Unmarshal(dAtA []byte) error { 599 l := len(dAtA) 600 iNdEx := 0 601 for iNdEx < l { 602 preIndex := iNdEx 603 var wire uint64 604 for shift := uint(0); ; shift += 7 { 605 if shift >= 64 { 606 return ErrIntOverflowCertificate 607 } 608 if iNdEx >= l { 609 return io.ErrUnexpectedEOF 610 } 611 b := dAtA[iNdEx] 612 iNdEx++ 613 wire |= uint64(b&0x7F) << shift 614 if b < 0x80 { 615 break 616 } 617 } 618 fieldNum := int32(wire >> 3) 619 wireType := int(wire & 0x7) 620 if wireType == 4 { 621 return fmt.Errorf("proto: RepositoryCertificateQuery: wiretype end group for non-group") 622 } 623 if fieldNum <= 0 { 624 return fmt.Errorf("proto: RepositoryCertificateQuery: illegal tag %d (wire type %d)", fieldNum, wire) 625 } 626 switch fieldNum { 627 case 1: 628 if wireType != 2 { 629 return fmt.Errorf("proto: wrong wireType = %d for field HostNamePattern", wireType) 630 } 631 var stringLen uint64 632 for shift := uint(0); ; shift += 7 { 633 if shift >= 64 { 634 return ErrIntOverflowCertificate 635 } 636 if iNdEx >= l { 637 return io.ErrUnexpectedEOF 638 } 639 b := dAtA[iNdEx] 640 iNdEx++ 641 stringLen |= uint64(b&0x7F) << shift 642 if b < 0x80 { 643 break 644 } 645 } 646 intStringLen := int(stringLen) 647 if intStringLen < 0 { 648 return ErrInvalidLengthCertificate 649 } 650 postIndex := iNdEx + intStringLen 651 if postIndex < 0 { 652 return ErrInvalidLengthCertificate 653 } 654 if postIndex > l { 655 return io.ErrUnexpectedEOF 656 } 657 m.HostNamePattern = string(dAtA[iNdEx:postIndex]) 658 iNdEx = postIndex 659 case 2: 660 if wireType != 2 { 661 return fmt.Errorf("proto: wrong wireType = %d for field CertType", wireType) 662 } 663 var stringLen uint64 664 for shift := uint(0); ; shift += 7 { 665 if shift >= 64 { 666 return ErrIntOverflowCertificate 667 } 668 if iNdEx >= l { 669 return io.ErrUnexpectedEOF 670 } 671 b := dAtA[iNdEx] 672 iNdEx++ 673 stringLen |= uint64(b&0x7F) << shift 674 if b < 0x80 { 675 break 676 } 677 } 678 intStringLen := int(stringLen) 679 if intStringLen < 0 { 680 return ErrInvalidLengthCertificate 681 } 682 postIndex := iNdEx + intStringLen 683 if postIndex < 0 { 684 return ErrInvalidLengthCertificate 685 } 686 if postIndex > l { 687 return io.ErrUnexpectedEOF 688 } 689 m.CertType = string(dAtA[iNdEx:postIndex]) 690 iNdEx = postIndex 691 case 3: 692 if wireType != 2 { 693 return fmt.Errorf("proto: wrong wireType = %d for field CertSubType", wireType) 694 } 695 var stringLen uint64 696 for shift := uint(0); ; shift += 7 { 697 if shift >= 64 { 698 return ErrIntOverflowCertificate 699 } 700 if iNdEx >= l { 701 return io.ErrUnexpectedEOF 702 } 703 b := dAtA[iNdEx] 704 iNdEx++ 705 stringLen |= uint64(b&0x7F) << shift 706 if b < 0x80 { 707 break 708 } 709 } 710 intStringLen := int(stringLen) 711 if intStringLen < 0 { 712 return ErrInvalidLengthCertificate 713 } 714 postIndex := iNdEx + intStringLen 715 if postIndex < 0 { 716 return ErrInvalidLengthCertificate 717 } 718 if postIndex > l { 719 return io.ErrUnexpectedEOF 720 } 721 m.CertSubType = string(dAtA[iNdEx:postIndex]) 722 iNdEx = postIndex 723 default: 724 iNdEx = preIndex 725 skippy, err := skipCertificate(dAtA[iNdEx:]) 726 if err != nil { 727 return err 728 } 729 if skippy < 0 { 730 return ErrInvalidLengthCertificate 731 } 732 if (iNdEx + skippy) < 0 { 733 return ErrInvalidLengthCertificate 734 } 735 if (iNdEx + skippy) > l { 736 return io.ErrUnexpectedEOF 737 } 738 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 739 iNdEx += skippy 740 } 741 } 742 743 if iNdEx > l { 744 return io.ErrUnexpectedEOF 745 } 746 return nil 747 } 748 func (m *RepositoryCertificateCreateRequest) Unmarshal(dAtA []byte) error { 749 l := len(dAtA) 750 iNdEx := 0 751 for iNdEx < l { 752 preIndex := iNdEx 753 var wire uint64 754 for shift := uint(0); ; shift += 7 { 755 if shift >= 64 { 756 return ErrIntOverflowCertificate 757 } 758 if iNdEx >= l { 759 return io.ErrUnexpectedEOF 760 } 761 b := dAtA[iNdEx] 762 iNdEx++ 763 wire |= uint64(b&0x7F) << shift 764 if b < 0x80 { 765 break 766 } 767 } 768 fieldNum := int32(wire >> 3) 769 wireType := int(wire & 0x7) 770 if wireType == 4 { 771 return fmt.Errorf("proto: RepositoryCertificateCreateRequest: wiretype end group for non-group") 772 } 773 if fieldNum <= 0 { 774 return fmt.Errorf("proto: RepositoryCertificateCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) 775 } 776 switch fieldNum { 777 case 1: 778 if wireType != 2 { 779 return fmt.Errorf("proto: wrong wireType = %d for field Certificates", wireType) 780 } 781 var msglen int 782 for shift := uint(0); ; shift += 7 { 783 if shift >= 64 { 784 return ErrIntOverflowCertificate 785 } 786 if iNdEx >= l { 787 return io.ErrUnexpectedEOF 788 } 789 b := dAtA[iNdEx] 790 iNdEx++ 791 msglen |= int(b&0x7F) << shift 792 if b < 0x80 { 793 break 794 } 795 } 796 if msglen < 0 { 797 return ErrInvalidLengthCertificate 798 } 799 postIndex := iNdEx + msglen 800 if postIndex < 0 { 801 return ErrInvalidLengthCertificate 802 } 803 if postIndex > l { 804 return io.ErrUnexpectedEOF 805 } 806 if m.Certificates == nil { 807 m.Certificates = &v1alpha1.RepositoryCertificateList{} 808 } 809 if err := m.Certificates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 810 return err 811 } 812 iNdEx = postIndex 813 case 2: 814 if wireType != 0 { 815 return fmt.Errorf("proto: wrong wireType = %d for field Upsert", wireType) 816 } 817 var v int 818 for shift := uint(0); ; shift += 7 { 819 if shift >= 64 { 820 return ErrIntOverflowCertificate 821 } 822 if iNdEx >= l { 823 return io.ErrUnexpectedEOF 824 } 825 b := dAtA[iNdEx] 826 iNdEx++ 827 v |= int(b&0x7F) << shift 828 if b < 0x80 { 829 break 830 } 831 } 832 m.Upsert = bool(v != 0) 833 default: 834 iNdEx = preIndex 835 skippy, err := skipCertificate(dAtA[iNdEx:]) 836 if err != nil { 837 return err 838 } 839 if skippy < 0 { 840 return ErrInvalidLengthCertificate 841 } 842 if (iNdEx + skippy) < 0 { 843 return ErrInvalidLengthCertificate 844 } 845 if (iNdEx + skippy) > l { 846 return io.ErrUnexpectedEOF 847 } 848 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 849 iNdEx += skippy 850 } 851 } 852 853 if iNdEx > l { 854 return io.ErrUnexpectedEOF 855 } 856 return nil 857 } 858 func (m *RepositoryCertificateResponse) Unmarshal(dAtA []byte) error { 859 l := len(dAtA) 860 iNdEx := 0 861 for iNdEx < l { 862 preIndex := iNdEx 863 var wire uint64 864 for shift := uint(0); ; shift += 7 { 865 if shift >= 64 { 866 return ErrIntOverflowCertificate 867 } 868 if iNdEx >= l { 869 return io.ErrUnexpectedEOF 870 } 871 b := dAtA[iNdEx] 872 iNdEx++ 873 wire |= uint64(b&0x7F) << shift 874 if b < 0x80 { 875 break 876 } 877 } 878 fieldNum := int32(wire >> 3) 879 wireType := int(wire & 0x7) 880 if wireType == 4 { 881 return fmt.Errorf("proto: RepositoryCertificateResponse: wiretype end group for non-group") 882 } 883 if fieldNum <= 0 { 884 return fmt.Errorf("proto: RepositoryCertificateResponse: illegal tag %d (wire type %d)", fieldNum, wire) 885 } 886 switch fieldNum { 887 default: 888 iNdEx = preIndex 889 skippy, err := skipCertificate(dAtA[iNdEx:]) 890 if err != nil { 891 return err 892 } 893 if skippy < 0 { 894 return ErrInvalidLengthCertificate 895 } 896 if (iNdEx + skippy) < 0 { 897 return ErrInvalidLengthCertificate 898 } 899 if (iNdEx + skippy) > l { 900 return io.ErrUnexpectedEOF 901 } 902 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 903 iNdEx += skippy 904 } 905 } 906 907 if iNdEx > l { 908 return io.ErrUnexpectedEOF 909 } 910 return nil 911 } 912 func skipCertificate(dAtA []byte) (n int, err error) { 913 l := len(dAtA) 914 iNdEx := 0 915 depth := 0 916 for iNdEx < l { 917 var wire uint64 918 for shift := uint(0); ; shift += 7 { 919 if shift >= 64 { 920 return 0, ErrIntOverflowCertificate 921 } 922 if iNdEx >= l { 923 return 0, io.ErrUnexpectedEOF 924 } 925 b := dAtA[iNdEx] 926 iNdEx++ 927 wire |= (uint64(b) & 0x7F) << shift 928 if b < 0x80 { 929 break 930 } 931 } 932 wireType := int(wire & 0x7) 933 switch wireType { 934 case 0: 935 for shift := uint(0); ; shift += 7 { 936 if shift >= 64 { 937 return 0, ErrIntOverflowCertificate 938 } 939 if iNdEx >= l { 940 return 0, io.ErrUnexpectedEOF 941 } 942 iNdEx++ 943 if dAtA[iNdEx-1] < 0x80 { 944 break 945 } 946 } 947 case 1: 948 iNdEx += 8 949 case 2: 950 var length int 951 for shift := uint(0); ; shift += 7 { 952 if shift >= 64 { 953 return 0, ErrIntOverflowCertificate 954 } 955 if iNdEx >= l { 956 return 0, io.ErrUnexpectedEOF 957 } 958 b := dAtA[iNdEx] 959 iNdEx++ 960 length |= (int(b) & 0x7F) << shift 961 if b < 0x80 { 962 break 963 } 964 } 965 if length < 0 { 966 return 0, ErrInvalidLengthCertificate 967 } 968 iNdEx += length 969 case 3: 970 depth++ 971 case 4: 972 if depth == 0 { 973 return 0, ErrUnexpectedEndOfGroupCertificate 974 } 975 depth-- 976 case 5: 977 iNdEx += 4 978 default: 979 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 980 } 981 if iNdEx < 0 { 982 return 0, ErrInvalidLengthCertificate 983 } 984 if depth == 0 { 985 return iNdEx, nil 986 } 987 } 988 return 0, io.ErrUnexpectedEOF 989 } 990 991 var ( 992 ErrInvalidLengthCertificate = fmt.Errorf("proto: negative length found during unmarshaling") 993 ErrIntOverflowCertificate = fmt.Errorf("proto: integer overflow") 994 ErrUnexpectedEndOfGroupCertificate = fmt.Errorf("proto: unexpected end of group") 995 )