mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
* feat(api): hard-fork CRD API group argoproj.io -> deploy.hanzo.ai
Hanzo CD hard-fork, phase 1.1. Single source of truth is
pkg/apis/application/register.go's Group constant (Application/AppProject/
ApplicationSet all derive their FullName from it); every other Go call-site
that hardcoded the literal group string is updated to match: the 3 generated
informer GVRs, the app-of-apps nested-Application detector in types.go, the
resource-tree Application-kind cache populator, the 3 NotFound error
constructors in server/application, and the applicationset-controller's
leader-election Lease name/ID (kept in lockstep across Go source + RBAC
resourceNames, or leader election would get RBAC-denied on startup).
CRD YAMLs (application/appproject/applicationset) and every RBAC apiGroups
rule that actually governs our 3 CRDs are repointed to deploy.hanzo.ai, across
both manifests/base/* (namespaced Roles) and manifests/cluster-rbac/* (cluster
scope). Two adjacent things that share the "argoproj.io" string but are NOT
ours are deliberately left untouched: gitops-engine's health-check dispatch
for Argo Workflows' `Workflow` kind, and argocd-server-clusterrole's second
apiGroups block granting read on Argo Workflows' `workflows` resource — both
belong to a separate, unrelated Argoproj-family project we are not forking.
Also untouched, per explicit scope: annotation/label keys (argocd.argoproj.io/*)
and finalizers (*.argoproj.io) that track already-applied live resources, and
argocd-cm.yaml's resource.customizations.ignoreResourceUpdates keys (a narrow
app-of-apps diffing nicety, not build- or RBAC-relevant).
CGO_ENABLED=0 go build ./... verified green.
* ci: wire canonical hanzo.yml + cicd.yml (Hanzo CD image build)
Phase 1.3. Follows the same one-way pattern every hanzo/lux/zoo repo uses:
hanzo.yml declares the image (root Dockerfile -> ghcr.io/hanzoai/deploy) and a
fast go-build sanity test (the multi-stage Dockerfile build is the slow, real
gate); cicd.yml is the ~10-line trigger shim importing hanzoai/ci's reusable
build workflow on the arc pool, secrets from KMS only.
No `deploy:` block yet, matching the hanzoai/cms build-only-first-cutover
pattern: this repo's own live hanzo-cd namespace runs the whole Hanzo fleet's
GitOps, so the prod image/CRD swap is a deliberate separate action (see the
[HELD] universe PR), never an automatic rollout on merge. Every PR/push still
builds and pushes an immutable ghcr.io/hanzoai/deploy:sha-<7>-amd64 image.
* feat(ui): rebrand Argo CD -> Hanzo CD (title, favicon, logo, sidebar)
Phase 1.2. User-facing "Argo CD"/"ArgoCD" text replaced with "Hanzo CD"
across the login page, help modal, settings screens, version-info panel,
sync-options warning, fullscreen-logs title, app.tsx page titles, and
index.html's <title>/noscript text (dropped the now-wrong upstream CLI
doc link rather than invent a hanzo.ai URL that doesn't exist).
Logo/favicon assets replaced with the canonical Hanzo mark (never
hand-drawn, copied from ~/work/hanzo/logo/dist): the two real usages of
Argo's logo collapse onto one Hanzo glyph (mono + white variants) at the
same 5 call sites (login icon + footer, login.scss $logoPath/
$logoNegativePath, sidebar text-logo), preserving the existing CSS
invert() filters so both the light login panel and dark sidebar still
render correctly. Old argologo.svg/argo_o.svg/argo.png deleted (no
longer referenced). favicon-{16x16,32x32}.png added at
ui/src/assets/favicon/ (index.html's links to that path were previously
dead - the directory didn't exist in this checkout). package.json name
argo-cd-ui -> hanzo-cd-ui.
Left alone, deliberately: the two Kubernetes resource-kind icon sets
under ui/src/assets/images/resources/ (unrelated to branding), and
upstream doc/project links (argoproj.io, argo-cd.readthedocs.io) since
we have no equivalent hanzo.ai docs to point to yet - except the login
footer logo's outbound link, which now points to hanzo.ai instead of
argoproj.io (a Hanzo-branded mark linking to the upstream project it
was forked from read as an obvious leftover).
* feat(module): rename Go module github.com/argoproj/argo-cd/v3 -> github.com/hanzoai/deploy
Phase 2. No version suffix on the new path (org policy: never publish our
own Go modules above v1.x.x / with a v2+ suffix) — this fork starts a fresh
v0/v1 module identity rather than carrying the v3 the upstream fork point
had reached.
Mechanical, symmetric rewrite: 704 .go files (import statements only; two
disjoint substitutions applied specific-first so the nested gitops-engine
module path never double-matches), plus go.mod (module line, the
gitops-engine require+replace pair, version reset to v0.0.0-... since a
suffix-less path can't carry a v3 semver), gitops-engine/go.mod, Makefile
(ldflags PACKAGE + 2 TEST_MODULE filters), .golangci.yaml, .goreleaser.yaml,
.mockery.yaml (+ gitops-engine's), Procfile, the codegen/proto generation
scripts (hack/generate-proto.sh, update-codegen.sh, update-openapi.sh), and
20 .proto files' go_package options. Also one OpenTelemetry tracer name
string in gitops-engine/pkg/sync/sync_context.go (a cosmestic label, not an
import, but worth keeping consistent).
CGO_ENABLED=0 go build ./... verified green for both the root module and
the nested gitops-engine module; go vet clean on both; go mod tidy run
(network available) to reconcile go.sum, dependency set unchanged.
Left alone, deliberately: doc-only mentions (docs/snyk/*.html scan reports,
gitops-engine/README.md), a comment-only reference in
.github/workflows/release.yaml, and one Renovate bot config line — none are
build- or codegen-load-bearing. Also left alone: comments citing upstream
GitHub issue URLs (github.com/argoproj/argo-cd/issues/NNNNN) and a handful
of test fixtures using "https://github.com/argoproj/argo-cd.git" as a
representative example repo URL — both are accurate historical/test-data
references, not stale self-references.
---------
Co-authored-by: Hanzo Dev <[email protected]>
985 lines
29 KiB
Go
Generated
985 lines
29 KiB
Go
Generated
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: server/certificate/certificate.proto
|
|
|
|
// Certificate Service
|
|
//
|
|
// Certificate Service API performs CRUD actions against repository certificate
|
|
// resources.
|
|
|
|
package certificate
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
v1alpha1 "github.com/hanzoai/deploy/pkg/apis/application/v1alpha1"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// Message to query the server for configured repository certificates
|
|
type RepositoryCertificateQuery struct {
|
|
// A file-glob pattern (not regular expression) the host name has to match
|
|
HostNamePattern string `protobuf:"bytes,1,opt,name=hostNamePattern,proto3" json:"hostNamePattern,omitempty"`
|
|
// The type of the certificate to match (ssh or https)
|
|
CertType string `protobuf:"bytes,2,opt,name=certType,proto3" json:"certType,omitempty"`
|
|
// The sub type of the certificate to match (protocol dependent, usually only used for ssh certs)
|
|
CertSubType string `protobuf:"bytes,3,opt,name=certSubType,proto3" json:"certSubType,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *RepositoryCertificateQuery) Reset() { *m = RepositoryCertificateQuery{} }
|
|
func (m *RepositoryCertificateQuery) String() string { return proto.CompactTextString(m) }
|
|
func (*RepositoryCertificateQuery) ProtoMessage() {}
|
|
func (*RepositoryCertificateQuery) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_387c41efc0710f00, []int{0}
|
|
}
|
|
func (m *RepositoryCertificateQuery) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *RepositoryCertificateQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_RepositoryCertificateQuery.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *RepositoryCertificateQuery) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RepositoryCertificateQuery.Merge(m, src)
|
|
}
|
|
func (m *RepositoryCertificateQuery) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *RepositoryCertificateQuery) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RepositoryCertificateQuery.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RepositoryCertificateQuery proto.InternalMessageInfo
|
|
|
|
func (m *RepositoryCertificateQuery) GetHostNamePattern() string {
|
|
if m != nil {
|
|
return m.HostNamePattern
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RepositoryCertificateQuery) GetCertType() string {
|
|
if m != nil {
|
|
return m.CertType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RepositoryCertificateQuery) GetCertSubType() string {
|
|
if m != nil {
|
|
return m.CertSubType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Request to create a set of certificates
|
|
type RepositoryCertificateCreateRequest struct {
|
|
// List of certificates to be created
|
|
Certificates *v1alpha1.RepositoryCertificateList `protobuf:"bytes,1,opt,name=certificates,proto3" json:"certificates,omitempty"`
|
|
// Whether to upsert already existing certificates
|
|
Upsert bool `protobuf:"varint,2,opt,name=upsert,proto3" json:"upsert,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *RepositoryCertificateCreateRequest) Reset() { *m = RepositoryCertificateCreateRequest{} }
|
|
func (m *RepositoryCertificateCreateRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*RepositoryCertificateCreateRequest) ProtoMessage() {}
|
|
func (*RepositoryCertificateCreateRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_387c41efc0710f00, []int{1}
|
|
}
|
|
func (m *RepositoryCertificateCreateRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *RepositoryCertificateCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_RepositoryCertificateCreateRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *RepositoryCertificateCreateRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RepositoryCertificateCreateRequest.Merge(m, src)
|
|
}
|
|
func (m *RepositoryCertificateCreateRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *RepositoryCertificateCreateRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RepositoryCertificateCreateRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RepositoryCertificateCreateRequest proto.InternalMessageInfo
|
|
|
|
func (m *RepositoryCertificateCreateRequest) GetCertificates() *v1alpha1.RepositoryCertificateList {
|
|
if m != nil {
|
|
return m.Certificates
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RepositoryCertificateCreateRequest) GetUpsert() bool {
|
|
if m != nil {
|
|
return m.Upsert
|
|
}
|
|
return false
|
|
}
|
|
|
|
type RepositoryCertificateResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *RepositoryCertificateResponse) Reset() { *m = RepositoryCertificateResponse{} }
|
|
func (m *RepositoryCertificateResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*RepositoryCertificateResponse) ProtoMessage() {}
|
|
func (*RepositoryCertificateResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_387c41efc0710f00, []int{2}
|
|
}
|
|
func (m *RepositoryCertificateResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *RepositoryCertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_RepositoryCertificateResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *RepositoryCertificateResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RepositoryCertificateResponse.Merge(m, src)
|
|
}
|
|
func (m *RepositoryCertificateResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *RepositoryCertificateResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RepositoryCertificateResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RepositoryCertificateResponse proto.InternalMessageInfo
|
|
|
|
func init() {
|
|
proto.RegisterType((*RepositoryCertificateQuery)(nil), "certificate.RepositoryCertificateQuery")
|
|
proto.RegisterType((*RepositoryCertificateCreateRequest)(nil), "certificate.RepositoryCertificateCreateRequest")
|
|
proto.RegisterType((*RepositoryCertificateResponse)(nil), "certificate.RepositoryCertificateResponse")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("server/certificate/certificate.proto", fileDescriptor_387c41efc0710f00)
|
|
}
|
|
|
|
var fileDescriptor_387c41efc0710f00 = []byte{
|
|
// 448 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xcf, 0x6a, 0x14, 0x31,
|
|
0x18, 0x27, 0x55, 0x4a, 0x4d, 0x05, 0x6d, 0x90, 0x52, 0x86, 0xba, 0x96, 0xa1, 0x60, 0x29, 0x98,
|
|
0xb0, 0xdd, 0x8b, 0x78, 0x74, 0xc5, 0x53, 0x11, 0x9d, 0x0a, 0x82, 0x17, 0xc9, 0xce, 0x7e, 0xce,
|
|
0xc6, 0xce, 0x26, 0x31, 0xf9, 0x66, 0x60, 0xf1, 0x26, 0xbe, 0x81, 0x6f, 0xa2, 0x27, 0xdf, 0x40,
|
|
0xf1, 0x22, 0xf8, 0x02, 0xb2, 0xf8, 0x20, 0x32, 0x59, 0xd7, 0xcd, 0xc8, 0x88, 0x5e, 0x16, 0xbc,
|
|
0x7d, 0xf9, 0x92, 0x7c, 0xbf, 0x7f, 0x21, 0xf4, 0xd0, 0x83, 0xab, 0xc1, 0x89, 0x1c, 0x1c, 0xaa,
|
|
0xe7, 0x2a, 0x97, 0x08, 0x71, 0xcd, 0xad, 0x33, 0x68, 0xd8, 0x76, 0xd4, 0x4a, 0xf6, 0x0b, 0x63,
|
|
0x8a, 0x12, 0x84, 0xb4, 0x4a, 0x48, 0xad, 0x0d, 0x4a, 0x54, 0x46, 0xfb, 0xc5, 0xd1, 0xe4, 0xb4,
|
|
0x50, 0x38, 0xa9, 0x46, 0x3c, 0x37, 0x53, 0x21, 0x5d, 0x61, 0xac, 0x33, 0x2f, 0x42, 0x71, 0x2b,
|
|
0x1f, 0x8b, 0x7a, 0x20, 0xec, 0x79, 0xd1, 0xdc, 0xf4, 0x42, 0x5a, 0x5b, 0x36, 0x03, 0x95, 0xd1,
|
|
0xa2, 0xee, 0xcb, 0xd2, 0x4e, 0x64, 0x5f, 0x14, 0xa0, 0xc1, 0x49, 0x84, 0xf1, 0x62, 0x5a, 0xfa,
|
|
0x86, 0xd0, 0x24, 0x03, 0x6b, 0xbc, 0x42, 0xe3, 0x66, 0xc3, 0x15, 0x8b, 0x47, 0x15, 0xb8, 0x19,
|
|
0x3b, 0xa2, 0x57, 0x26, 0xc6, 0xe3, 0x03, 0x39, 0x85, 0x87, 0x12, 0x11, 0x9c, 0xde, 0x23, 0x07,
|
|
0xe4, 0xe8, 0x52, 0xf6, 0x7b, 0x9b, 0x25, 0x74, 0xab, 0xd1, 0xf0, 0x78, 0x66, 0x61, 0x6f, 0x23,
|
|
0x1c, 0xf9, 0xb5, 0x66, 0x07, 0x34, 0xe8, 0x3b, 0xab, 0x46, 0x61, 0xfb, 0x42, 0xd8, 0x8e, 0x5b,
|
|
0xe9, 0x07, 0x42, 0xd3, 0x4e, 0x1a, 0x43, 0x07, 0x12, 0x21, 0x83, 0x97, 0x15, 0x78, 0x64, 0xaf,
|
|
0xe8, 0xe5, 0xc8, 0x28, 0x1f, 0xb8, 0x6c, 0x9f, 0x3c, 0xe1, 0x2b, 0x4b, 0xf8, 0xd2, 0x92, 0x50,
|
|
0x3c, 0xcb, 0xc7, 0xbc, 0x1e, 0x70, 0x7b, 0x5e, 0xf0, 0xc6, 0x12, 0x1e, 0x59, 0xc2, 0x97, 0x96,
|
|
0xf0, 0x4e, 0xdc, 0x53, 0xe5, 0x31, 0x6b, 0x81, 0xb1, 0x5d, 0xba, 0x59, 0x59, 0x0f, 0x0e, 0x83,
|
|
0xbe, 0xad, 0xec, 0xe7, 0x2a, 0xbd, 0x41, 0xaf, 0x77, 0x8e, 0xc8, 0xc0, 0x5b, 0xa3, 0x3d, 0x9c,
|
|
0x7c, 0xbe, 0x48, 0x59, 0xd4, 0x3f, 0x03, 0x57, 0xab, 0x1c, 0xd8, 0x3b, 0x42, 0xaf, 0x36, 0x30,
|
|
0xc3, 0x18, 0xe4, 0x26, 0x8f, 0x1f, 0xc7, 0x9f, 0x93, 0x49, 0xd6, 0x25, 0x3a, 0xdd, 0x7f, 0xfd,
|
|
0xf5, 0xfb, 0xdb, 0x8d, 0x5d, 0x76, 0x2d, 0xbc, 0xbf, 0xba, 0x2f, 0x5a, 0x26, 0x7c, 0x22, 0x74,
|
|
0x67, 0x91, 0x49, 0x74, 0x8f, 0x89, 0xbf, 0xb3, 0x6e, 0x05, 0xb9, 0x3e, 0xf6, 0xc7, 0x81, 0xfd,
|
|
0x61, 0xda, 0xc9, 0xfe, 0x4e, 0x3b, 0xd0, 0xf7, 0x84, 0xee, 0xdc, 0x83, 0x12, 0xda, 0x5a, 0xfe,
|
|
0x9b, 0x04, 0x8e, 0x3b, 0x35, 0xdc, 0xbd, 0xff, 0x71, 0xde, 0x23, 0x5f, 0xe6, 0x3d, 0xf2, 0x6d,
|
|
0xde, 0x23, 0x4f, 0x6f, 0xff, 0xdb, 0x6f, 0x90, 0x97, 0x0a, 0x34, 0xc6, 0x83, 0x46, 0x9b, 0xe1,
|
|
0x03, 0x18, 0xfc, 0x08, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x4d, 0x4a, 0x41, 0xa1, 0x04, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// CertificateServiceClient is the client API for CertificateService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type CertificateServiceClient interface {
|
|
// List all available repository certificates
|
|
ListCertificates(ctx context.Context, in *RepositoryCertificateQuery, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error)
|
|
// Creates repository certificates on the server
|
|
CreateCertificate(ctx context.Context, in *RepositoryCertificateCreateRequest, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error)
|
|
// Delete the certificates that match the RepositoryCertificateQuery
|
|
DeleteCertificate(ctx context.Context, in *RepositoryCertificateQuery, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error)
|
|
}
|
|
|
|
type certificateServiceClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewCertificateServiceClient(cc *grpc.ClientConn) CertificateServiceClient {
|
|
return &certificateServiceClient{cc}
|
|
}
|
|
|
|
func (c *certificateServiceClient) ListCertificates(ctx context.Context, in *RepositoryCertificateQuery, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error) {
|
|
out := new(v1alpha1.RepositoryCertificateList)
|
|
err := c.cc.Invoke(ctx, "/certificate.CertificateService/ListCertificates", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *certificateServiceClient) CreateCertificate(ctx context.Context, in *RepositoryCertificateCreateRequest, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error) {
|
|
out := new(v1alpha1.RepositoryCertificateList)
|
|
err := c.cc.Invoke(ctx, "/certificate.CertificateService/CreateCertificate", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *certificateServiceClient) DeleteCertificate(ctx context.Context, in *RepositoryCertificateQuery, opts ...grpc.CallOption) (*v1alpha1.RepositoryCertificateList, error) {
|
|
out := new(v1alpha1.RepositoryCertificateList)
|
|
err := c.cc.Invoke(ctx, "/certificate.CertificateService/DeleteCertificate", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// CertificateServiceServer is the server API for CertificateService service.
|
|
type CertificateServiceServer interface {
|
|
// List all available repository certificates
|
|
ListCertificates(context.Context, *RepositoryCertificateQuery) (*v1alpha1.RepositoryCertificateList, error)
|
|
// Creates repository certificates on the server
|
|
CreateCertificate(context.Context, *RepositoryCertificateCreateRequest) (*v1alpha1.RepositoryCertificateList, error)
|
|
// Delete the certificates that match the RepositoryCertificateQuery
|
|
DeleteCertificate(context.Context, *RepositoryCertificateQuery) (*v1alpha1.RepositoryCertificateList, error)
|
|
}
|
|
|
|
// UnimplementedCertificateServiceServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedCertificateServiceServer struct {
|
|
}
|
|
|
|
func (*UnimplementedCertificateServiceServer) ListCertificates(ctx context.Context, req *RepositoryCertificateQuery) (*v1alpha1.RepositoryCertificateList, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListCertificates not implemented")
|
|
}
|
|
func (*UnimplementedCertificateServiceServer) CreateCertificate(ctx context.Context, req *RepositoryCertificateCreateRequest) (*v1alpha1.RepositoryCertificateList, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateCertificate not implemented")
|
|
}
|
|
func (*UnimplementedCertificateServiceServer) DeleteCertificate(ctx context.Context, req *RepositoryCertificateQuery) (*v1alpha1.RepositoryCertificateList, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteCertificate not implemented")
|
|
}
|
|
|
|
func RegisterCertificateServiceServer(s *grpc.Server, srv CertificateServiceServer) {
|
|
s.RegisterService(&_CertificateService_serviceDesc, srv)
|
|
}
|
|
|
|
func _CertificateService_ListCertificates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RepositoryCertificateQuery)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CertificateServiceServer).ListCertificates(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/certificate.CertificateService/ListCertificates",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CertificateServiceServer).ListCertificates(ctx, req.(*RepositoryCertificateQuery))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CertificateService_CreateCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RepositoryCertificateCreateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CertificateServiceServer).CreateCertificate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/certificate.CertificateService/CreateCertificate",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CertificateServiceServer).CreateCertificate(ctx, req.(*RepositoryCertificateCreateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CertificateService_DeleteCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RepositoryCertificateQuery)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CertificateServiceServer).DeleteCertificate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/certificate.CertificateService/DeleteCertificate",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CertificateServiceServer).DeleteCertificate(ctx, req.(*RepositoryCertificateQuery))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _CertificateService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "certificate.CertificateService",
|
|
HandlerType: (*CertificateServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ListCertificates",
|
|
Handler: _CertificateService_ListCertificates_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateCertificate",
|
|
Handler: _CertificateService_CreateCertificate_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteCertificate",
|
|
Handler: _CertificateService_DeleteCertificate_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "server/certificate/certificate.proto",
|
|
}
|
|
|
|
func (m *RepositoryCertificateQuery) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *RepositoryCertificateQuery) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *RepositoryCertificateQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.CertSubType) > 0 {
|
|
i -= len(m.CertSubType)
|
|
copy(dAtA[i:], m.CertSubType)
|
|
i = encodeVarintCertificate(dAtA, i, uint64(len(m.CertSubType)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.CertType) > 0 {
|
|
i -= len(m.CertType)
|
|
copy(dAtA[i:], m.CertType)
|
|
i = encodeVarintCertificate(dAtA, i, uint64(len(m.CertType)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.HostNamePattern) > 0 {
|
|
i -= len(m.HostNamePattern)
|
|
copy(dAtA[i:], m.HostNamePattern)
|
|
i = encodeVarintCertificate(dAtA, i, uint64(len(m.HostNamePattern)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *RepositoryCertificateCreateRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *RepositoryCertificateCreateRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *RepositoryCertificateCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Upsert {
|
|
i--
|
|
if m.Upsert {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Certificates != nil {
|
|
{
|
|
size, err := m.Certificates.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintCertificate(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *RepositoryCertificateResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *RepositoryCertificateResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *RepositoryCertificateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintCertificate(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovCertificate(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *RepositoryCertificateQuery) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.HostNamePattern)
|
|
if l > 0 {
|
|
n += 1 + l + sovCertificate(uint64(l))
|
|
}
|
|
l = len(m.CertType)
|
|
if l > 0 {
|
|
n += 1 + l + sovCertificate(uint64(l))
|
|
}
|
|
l = len(m.CertSubType)
|
|
if l > 0 {
|
|
n += 1 + l + sovCertificate(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RepositoryCertificateCreateRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Certificates != nil {
|
|
l = m.Certificates.Size()
|
|
n += 1 + l + sovCertificate(uint64(l))
|
|
}
|
|
if m.Upsert {
|
|
n += 2
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RepositoryCertificateResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovCertificate(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozCertificate(x uint64) (n int) {
|
|
return sovCertificate(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *RepositoryCertificateQuery) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: RepositoryCertificateQuery: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RepositoryCertificateQuery: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field HostNamePattern", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.HostNamePattern = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CertType", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.CertType = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CertSubType", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.CertSubType = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipCertificate(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RepositoryCertificateCreateRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: RepositoryCertificateCreateRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RepositoryCertificateCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Certificates", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Certificates == nil {
|
|
m.Certificates = &v1alpha1.RepositoryCertificateList{}
|
|
}
|
|
if err := m.Certificates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Upsert", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Upsert = bool(v != 0)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipCertificate(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RepositoryCertificateResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: RepositoryCertificateResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RepositoryCertificateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipCertificate(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthCertificate
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipCertificate(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowCertificate
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthCertificate
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupCertificate
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthCertificate
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthCertificate = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowCertificate = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupCertificate = fmt.Errorf("proto: unexpected end of group")
|
|
)
|