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]>
1687 lines
46 KiB
Go
Generated
1687 lines
46 KiB
Go
Generated
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: server/cluster/cluster.proto
|
|
|
|
// Cluster Service
|
|
//
|
|
// Cluster Service API performs CRUD actions against cluster resources
|
|
|
|
package cluster
|
|
|
|
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
|
|
|
|
// ClusterID holds a cluster server URL or cluster name
|
|
type ClusterID struct {
|
|
// type is the type of the specified cluster identifier ( "server" - default, "name" )
|
|
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
|
// value holds the cluster server URL or cluster name
|
|
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ClusterID) Reset() { *m = ClusterID{} }
|
|
func (m *ClusterID) String() string { return proto.CompactTextString(m) }
|
|
func (*ClusterID) ProtoMessage() {}
|
|
func (*ClusterID) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a6b5ba0b5aa57b32, []int{0}
|
|
}
|
|
func (m *ClusterID) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ClusterID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ClusterID.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 *ClusterID) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ClusterID.Merge(m, src)
|
|
}
|
|
func (m *ClusterID) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ClusterID) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ClusterID.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ClusterID proto.InternalMessageInfo
|
|
|
|
func (m *ClusterID) GetType() string {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ClusterID) GetValue() string {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// ClusterQuery is a query for cluster resources
|
|
type ClusterQuery struct {
|
|
Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
Id *ClusterID `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ClusterQuery) Reset() { *m = ClusterQuery{} }
|
|
func (m *ClusterQuery) String() string { return proto.CompactTextString(m) }
|
|
func (*ClusterQuery) ProtoMessage() {}
|
|
func (*ClusterQuery) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a6b5ba0b5aa57b32, []int{1}
|
|
}
|
|
func (m *ClusterQuery) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ClusterQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ClusterQuery.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 *ClusterQuery) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ClusterQuery.Merge(m, src)
|
|
}
|
|
func (m *ClusterQuery) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ClusterQuery) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ClusterQuery.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ClusterQuery proto.InternalMessageInfo
|
|
|
|
func (m *ClusterQuery) GetServer() string {
|
|
if m != nil {
|
|
return m.Server
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ClusterQuery) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ClusterQuery) GetId() *ClusterID {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ClusterResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ClusterResponse) Reset() { *m = ClusterResponse{} }
|
|
func (m *ClusterResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ClusterResponse) ProtoMessage() {}
|
|
func (*ClusterResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a6b5ba0b5aa57b32, []int{2}
|
|
}
|
|
func (m *ClusterResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ClusterResponse.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 *ClusterResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ClusterResponse.Merge(m, src)
|
|
}
|
|
func (m *ClusterResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ClusterResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ClusterResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ClusterResponse proto.InternalMessageInfo
|
|
|
|
type ClusterCreateRequest struct {
|
|
Cluster *v1alpha1.Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"`
|
|
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 *ClusterCreateRequest) Reset() { *m = ClusterCreateRequest{} }
|
|
func (m *ClusterCreateRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ClusterCreateRequest) ProtoMessage() {}
|
|
func (*ClusterCreateRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a6b5ba0b5aa57b32, []int{3}
|
|
}
|
|
func (m *ClusterCreateRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ClusterCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ClusterCreateRequest.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 *ClusterCreateRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ClusterCreateRequest.Merge(m, src)
|
|
}
|
|
func (m *ClusterCreateRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ClusterCreateRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ClusterCreateRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ClusterCreateRequest proto.InternalMessageInfo
|
|
|
|
func (m *ClusterCreateRequest) GetCluster() *v1alpha1.Cluster {
|
|
if m != nil {
|
|
return m.Cluster
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClusterCreateRequest) GetUpsert() bool {
|
|
if m != nil {
|
|
return m.Upsert
|
|
}
|
|
return false
|
|
}
|
|
|
|
type ClusterUpdateRequest struct {
|
|
Cluster *v1alpha1.Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"`
|
|
UpdatedFields []string `protobuf:"bytes,2,rep,name=updatedFields,proto3" json:"updatedFields,omitempty"`
|
|
Id *ClusterID `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ClusterUpdateRequest) Reset() { *m = ClusterUpdateRequest{} }
|
|
func (m *ClusterUpdateRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ClusterUpdateRequest) ProtoMessage() {}
|
|
func (*ClusterUpdateRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_a6b5ba0b5aa57b32, []int{4}
|
|
}
|
|
func (m *ClusterUpdateRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ClusterUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ClusterUpdateRequest.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 *ClusterUpdateRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ClusterUpdateRequest.Merge(m, src)
|
|
}
|
|
func (m *ClusterUpdateRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ClusterUpdateRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ClusterUpdateRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ClusterUpdateRequest proto.InternalMessageInfo
|
|
|
|
func (m *ClusterUpdateRequest) GetCluster() *v1alpha1.Cluster {
|
|
if m != nil {
|
|
return m.Cluster
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClusterUpdateRequest) GetUpdatedFields() []string {
|
|
if m != nil {
|
|
return m.UpdatedFields
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ClusterUpdateRequest) GetId() *ClusterID {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*ClusterID)(nil), "cluster.ClusterID")
|
|
proto.RegisterType((*ClusterQuery)(nil), "cluster.ClusterQuery")
|
|
proto.RegisterType((*ClusterResponse)(nil), "cluster.ClusterResponse")
|
|
proto.RegisterType((*ClusterCreateRequest)(nil), "cluster.ClusterCreateRequest")
|
|
proto.RegisterType((*ClusterUpdateRequest)(nil), "cluster.ClusterUpdateRequest")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("server/cluster/cluster.proto", fileDescriptor_a6b5ba0b5aa57b32) }
|
|
|
|
var fileDescriptor_a6b5ba0b5aa57b32 = []byte{
|
|
// 596 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcf, 0x6f, 0xd3, 0x30,
|
|
0x14, 0xc7, 0xe5, 0x6e, 0x74, 0xcc, 0x03, 0x06, 0xd6, 0x40, 0x51, 0xf7, 0x43, 0x25, 0x20, 0x28,
|
|
0x68, 0xb5, 0xd5, 0x76, 0x5c, 0xb8, 0xb1, 0x0e, 0x50, 0xa5, 0x5d, 0x08, 0xe2, 0xc2, 0x61, 0x93,
|
|
0x97, 0x3c, 0xa5, 0x66, 0x59, 0x62, 0x62, 0x27, 0xd2, 0x84, 0xb8, 0xec, 0xc4, 0x0d, 0x21, 0xae,
|
|
0x5c, 0xf9, 0x43, 0xb8, 0x21, 0x71, 0x41, 0xe2, 0x1f, 0x40, 0x15, 0x7f, 0x08, 0x8a, 0x93, 0xb4,
|
|
0xb4, 0xd3, 0xaa, 0x21, 0x15, 0x4e, 0xf5, 0x7b, 0xea, 0xf3, 0xf7, 0xf3, 0xbe, 0x7e, 0x8e, 0xf1,
|
|
0x9a, 0x82, 0x38, 0x85, 0x98, 0xb9, 0x41, 0xa2, 0xf4, 0xe8, 0x97, 0xca, 0x38, 0xd2, 0x11, 0x59,
|
|
0x28, 0xc2, 0xda, 0x9a, 0x1f, 0x45, 0x7e, 0x00, 0x8c, 0x4b, 0xc1, 0x78, 0x18, 0x46, 0x9a, 0x6b,
|
|
0x11, 0x85, 0x2a, 0xff, 0x5b, 0x6d, 0xd7, 0x17, 0xba, 0x9f, 0x1c, 0x50, 0x37, 0x3a, 0x62, 0x3c,
|
|
0xf6, 0x23, 0x19, 0x47, 0xaf, 0xcc, 0xa2, 0xe9, 0x7a, 0x2c, 0xed, 0x30, 0x79, 0xe8, 0x67, 0x95,
|
|
0x8a, 0x71, 0x29, 0x03, 0xe1, 0x9a, 0x5a, 0x96, 0xb6, 0x78, 0x20, 0xfb, 0xbc, 0xc5, 0x7c, 0x08,
|
|
0x21, 0xe6, 0x1a, 0xbc, 0x7c, 0x37, 0xfb, 0x01, 0x5e, 0xec, 0xe6, 0xb2, 0xbd, 0x1d, 0x42, 0xf0,
|
|
0xbc, 0x3e, 0x96, 0x60, 0xa1, 0x3a, 0x6a, 0x2c, 0x3a, 0x66, 0x4d, 0x56, 0xf0, 0x85, 0x94, 0x07,
|
|
0x09, 0x58, 0x15, 0x93, 0xcc, 0x03, 0x7b, 0x0f, 0x5f, 0x2a, 0xca, 0x9e, 0x25, 0x10, 0x1f, 0x93,
|
|
0x1b, 0xb8, 0x9a, 0xf7, 0x56, 0xd4, 0x16, 0x51, 0xb6, 0x63, 0xc8, 0x8f, 0xca, 0x62, 0xb3, 0x26,
|
|
0x36, 0xae, 0x08, 0xcf, 0x9a, 0xab, 0xa3, 0xc6, 0x52, 0x9b, 0xd0, 0xd2, 0x83, 0x21, 0x85, 0x53,
|
|
0x11, 0x9e, 0x7d, 0x0d, 0x2f, 0x17, 0x09, 0x07, 0x94, 0x8c, 0x42, 0x05, 0xf6, 0x7b, 0x84, 0x57,
|
|
0x8a, 0x5c, 0x37, 0x06, 0xae, 0xc1, 0x81, 0xd7, 0x09, 0x28, 0x4d, 0xf6, 0x71, 0xe9, 0x9c, 0x11,
|
|
0x5f, 0x6a, 0x3f, 0xa6, 0x23, 0x8b, 0x68, 0x69, 0x91, 0x59, 0xec, 0xbb, 0x1e, 0x4d, 0x3b, 0x54,
|
|
0x1e, 0xfa, 0x34, 0xb3, 0x88, 0xfe, 0x61, 0x11, 0x2d, 0x2d, 0x2a, 0x49, 0x9c, 0x72, 0xd7, 0xac,
|
|
0xb9, 0x44, 0x2a, 0x88, 0xb5, 0x69, 0xe3, 0xa2, 0x53, 0x44, 0xf6, 0x97, 0x11, 0xd1, 0x0b, 0xe9,
|
|
0xfd, 0x4f, 0xa2, 0xdb, 0xf8, 0x72, 0x62, 0x14, 0xbd, 0x27, 0x02, 0x02, 0x4f, 0x59, 0x95, 0xfa,
|
|
0x5c, 0x63, 0xd1, 0x19, 0x4f, 0x9e, 0xc7, 0xe8, 0xf6, 0xb7, 0x05, 0x7c, 0xa5, 0xc8, 0x3c, 0x87,
|
|
0x38, 0x15, 0x2e, 0x90, 0x13, 0x84, 0xe7, 0x77, 0x85, 0xd2, 0xe4, 0xfa, 0x64, 0x8d, 0x39, 0xeb,
|
|
0x5a, 0x6f, 0x26, 0xcd, 0x64, 0x0a, 0xb6, 0x75, 0xf2, 0xe3, 0xd7, 0xc7, 0x0a, 0x21, 0x57, 0xcd,
|
|
0xac, 0xa7, 0xad, 0xf2, 0x46, 0x28, 0xf2, 0x01, 0xe1, 0x6a, 0x7e, 0xcc, 0x64, 0x7d, 0x12, 0x63,
|
|
0xec, 0xf8, 0x6b, 0xb3, 0xf1, 0xd6, 0xbe, 0x69, 0x50, 0x56, 0xed, 0x53, 0x28, 0x0f, 0x87, 0xae,
|
|
0xbf, 0x43, 0x78, 0xee, 0x29, 0x9c, 0xe9, 0xcb, 0x8c, 0x40, 0x6e, 0x19, 0x90, 0x75, 0xb2, 0x3a,
|
|
0x09, 0xc2, 0xde, 0x08, 0x8f, 0x9a, 0xeb, 0xf7, 0x96, 0x7c, 0x42, 0xb8, 0x9a, 0xcf, 0xdc, 0x69,
|
|
0x7b, 0xc6, 0x66, 0x71, 0x56, 0x54, 0x9b, 0x86, 0xea, 0x4e, 0x6d, 0x1a, 0xd5, 0xc8, 0xa9, 0x3d,
|
|
0x5c, 0xdd, 0x81, 0x00, 0x34, 0x9c, 0xe5, 0x95, 0x35, 0x99, 0x1e, 0x5e, 0xf3, 0xa2, 0xfd, 0xfb,
|
|
0x53, 0xdb, 0x0f, 0x31, 0x76, 0xb2, 0xcf, 0x22, 0x3c, 0x4a, 0x74, 0xff, 0xef, 0x35, 0x98, 0xd1,
|
|
0xb8, 0x67, 0xdf, 0x9d, 0xa2, 0xc1, 0x62, 0x23, 0xd0, 0xe4, 0x99, 0xc2, 0x67, 0x84, 0x97, 0x7b,
|
|
0x61, 0xca, 0x03, 0x91, 0x59, 0xdb, 0xe5, 0x6e, 0x1f, 0xfe, 0xf1, 0x14, 0x6c, 0x19, 0x44, 0x6a,
|
|
0x6f, 0x4e, 0x43, 0x14, 0x43, 0xa4, 0xa6, 0x9b, 0x31, 0x6d, 0x6f, 0x7f, 0x1d, 0x6c, 0xa0, 0xef,
|
|
0x83, 0x0d, 0xf4, 0x73, 0xb0, 0x81, 0x5e, 0x6e, 0x9d, 0xef, 0xa5, 0x70, 0x03, 0x01, 0xa1, 0x2e,
|
|
0x05, 0x0e, 0xaa, 0xe6, 0x61, 0xe8, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x3f, 0x7b, 0x15,
|
|
0xad, 0x06, 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
|
|
|
|
// ClusterServiceClient is the client API for ClusterService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type ClusterServiceClient interface {
|
|
// List returns list of clusters
|
|
List(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.ClusterList, error)
|
|
// Create creates a cluster
|
|
Create(ctx context.Context, in *ClusterCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error)
|
|
// Get returns a cluster by server address
|
|
Get(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error)
|
|
// Update updates a cluster
|
|
Update(ctx context.Context, in *ClusterUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error)
|
|
// Delete deletes a cluster
|
|
Delete(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error)
|
|
// RotateAuth rotates the bearer token used for a cluster
|
|
RotateAuth(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error)
|
|
// InvalidateCache invalidates cluster cache
|
|
InvalidateCache(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error)
|
|
}
|
|
|
|
type clusterServiceClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewClusterServiceClient(cc *grpc.ClientConn) ClusterServiceClient {
|
|
return &clusterServiceClient{cc}
|
|
}
|
|
|
|
func (c *clusterServiceClient) List(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.ClusterList, error) {
|
|
out := new(v1alpha1.ClusterList)
|
|
err := c.cc.Invoke(ctx, "/cluster.ClusterService/List", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *clusterServiceClient) Create(ctx context.Context, in *ClusterCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) {
|
|
out := new(v1alpha1.Cluster)
|
|
err := c.cc.Invoke(ctx, "/cluster.ClusterService/Create", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *clusterServiceClient) Get(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) {
|
|
out := new(v1alpha1.Cluster)
|
|
err := c.cc.Invoke(ctx, "/cluster.ClusterService/Get", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *clusterServiceClient) Update(ctx context.Context, in *ClusterUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) {
|
|
out := new(v1alpha1.Cluster)
|
|
err := c.cc.Invoke(ctx, "/cluster.ClusterService/Update", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *clusterServiceClient) Delete(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) {
|
|
out := new(ClusterResponse)
|
|
err := c.cc.Invoke(ctx, "/cluster.ClusterService/Delete", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *clusterServiceClient) RotateAuth(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) {
|
|
out := new(ClusterResponse)
|
|
err := c.cc.Invoke(ctx, "/cluster.ClusterService/RotateAuth", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *clusterServiceClient) InvalidateCache(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) {
|
|
out := new(v1alpha1.Cluster)
|
|
err := c.cc.Invoke(ctx, "/cluster.ClusterService/InvalidateCache", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ClusterServiceServer is the server API for ClusterService service.
|
|
type ClusterServiceServer interface {
|
|
// List returns list of clusters
|
|
List(context.Context, *ClusterQuery) (*v1alpha1.ClusterList, error)
|
|
// Create creates a cluster
|
|
Create(context.Context, *ClusterCreateRequest) (*v1alpha1.Cluster, error)
|
|
// Get returns a cluster by server address
|
|
Get(context.Context, *ClusterQuery) (*v1alpha1.Cluster, error)
|
|
// Update updates a cluster
|
|
Update(context.Context, *ClusterUpdateRequest) (*v1alpha1.Cluster, error)
|
|
// Delete deletes a cluster
|
|
Delete(context.Context, *ClusterQuery) (*ClusterResponse, error)
|
|
// RotateAuth rotates the bearer token used for a cluster
|
|
RotateAuth(context.Context, *ClusterQuery) (*ClusterResponse, error)
|
|
// InvalidateCache invalidates cluster cache
|
|
InvalidateCache(context.Context, *ClusterQuery) (*v1alpha1.Cluster, error)
|
|
}
|
|
|
|
// UnimplementedClusterServiceServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedClusterServiceServer struct {
|
|
}
|
|
|
|
func (*UnimplementedClusterServiceServer) List(ctx context.Context, req *ClusterQuery) (*v1alpha1.ClusterList, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
|
}
|
|
func (*UnimplementedClusterServiceServer) Create(ctx context.Context, req *ClusterCreateRequest) (*v1alpha1.Cluster, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
|
}
|
|
func (*UnimplementedClusterServiceServer) Get(ctx context.Context, req *ClusterQuery) (*v1alpha1.Cluster, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
|
}
|
|
func (*UnimplementedClusterServiceServer) Update(ctx context.Context, req *ClusterUpdateRequest) (*v1alpha1.Cluster, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
|
|
}
|
|
func (*UnimplementedClusterServiceServer) Delete(ctx context.Context, req *ClusterQuery) (*ClusterResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
|
}
|
|
func (*UnimplementedClusterServiceServer) RotateAuth(ctx context.Context, req *ClusterQuery) (*ClusterResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method RotateAuth not implemented")
|
|
}
|
|
func (*UnimplementedClusterServiceServer) InvalidateCache(ctx context.Context, req *ClusterQuery) (*v1alpha1.Cluster, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method InvalidateCache not implemented")
|
|
}
|
|
|
|
func RegisterClusterServiceServer(s *grpc.Server, srv ClusterServiceServer) {
|
|
s.RegisterService(&_ClusterService_serviceDesc, srv)
|
|
}
|
|
|
|
func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ClusterQuery)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ClusterServiceServer).List(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cluster.ClusterService/List",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ClusterServiceServer).List(ctx, req.(*ClusterQuery))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ClusterCreateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ClusterServiceServer).Create(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cluster.ClusterService/Create",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ClusterServiceServer).Create(ctx, req.(*ClusterCreateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ClusterQuery)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ClusterServiceServer).Get(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cluster.ClusterService/Get",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ClusterServiceServer).Get(ctx, req.(*ClusterQuery))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ClusterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ClusterUpdateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ClusterServiceServer).Update(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cluster.ClusterService/Update",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ClusterServiceServer).Update(ctx, req.(*ClusterUpdateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ClusterQuery)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ClusterServiceServer).Delete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cluster.ClusterService/Delete",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ClusterServiceServer).Delete(ctx, req.(*ClusterQuery))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ClusterService_RotateAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ClusterQuery)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ClusterServiceServer).RotateAuth(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cluster.ClusterService/RotateAuth",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ClusterServiceServer).RotateAuth(ctx, req.(*ClusterQuery))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ClusterService_InvalidateCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ClusterQuery)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ClusterServiceServer).InvalidateCache(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/cluster.ClusterService/InvalidateCache",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ClusterServiceServer).InvalidateCache(ctx, req.(*ClusterQuery))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _ClusterService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "cluster.ClusterService",
|
|
HandlerType: (*ClusterServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "List",
|
|
Handler: _ClusterService_List_Handler,
|
|
},
|
|
{
|
|
MethodName: "Create",
|
|
Handler: _ClusterService_Create_Handler,
|
|
},
|
|
{
|
|
MethodName: "Get",
|
|
Handler: _ClusterService_Get_Handler,
|
|
},
|
|
{
|
|
MethodName: "Update",
|
|
Handler: _ClusterService_Update_Handler,
|
|
},
|
|
{
|
|
MethodName: "Delete",
|
|
Handler: _ClusterService_Delete_Handler,
|
|
},
|
|
{
|
|
MethodName: "RotateAuth",
|
|
Handler: _ClusterService_RotateAuth_Handler,
|
|
},
|
|
{
|
|
MethodName: "InvalidateCache",
|
|
Handler: _ClusterService_InvalidateCache_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "server/cluster/cluster.proto",
|
|
}
|
|
|
|
func (m *ClusterID) 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 *ClusterID) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ClusterID) 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.Value) > 0 {
|
|
i -= len(m.Value)
|
|
copy(dAtA[i:], m.Value)
|
|
i = encodeVarintCluster(dAtA, i, uint64(len(m.Value)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Type) > 0 {
|
|
i -= len(m.Type)
|
|
copy(dAtA[i:], m.Type)
|
|
i = encodeVarintCluster(dAtA, i, uint64(len(m.Type)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ClusterQuery) 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 *ClusterQuery) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ClusterQuery) 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.Id != nil {
|
|
{
|
|
size, err := m.Id.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintCluster(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintCluster(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Server) > 0 {
|
|
i -= len(m.Server)
|
|
copy(dAtA[i:], m.Server)
|
|
i = encodeVarintCluster(dAtA, i, uint64(len(m.Server)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ClusterResponse) 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 *ClusterResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ClusterResponse) 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 (m *ClusterCreateRequest) 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 *ClusterCreateRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ClusterCreateRequest) 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.Cluster != nil {
|
|
{
|
|
size, err := m.Cluster.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintCluster(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ClusterUpdateRequest) 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 *ClusterUpdateRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ClusterUpdateRequest) 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.Id != nil {
|
|
{
|
|
size, err := m.Id.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintCluster(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.UpdatedFields) > 0 {
|
|
for iNdEx := len(m.UpdatedFields) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.UpdatedFields[iNdEx])
|
|
copy(dAtA[i:], m.UpdatedFields[iNdEx])
|
|
i = encodeVarintCluster(dAtA, i, uint64(len(m.UpdatedFields[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if m.Cluster != nil {
|
|
{
|
|
size, err := m.Cluster.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintCluster(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintCluster(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovCluster(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *ClusterID) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Type)
|
|
if l > 0 {
|
|
n += 1 + l + sovCluster(uint64(l))
|
|
}
|
|
l = len(m.Value)
|
|
if l > 0 {
|
|
n += 1 + l + sovCluster(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ClusterQuery) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Server)
|
|
if l > 0 {
|
|
n += 1 + l + sovCluster(uint64(l))
|
|
}
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovCluster(uint64(l))
|
|
}
|
|
if m.Id != nil {
|
|
l = m.Id.Size()
|
|
n += 1 + l + sovCluster(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ClusterResponse) 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 (m *ClusterCreateRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Cluster != nil {
|
|
l = m.Cluster.Size()
|
|
n += 1 + l + sovCluster(uint64(l))
|
|
}
|
|
if m.Upsert {
|
|
n += 2
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ClusterUpdateRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Cluster != nil {
|
|
l = m.Cluster.Size()
|
|
n += 1 + l + sovCluster(uint64(l))
|
|
}
|
|
if len(m.UpdatedFields) > 0 {
|
|
for _, s := range m.UpdatedFields {
|
|
l = len(s)
|
|
n += 1 + l + sovCluster(uint64(l))
|
|
}
|
|
}
|
|
if m.Id != nil {
|
|
l = m.Id.Size()
|
|
n += 1 + l + sovCluster(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovCluster(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozCluster(x uint64) (n int) {
|
|
return sovCluster(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *ClusterID) 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 ErrIntOverflowCluster
|
|
}
|
|
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: ClusterID: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ClusterID: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCluster
|
|
}
|
|
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 ErrInvalidLengthCluster
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Type = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCluster
|
|
}
|
|
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 ErrInvalidLengthCluster
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipCluster(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
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 *ClusterQuery) 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 ErrIntOverflowCluster
|
|
}
|
|
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: ClusterQuery: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ClusterQuery: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCluster
|
|
}
|
|
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 ErrInvalidLengthCluster
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Server = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCluster
|
|
}
|
|
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 ErrInvalidLengthCluster
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCluster
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Id == nil {
|
|
m.Id = &ClusterID{}
|
|
}
|
|
if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipCluster(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
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 *ClusterResponse) 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 ErrIntOverflowCluster
|
|
}
|
|
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: ClusterResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ClusterResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipCluster(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
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 *ClusterCreateRequest) 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 ErrIntOverflowCluster
|
|
}
|
|
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: ClusterCreateRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ClusterCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCluster
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Cluster == nil {
|
|
m.Cluster = &v1alpha1.Cluster{}
|
|
}
|
|
if err := m.Cluster.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 ErrIntOverflowCluster
|
|
}
|
|
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 := skipCluster(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
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 *ClusterUpdateRequest) 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 ErrIntOverflowCluster
|
|
}
|
|
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: ClusterUpdateRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ClusterUpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCluster
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Cluster == nil {
|
|
m.Cluster = &v1alpha1.Cluster{}
|
|
}
|
|
if err := m.Cluster.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UpdatedFields", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCluster
|
|
}
|
|
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 ErrInvalidLengthCluster
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.UpdatedFields = append(m.UpdatedFields, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCluster
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Id == nil {
|
|
m.Id = &ClusterID{}
|
|
}
|
|
if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipCluster(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthCluster
|
|
}
|
|
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 skipCluster(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, ErrIntOverflowCluster
|
|
}
|
|
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, ErrIntOverflowCluster
|
|
}
|
|
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, ErrIntOverflowCluster
|
|
}
|
|
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, ErrInvalidLengthCluster
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupCluster
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthCluster
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthCluster = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowCluster = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupCluster = fmt.Errorf("proto: unexpected end of group")
|
|
)
|