mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
13568 lines
335 KiB
Go
13568 lines
335 KiB
Go
// Code generated by protoc-gen-gogo.
|
|
// source: control.proto
|
|
// DO NOT EDIT!
|
|
|
|
package api
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import _ "github.com/gogo/protobuf/gogoproto"
|
|
import _ "github.com/docker/swarmkit/protobuf/plugin"
|
|
|
|
import strings "strings"
|
|
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
|
|
import sort "sort"
|
|
import strconv "strconv"
|
|
import reflect "reflect"
|
|
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
import raftselector "github.com/docker/swarmkit/manager/raftselector"
|
|
import codes "google.golang.org/grpc/codes"
|
|
import metadata "google.golang.org/grpc/metadata"
|
|
import transport "google.golang.org/grpc/transport"
|
|
import time "time"
|
|
|
|
import io "io"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
type GetNodeRequest struct {
|
|
NodeID string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
|
|
}
|
|
|
|
func (m *GetNodeRequest) Reset() { *m = GetNodeRequest{} }
|
|
func (*GetNodeRequest) ProtoMessage() {}
|
|
func (*GetNodeRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{0} }
|
|
|
|
type GetNodeResponse struct {
|
|
Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
|
|
}
|
|
|
|
func (m *GetNodeResponse) Reset() { *m = GetNodeResponse{} }
|
|
func (*GetNodeResponse) ProtoMessage() {}
|
|
func (*GetNodeResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{1} }
|
|
|
|
type ListNodesRequest struct {
|
|
Filters *ListNodesRequest_Filters `protobuf:"bytes,1,opt,name=filters" json:"filters,omitempty"`
|
|
}
|
|
|
|
func (m *ListNodesRequest) Reset() { *m = ListNodesRequest{} }
|
|
func (*ListNodesRequest) ProtoMessage() {}
|
|
func (*ListNodesRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{2} }
|
|
|
|
type ListNodesRequest_Filters struct {
|
|
Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
|
|
IDPrefixes []string `protobuf:"bytes,2,rep,name=id_prefixes,json=idPrefixes" json:"id_prefixes,omitempty"`
|
|
Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
Memberships []NodeSpec_Membership `protobuf:"varint,4,rep,name=memberships,enum=docker.swarmkit.v1.NodeSpec_Membership" json:"memberships,omitempty"`
|
|
Roles []NodeRole `protobuf:"varint,5,rep,name=roles,enum=docker.swarmkit.v1.NodeRole" json:"roles,omitempty"`
|
|
// NamePrefixes matches all objects with the given prefixes
|
|
NamePrefixes []string `protobuf:"bytes,6,rep,name=name_prefixes,json=namePrefixes" json:"name_prefixes,omitempty"`
|
|
}
|
|
|
|
func (m *ListNodesRequest_Filters) Reset() { *m = ListNodesRequest_Filters{} }
|
|
func (*ListNodesRequest_Filters) ProtoMessage() {}
|
|
func (*ListNodesRequest_Filters) Descriptor() ([]byte, []int) {
|
|
return fileDescriptorControl, []int{2, 0}
|
|
}
|
|
|
|
type ListNodesResponse struct {
|
|
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
|
|
}
|
|
|
|
func (m *ListNodesResponse) Reset() { *m = ListNodesResponse{} }
|
|
func (*ListNodesResponse) ProtoMessage() {}
|
|
func (*ListNodesResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{3} }
|
|
|
|
// UpdateNodeRequest requests an update to the specified node. This may be used
|
|
// to request a new availability for a node, such as PAUSE. Invalid updates
|
|
// will be denied and cause an error.
|
|
type UpdateNodeRequest struct {
|
|
NodeID string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
|
|
NodeVersion *Version `protobuf:"bytes,2,opt,name=node_version,json=nodeVersion" json:"node_version,omitempty"`
|
|
Spec *NodeSpec `protobuf:"bytes,3,opt,name=spec" json:"spec,omitempty"`
|
|
}
|
|
|
|
func (m *UpdateNodeRequest) Reset() { *m = UpdateNodeRequest{} }
|
|
func (*UpdateNodeRequest) ProtoMessage() {}
|
|
func (*UpdateNodeRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{4} }
|
|
|
|
type UpdateNodeResponse struct {
|
|
Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
|
|
}
|
|
|
|
func (m *UpdateNodeResponse) Reset() { *m = UpdateNodeResponse{} }
|
|
func (*UpdateNodeResponse) ProtoMessage() {}
|
|
func (*UpdateNodeResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{5} }
|
|
|
|
// RemoveNodeRequest requests to delete the specified node from store.
|
|
type RemoveNodeRequest struct {
|
|
NodeID string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
|
|
Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"`
|
|
}
|
|
|
|
func (m *RemoveNodeRequest) Reset() { *m = RemoveNodeRequest{} }
|
|
func (*RemoveNodeRequest) ProtoMessage() {}
|
|
func (*RemoveNodeRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{6} }
|
|
|
|
type RemoveNodeResponse struct {
|
|
}
|
|
|
|
func (m *RemoveNodeResponse) Reset() { *m = RemoveNodeResponse{} }
|
|
func (*RemoveNodeResponse) ProtoMessage() {}
|
|
func (*RemoveNodeResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{7} }
|
|
|
|
type GetTaskRequest struct {
|
|
TaskID string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
|
}
|
|
|
|
func (m *GetTaskRequest) Reset() { *m = GetTaskRequest{} }
|
|
func (*GetTaskRequest) ProtoMessage() {}
|
|
func (*GetTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{8} }
|
|
|
|
type GetTaskResponse struct {
|
|
Task *Task `protobuf:"bytes,1,opt,name=task" json:"task,omitempty"`
|
|
}
|
|
|
|
func (m *GetTaskResponse) Reset() { *m = GetTaskResponse{} }
|
|
func (*GetTaskResponse) ProtoMessage() {}
|
|
func (*GetTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{9} }
|
|
|
|
type RemoveTaskRequest struct {
|
|
TaskID string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
|
}
|
|
|
|
func (m *RemoveTaskRequest) Reset() { *m = RemoveTaskRequest{} }
|
|
func (*RemoveTaskRequest) ProtoMessage() {}
|
|
func (*RemoveTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{10} }
|
|
|
|
type RemoveTaskResponse struct {
|
|
}
|
|
|
|
func (m *RemoveTaskResponse) Reset() { *m = RemoveTaskResponse{} }
|
|
func (*RemoveTaskResponse) ProtoMessage() {}
|
|
func (*RemoveTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{11} }
|
|
|
|
type ListTasksRequest struct {
|
|
Filters *ListTasksRequest_Filters `protobuf:"bytes,1,opt,name=filters" json:"filters,omitempty"`
|
|
}
|
|
|
|
func (m *ListTasksRequest) Reset() { *m = ListTasksRequest{} }
|
|
func (*ListTasksRequest) ProtoMessage() {}
|
|
func (*ListTasksRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{12} }
|
|
|
|
type ListTasksRequest_Filters struct {
|
|
Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
|
|
IDPrefixes []string `protobuf:"bytes,2,rep,name=id_prefixes,json=idPrefixes" json:"id_prefixes,omitempty"`
|
|
Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
ServiceIDs []string `protobuf:"bytes,4,rep,name=service_ids,json=serviceIds" json:"service_ids,omitempty"`
|
|
NodeIDs []string `protobuf:"bytes,5,rep,name=node_ids,json=nodeIds" json:"node_ids,omitempty"`
|
|
DesiredStates []TaskState `protobuf:"varint,6,rep,name=desired_states,json=desiredStates,enum=docker.swarmkit.v1.TaskState" json:"desired_states,omitempty"`
|
|
// NamePrefixes matches all objects with the given prefixes
|
|
NamePrefixes []string `protobuf:"bytes,7,rep,name=name_prefixes,json=namePrefixes" json:"name_prefixes,omitempty"`
|
|
}
|
|
|
|
func (m *ListTasksRequest_Filters) Reset() { *m = ListTasksRequest_Filters{} }
|
|
func (*ListTasksRequest_Filters) ProtoMessage() {}
|
|
func (*ListTasksRequest_Filters) Descriptor() ([]byte, []int) {
|
|
return fileDescriptorControl, []int{12, 0}
|
|
}
|
|
|
|
type ListTasksResponse struct {
|
|
Tasks []*Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"`
|
|
}
|
|
|
|
func (m *ListTasksResponse) Reset() { *m = ListTasksResponse{} }
|
|
func (*ListTasksResponse) ProtoMessage() {}
|
|
func (*ListTasksResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{13} }
|
|
|
|
type CreateServiceRequest struct {
|
|
Spec *ServiceSpec `protobuf:"bytes,1,opt,name=spec" json:"spec,omitempty"`
|
|
}
|
|
|
|
func (m *CreateServiceRequest) Reset() { *m = CreateServiceRequest{} }
|
|
func (*CreateServiceRequest) ProtoMessage() {}
|
|
func (*CreateServiceRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{14} }
|
|
|
|
type CreateServiceResponse struct {
|
|
Service *Service `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"`
|
|
}
|
|
|
|
func (m *CreateServiceResponse) Reset() { *m = CreateServiceResponse{} }
|
|
func (*CreateServiceResponse) ProtoMessage() {}
|
|
func (*CreateServiceResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{15} }
|
|
|
|
type GetServiceRequest struct {
|
|
ServiceID string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
|
|
}
|
|
|
|
func (m *GetServiceRequest) Reset() { *m = GetServiceRequest{} }
|
|
func (*GetServiceRequest) ProtoMessage() {}
|
|
func (*GetServiceRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{16} }
|
|
|
|
type GetServiceResponse struct {
|
|
Service *Service `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"`
|
|
}
|
|
|
|
func (m *GetServiceResponse) Reset() { *m = GetServiceResponse{} }
|
|
func (*GetServiceResponse) ProtoMessage() {}
|
|
func (*GetServiceResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{17} }
|
|
|
|
type UpdateServiceRequest struct {
|
|
ServiceID string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
|
|
ServiceVersion *Version `protobuf:"bytes,2,opt,name=service_version,json=serviceVersion" json:"service_version,omitempty"`
|
|
Spec *ServiceSpec `protobuf:"bytes,3,opt,name=spec" json:"spec,omitempty"`
|
|
}
|
|
|
|
func (m *UpdateServiceRequest) Reset() { *m = UpdateServiceRequest{} }
|
|
func (*UpdateServiceRequest) ProtoMessage() {}
|
|
func (*UpdateServiceRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{18} }
|
|
|
|
type UpdateServiceResponse struct {
|
|
Service *Service `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"`
|
|
}
|
|
|
|
func (m *UpdateServiceResponse) Reset() { *m = UpdateServiceResponse{} }
|
|
func (*UpdateServiceResponse) ProtoMessage() {}
|
|
func (*UpdateServiceResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{19} }
|
|
|
|
type RemoveServiceRequest struct {
|
|
ServiceID string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
|
|
}
|
|
|
|
func (m *RemoveServiceRequest) Reset() { *m = RemoveServiceRequest{} }
|
|
func (*RemoveServiceRequest) ProtoMessage() {}
|
|
func (*RemoveServiceRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{20} }
|
|
|
|
type RemoveServiceResponse struct {
|
|
}
|
|
|
|
func (m *RemoveServiceResponse) Reset() { *m = RemoveServiceResponse{} }
|
|
func (*RemoveServiceResponse) ProtoMessage() {}
|
|
func (*RemoveServiceResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{21} }
|
|
|
|
type ListServicesRequest struct {
|
|
Filters *ListServicesRequest_Filters `protobuf:"bytes,1,opt,name=filters" json:"filters,omitempty"`
|
|
}
|
|
|
|
func (m *ListServicesRequest) Reset() { *m = ListServicesRequest{} }
|
|
func (*ListServicesRequest) ProtoMessage() {}
|
|
func (*ListServicesRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{22} }
|
|
|
|
type ListServicesRequest_Filters struct {
|
|
Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
|
|
IDPrefixes []string `protobuf:"bytes,2,rep,name=id_prefixes,json=idPrefixes" json:"id_prefixes,omitempty"`
|
|
Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
// NamePrefixes matches all objects with the given prefixes
|
|
NamePrefixes []string `protobuf:"bytes,4,rep,name=name_prefixes,json=namePrefixes" json:"name_prefixes,omitempty"`
|
|
}
|
|
|
|
func (m *ListServicesRequest_Filters) Reset() { *m = ListServicesRequest_Filters{} }
|
|
func (*ListServicesRequest_Filters) ProtoMessage() {}
|
|
func (*ListServicesRequest_Filters) Descriptor() ([]byte, []int) {
|
|
return fileDescriptorControl, []int{22, 0}
|
|
}
|
|
|
|
type ListServicesResponse struct {
|
|
Services []*Service `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"`
|
|
}
|
|
|
|
func (m *ListServicesResponse) Reset() { *m = ListServicesResponse{} }
|
|
func (*ListServicesResponse) ProtoMessage() {}
|
|
func (*ListServicesResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{23} }
|
|
|
|
type CreateNetworkRequest struct {
|
|
Spec *NetworkSpec `protobuf:"bytes,1,opt,name=spec" json:"spec,omitempty"`
|
|
}
|
|
|
|
func (m *CreateNetworkRequest) Reset() { *m = CreateNetworkRequest{} }
|
|
func (*CreateNetworkRequest) ProtoMessage() {}
|
|
func (*CreateNetworkRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{24} }
|
|
|
|
type CreateNetworkResponse struct {
|
|
Network *Network `protobuf:"bytes,1,opt,name=network" json:"network,omitempty"`
|
|
}
|
|
|
|
func (m *CreateNetworkResponse) Reset() { *m = CreateNetworkResponse{} }
|
|
func (*CreateNetworkResponse) ProtoMessage() {}
|
|
func (*CreateNetworkResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{25} }
|
|
|
|
type GetNetworkRequest struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
NetworkID string `protobuf:"bytes,2,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`
|
|
}
|
|
|
|
func (m *GetNetworkRequest) Reset() { *m = GetNetworkRequest{} }
|
|
func (*GetNetworkRequest) ProtoMessage() {}
|
|
func (*GetNetworkRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{26} }
|
|
|
|
type GetNetworkResponse struct {
|
|
Network *Network `protobuf:"bytes,1,opt,name=network" json:"network,omitempty"`
|
|
}
|
|
|
|
func (m *GetNetworkResponse) Reset() { *m = GetNetworkResponse{} }
|
|
func (*GetNetworkResponse) ProtoMessage() {}
|
|
func (*GetNetworkResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{27} }
|
|
|
|
type RemoveNetworkRequest struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
NetworkID string `protobuf:"bytes,2,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`
|
|
}
|
|
|
|
func (m *RemoveNetworkRequest) Reset() { *m = RemoveNetworkRequest{} }
|
|
func (*RemoveNetworkRequest) ProtoMessage() {}
|
|
func (*RemoveNetworkRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{28} }
|
|
|
|
type RemoveNetworkResponse struct {
|
|
}
|
|
|
|
func (m *RemoveNetworkResponse) Reset() { *m = RemoveNetworkResponse{} }
|
|
func (*RemoveNetworkResponse) ProtoMessage() {}
|
|
func (*RemoveNetworkResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{29} }
|
|
|
|
type ListNetworksRequest struct {
|
|
Filters *ListNetworksRequest_Filters `protobuf:"bytes,1,opt,name=filters" json:"filters,omitempty"`
|
|
}
|
|
|
|
func (m *ListNetworksRequest) Reset() { *m = ListNetworksRequest{} }
|
|
func (*ListNetworksRequest) ProtoMessage() {}
|
|
func (*ListNetworksRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{30} }
|
|
|
|
type ListNetworksRequest_Filters struct {
|
|
Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
|
|
IDPrefixes []string `protobuf:"bytes,2,rep,name=id_prefixes,json=idPrefixes" json:"id_prefixes,omitempty"`
|
|
Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
// NamePrefixes matches all objects with the given prefixes
|
|
NamePrefixes []string `protobuf:"bytes,4,rep,name=name_prefixes,json=namePrefixes" json:"name_prefixes,omitempty"`
|
|
}
|
|
|
|
func (m *ListNetworksRequest_Filters) Reset() { *m = ListNetworksRequest_Filters{} }
|
|
func (*ListNetworksRequest_Filters) ProtoMessage() {}
|
|
func (*ListNetworksRequest_Filters) Descriptor() ([]byte, []int) {
|
|
return fileDescriptorControl, []int{30, 0}
|
|
}
|
|
|
|
type ListNetworksResponse struct {
|
|
Networks []*Network `protobuf:"bytes,1,rep,name=networks" json:"networks,omitempty"`
|
|
}
|
|
|
|
func (m *ListNetworksResponse) Reset() { *m = ListNetworksResponse{} }
|
|
func (*ListNetworksResponse) ProtoMessage() {}
|
|
func (*ListNetworksResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{31} }
|
|
|
|
type GetClusterRequest struct {
|
|
ClusterID string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
|
|
}
|
|
|
|
func (m *GetClusterRequest) Reset() { *m = GetClusterRequest{} }
|
|
func (*GetClusterRequest) ProtoMessage() {}
|
|
func (*GetClusterRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{32} }
|
|
|
|
type GetClusterResponse struct {
|
|
Cluster *Cluster `protobuf:"bytes,1,opt,name=cluster" json:"cluster,omitempty"`
|
|
}
|
|
|
|
func (m *GetClusterResponse) Reset() { *m = GetClusterResponse{} }
|
|
func (*GetClusterResponse) ProtoMessage() {}
|
|
func (*GetClusterResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{33} }
|
|
|
|
type ListClustersRequest struct {
|
|
Filters *ListClustersRequest_Filters `protobuf:"bytes,1,opt,name=filters" json:"filters,omitempty"`
|
|
}
|
|
|
|
func (m *ListClustersRequest) Reset() { *m = ListClustersRequest{} }
|
|
func (*ListClustersRequest) ProtoMessage() {}
|
|
func (*ListClustersRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{34} }
|
|
|
|
type ListClustersRequest_Filters struct {
|
|
Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
|
|
IDPrefixes []string `protobuf:"bytes,2,rep,name=id_prefixes,json=idPrefixes" json:"id_prefixes,omitempty"`
|
|
Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
// NamePrefixes matches all objects with the given prefixes
|
|
NamePrefixes []string `protobuf:"bytes,4,rep,name=name_prefixes,json=namePrefixes" json:"name_prefixes,omitempty"`
|
|
}
|
|
|
|
func (m *ListClustersRequest_Filters) Reset() { *m = ListClustersRequest_Filters{} }
|
|
func (*ListClustersRequest_Filters) ProtoMessage() {}
|
|
func (*ListClustersRequest_Filters) Descriptor() ([]byte, []int) {
|
|
return fileDescriptorControl, []int{34, 0}
|
|
}
|
|
|
|
type ListClustersResponse struct {
|
|
Clusters []*Cluster `protobuf:"bytes,1,rep,name=clusters" json:"clusters,omitempty"`
|
|
}
|
|
|
|
func (m *ListClustersResponse) Reset() { *m = ListClustersResponse{} }
|
|
func (*ListClustersResponse) ProtoMessage() {}
|
|
func (*ListClustersResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{35} }
|
|
|
|
// KeyRotation tells UpdateCluster what items to rotate
|
|
type KeyRotation struct {
|
|
// WorkerJoinToken tells UpdateCluster to rotate the worker secret token.
|
|
WorkerJoinToken bool `protobuf:"varint,1,opt,name=worker_join_token,json=workerJoinToken,proto3" json:"worker_join_token,omitempty"`
|
|
// ManagerJoinToken tells UpdateCluster to rotate the manager secret token.
|
|
ManagerJoinToken bool `protobuf:"varint,2,opt,name=manager_join_token,json=managerJoinToken,proto3" json:"manager_join_token,omitempty"`
|
|
// ManagerUnlockKey tells UpdateCluster to rotate the manager unlock key
|
|
ManagerUnlockKey bool `protobuf:"varint,3,opt,name=manager_unlock_key,json=managerUnlockKey,proto3" json:"manager_unlock_key,omitempty"`
|
|
}
|
|
|
|
func (m *KeyRotation) Reset() { *m = KeyRotation{} }
|
|
func (*KeyRotation) ProtoMessage() {}
|
|
func (*KeyRotation) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{36} }
|
|
|
|
type UpdateClusterRequest struct {
|
|
// ClusterID is the cluster ID to update.
|
|
ClusterID string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
|
|
// ClusterVersion is the version of the cluster being updated.
|
|
ClusterVersion *Version `protobuf:"bytes,2,opt,name=cluster_version,json=clusterVersion" json:"cluster_version,omitempty"`
|
|
// Spec is the new spec to apply to the cluster.
|
|
Spec *ClusterSpec `protobuf:"bytes,3,opt,name=spec" json:"spec,omitempty"`
|
|
// Rotation contains flags for join token and unlock key rotation
|
|
Rotation KeyRotation `protobuf:"bytes,4,opt,name=rotation" json:"rotation"`
|
|
}
|
|
|
|
func (m *UpdateClusterRequest) Reset() { *m = UpdateClusterRequest{} }
|
|
func (*UpdateClusterRequest) ProtoMessage() {}
|
|
func (*UpdateClusterRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{37} }
|
|
|
|
type UpdateClusterResponse struct {
|
|
Cluster *Cluster `protobuf:"bytes,1,opt,name=cluster" json:"cluster,omitempty"`
|
|
}
|
|
|
|
func (m *UpdateClusterResponse) Reset() { *m = UpdateClusterResponse{} }
|
|
func (*UpdateClusterResponse) ProtoMessage() {}
|
|
func (*UpdateClusterResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{38} }
|
|
|
|
// GetSecretRequest is the request to get a `Secret` object given a secret id.
|
|
type GetSecretRequest struct {
|
|
SecretID string `protobuf:"bytes,1,opt,name=secret_id,json=secretId,proto3" json:"secret_id,omitempty"`
|
|
}
|
|
|
|
func (m *GetSecretRequest) Reset() { *m = GetSecretRequest{} }
|
|
func (*GetSecretRequest) ProtoMessage() {}
|
|
func (*GetSecretRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{39} }
|
|
|
|
// GetSecretResponse contains the Secret corresponding to the id in
|
|
// `GetSecretRequest`, but the `Secret.Spec.Data` field in each `Secret`
|
|
// object should be nil instead of actually containing the secret bytes.
|
|
type GetSecretResponse struct {
|
|
Secret *Secret `protobuf:"bytes,1,opt,name=secret" json:"secret,omitempty"`
|
|
}
|
|
|
|
func (m *GetSecretResponse) Reset() { *m = GetSecretResponse{} }
|
|
func (*GetSecretResponse) ProtoMessage() {}
|
|
func (*GetSecretResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{40} }
|
|
|
|
type UpdateSecretRequest struct {
|
|
// SecretID is the secret ID to update.
|
|
SecretID string `protobuf:"bytes,1,opt,name=secret_id,json=secretId,proto3" json:"secret_id,omitempty"`
|
|
// SecretVersion is the version of the secret being updated.
|
|
SecretVersion *Version `protobuf:"bytes,2,opt,name=secret_version,json=secretVersion" json:"secret_version,omitempty"`
|
|
// Spec is the new spec to apply to the Secret
|
|
// Only some fields are allowed to be updated.
|
|
Spec *SecretSpec `protobuf:"bytes,3,opt,name=spec" json:"spec,omitempty"`
|
|
}
|
|
|
|
func (m *UpdateSecretRequest) Reset() { *m = UpdateSecretRequest{} }
|
|
func (*UpdateSecretRequest) ProtoMessage() {}
|
|
func (*UpdateSecretRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{41} }
|
|
|
|
type UpdateSecretResponse struct {
|
|
Secret *Secret `protobuf:"bytes,1,opt,name=secret" json:"secret,omitempty"`
|
|
}
|
|
|
|
func (m *UpdateSecretResponse) Reset() { *m = UpdateSecretResponse{} }
|
|
func (*UpdateSecretResponse) ProtoMessage() {}
|
|
func (*UpdateSecretResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{42} }
|
|
|
|
// ListSecretRequest is the request to list all non-internal secrets in the secret store,
|
|
// or all secrets filtered by (name or name prefix or id prefix) and labels.
|
|
type ListSecretsRequest struct {
|
|
Filters *ListSecretsRequest_Filters `protobuf:"bytes,1,opt,name=filters" json:"filters,omitempty"`
|
|
}
|
|
|
|
func (m *ListSecretsRequest) Reset() { *m = ListSecretsRequest{} }
|
|
func (*ListSecretsRequest) ProtoMessage() {}
|
|
func (*ListSecretsRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{43} }
|
|
|
|
type ListSecretsRequest_Filters struct {
|
|
Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
|
|
IDPrefixes []string `protobuf:"bytes,2,rep,name=id_prefixes,json=idPrefixes" json:"id_prefixes,omitempty"`
|
|
Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
NamePrefixes []string `protobuf:"bytes,4,rep,name=name_prefixes,json=namePrefixes" json:"name_prefixes,omitempty"`
|
|
}
|
|
|
|
func (m *ListSecretsRequest_Filters) Reset() { *m = ListSecretsRequest_Filters{} }
|
|
func (*ListSecretsRequest_Filters) ProtoMessage() {}
|
|
func (*ListSecretsRequest_Filters) Descriptor() ([]byte, []int) {
|
|
return fileDescriptorControl, []int{43, 0}
|
|
}
|
|
|
|
// ListSecretResponse contains a list of all the secrets that match the name or
|
|
// name prefix filters provided in `ListSecretRequest`. The `Secret.Spec.Data`
|
|
// field in each `Secret` object should be nil instead of actually containing
|
|
// the secret bytes.
|
|
type ListSecretsResponse struct {
|
|
Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets" json:"secrets,omitempty"`
|
|
}
|
|
|
|
func (m *ListSecretsResponse) Reset() { *m = ListSecretsResponse{} }
|
|
func (*ListSecretsResponse) ProtoMessage() {}
|
|
func (*ListSecretsResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{44} }
|
|
|
|
// CreateSecretRequest specifies a new secret (it will not update an existing
|
|
// secret) to create.
|
|
type CreateSecretRequest struct {
|
|
Spec *SecretSpec `protobuf:"bytes,1,opt,name=spec" json:"spec,omitempty"`
|
|
}
|
|
|
|
func (m *CreateSecretRequest) Reset() { *m = CreateSecretRequest{} }
|
|
func (*CreateSecretRequest) ProtoMessage() {}
|
|
func (*CreateSecretRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{45} }
|
|
|
|
// CreateSecretResponse contains the newly created `Secret`` corresponding to the
|
|
// name in `CreateSecretRequest`. The `Secret.Spec.Data` field should be nil instead
|
|
// of actually containing the secret bytes.
|
|
type CreateSecretResponse struct {
|
|
Secret *Secret `protobuf:"bytes,1,opt,name=secret" json:"secret,omitempty"`
|
|
}
|
|
|
|
func (m *CreateSecretResponse) Reset() { *m = CreateSecretResponse{} }
|
|
func (*CreateSecretResponse) ProtoMessage() {}
|
|
func (*CreateSecretResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{46} }
|
|
|
|
// RemoveSecretRequest contains the ID of the secret that should be removed. This
|
|
// removes all versions of the secret.
|
|
type RemoveSecretRequest struct {
|
|
SecretID string `protobuf:"bytes,1,opt,name=secret_id,json=secretId,proto3" json:"secret_id,omitempty"`
|
|
}
|
|
|
|
func (m *RemoveSecretRequest) Reset() { *m = RemoveSecretRequest{} }
|
|
func (*RemoveSecretRequest) ProtoMessage() {}
|
|
func (*RemoveSecretRequest) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{47} }
|
|
|
|
// RemoveSecretResponse is an empty object indicating the successful removal of
|
|
// a secret.
|
|
type RemoveSecretResponse struct {
|
|
}
|
|
|
|
func (m *RemoveSecretResponse) Reset() { *m = RemoveSecretResponse{} }
|
|
func (*RemoveSecretResponse) ProtoMessage() {}
|
|
func (*RemoveSecretResponse) Descriptor() ([]byte, []int) { return fileDescriptorControl, []int{48} }
|
|
|
|
func init() {
|
|
proto.RegisterType((*GetNodeRequest)(nil), "docker.swarmkit.v1.GetNodeRequest")
|
|
proto.RegisterType((*GetNodeResponse)(nil), "docker.swarmkit.v1.GetNodeResponse")
|
|
proto.RegisterType((*ListNodesRequest)(nil), "docker.swarmkit.v1.ListNodesRequest")
|
|
proto.RegisterType((*ListNodesRequest_Filters)(nil), "docker.swarmkit.v1.ListNodesRequest.Filters")
|
|
proto.RegisterType((*ListNodesResponse)(nil), "docker.swarmkit.v1.ListNodesResponse")
|
|
proto.RegisterType((*UpdateNodeRequest)(nil), "docker.swarmkit.v1.UpdateNodeRequest")
|
|
proto.RegisterType((*UpdateNodeResponse)(nil), "docker.swarmkit.v1.UpdateNodeResponse")
|
|
proto.RegisterType((*RemoveNodeRequest)(nil), "docker.swarmkit.v1.RemoveNodeRequest")
|
|
proto.RegisterType((*RemoveNodeResponse)(nil), "docker.swarmkit.v1.RemoveNodeResponse")
|
|
proto.RegisterType((*GetTaskRequest)(nil), "docker.swarmkit.v1.GetTaskRequest")
|
|
proto.RegisterType((*GetTaskResponse)(nil), "docker.swarmkit.v1.GetTaskResponse")
|
|
proto.RegisterType((*RemoveTaskRequest)(nil), "docker.swarmkit.v1.RemoveTaskRequest")
|
|
proto.RegisterType((*RemoveTaskResponse)(nil), "docker.swarmkit.v1.RemoveTaskResponse")
|
|
proto.RegisterType((*ListTasksRequest)(nil), "docker.swarmkit.v1.ListTasksRequest")
|
|
proto.RegisterType((*ListTasksRequest_Filters)(nil), "docker.swarmkit.v1.ListTasksRequest.Filters")
|
|
proto.RegisterType((*ListTasksResponse)(nil), "docker.swarmkit.v1.ListTasksResponse")
|
|
proto.RegisterType((*CreateServiceRequest)(nil), "docker.swarmkit.v1.CreateServiceRequest")
|
|
proto.RegisterType((*CreateServiceResponse)(nil), "docker.swarmkit.v1.CreateServiceResponse")
|
|
proto.RegisterType((*GetServiceRequest)(nil), "docker.swarmkit.v1.GetServiceRequest")
|
|
proto.RegisterType((*GetServiceResponse)(nil), "docker.swarmkit.v1.GetServiceResponse")
|
|
proto.RegisterType((*UpdateServiceRequest)(nil), "docker.swarmkit.v1.UpdateServiceRequest")
|
|
proto.RegisterType((*UpdateServiceResponse)(nil), "docker.swarmkit.v1.UpdateServiceResponse")
|
|
proto.RegisterType((*RemoveServiceRequest)(nil), "docker.swarmkit.v1.RemoveServiceRequest")
|
|
proto.RegisterType((*RemoveServiceResponse)(nil), "docker.swarmkit.v1.RemoveServiceResponse")
|
|
proto.RegisterType((*ListServicesRequest)(nil), "docker.swarmkit.v1.ListServicesRequest")
|
|
proto.RegisterType((*ListServicesRequest_Filters)(nil), "docker.swarmkit.v1.ListServicesRequest.Filters")
|
|
proto.RegisterType((*ListServicesResponse)(nil), "docker.swarmkit.v1.ListServicesResponse")
|
|
proto.RegisterType((*CreateNetworkRequest)(nil), "docker.swarmkit.v1.CreateNetworkRequest")
|
|
proto.RegisterType((*CreateNetworkResponse)(nil), "docker.swarmkit.v1.CreateNetworkResponse")
|
|
proto.RegisterType((*GetNetworkRequest)(nil), "docker.swarmkit.v1.GetNetworkRequest")
|
|
proto.RegisterType((*GetNetworkResponse)(nil), "docker.swarmkit.v1.GetNetworkResponse")
|
|
proto.RegisterType((*RemoveNetworkRequest)(nil), "docker.swarmkit.v1.RemoveNetworkRequest")
|
|
proto.RegisterType((*RemoveNetworkResponse)(nil), "docker.swarmkit.v1.RemoveNetworkResponse")
|
|
proto.RegisterType((*ListNetworksRequest)(nil), "docker.swarmkit.v1.ListNetworksRequest")
|
|
proto.RegisterType((*ListNetworksRequest_Filters)(nil), "docker.swarmkit.v1.ListNetworksRequest.Filters")
|
|
proto.RegisterType((*ListNetworksResponse)(nil), "docker.swarmkit.v1.ListNetworksResponse")
|
|
proto.RegisterType((*GetClusterRequest)(nil), "docker.swarmkit.v1.GetClusterRequest")
|
|
proto.RegisterType((*GetClusterResponse)(nil), "docker.swarmkit.v1.GetClusterResponse")
|
|
proto.RegisterType((*ListClustersRequest)(nil), "docker.swarmkit.v1.ListClustersRequest")
|
|
proto.RegisterType((*ListClustersRequest_Filters)(nil), "docker.swarmkit.v1.ListClustersRequest.Filters")
|
|
proto.RegisterType((*ListClustersResponse)(nil), "docker.swarmkit.v1.ListClustersResponse")
|
|
proto.RegisterType((*KeyRotation)(nil), "docker.swarmkit.v1.KeyRotation")
|
|
proto.RegisterType((*UpdateClusterRequest)(nil), "docker.swarmkit.v1.UpdateClusterRequest")
|
|
proto.RegisterType((*UpdateClusterResponse)(nil), "docker.swarmkit.v1.UpdateClusterResponse")
|
|
proto.RegisterType((*GetSecretRequest)(nil), "docker.swarmkit.v1.GetSecretRequest")
|
|
proto.RegisterType((*GetSecretResponse)(nil), "docker.swarmkit.v1.GetSecretResponse")
|
|
proto.RegisterType((*UpdateSecretRequest)(nil), "docker.swarmkit.v1.UpdateSecretRequest")
|
|
proto.RegisterType((*UpdateSecretResponse)(nil), "docker.swarmkit.v1.UpdateSecretResponse")
|
|
proto.RegisterType((*ListSecretsRequest)(nil), "docker.swarmkit.v1.ListSecretsRequest")
|
|
proto.RegisterType((*ListSecretsRequest_Filters)(nil), "docker.swarmkit.v1.ListSecretsRequest.Filters")
|
|
proto.RegisterType((*ListSecretsResponse)(nil), "docker.swarmkit.v1.ListSecretsResponse")
|
|
proto.RegisterType((*CreateSecretRequest)(nil), "docker.swarmkit.v1.CreateSecretRequest")
|
|
proto.RegisterType((*CreateSecretResponse)(nil), "docker.swarmkit.v1.CreateSecretResponse")
|
|
proto.RegisterType((*RemoveSecretRequest)(nil), "docker.swarmkit.v1.RemoveSecretRequest")
|
|
proto.RegisterType((*RemoveSecretResponse)(nil), "docker.swarmkit.v1.RemoveSecretResponse")
|
|
}
|
|
|
|
type authenticatedWrapperControlServer struct {
|
|
local ControlServer
|
|
authorize func(context.Context, []string) error
|
|
}
|
|
|
|
func NewAuthenticatedWrapperControlServer(local ControlServer, authorize func(context.Context, []string) error) ControlServer {
|
|
return &authenticatedWrapperControlServer{
|
|
local: local,
|
|
authorize: authorize,
|
|
}
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) GetNode(ctx context.Context, r *GetNodeRequest) (*GetNodeResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.GetNode(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) ListNodes(ctx context.Context, r *ListNodesRequest) (*ListNodesResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.ListNodes(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) UpdateNode(ctx context.Context, r *UpdateNodeRequest) (*UpdateNodeResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.UpdateNode(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) RemoveNode(ctx context.Context, r *RemoveNodeRequest) (*RemoveNodeResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.RemoveNode(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) GetTask(ctx context.Context, r *GetTaskRequest) (*GetTaskResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.GetTask(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) ListTasks(ctx context.Context, r *ListTasksRequest) (*ListTasksResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.ListTasks(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) RemoveTask(ctx context.Context, r *RemoveTaskRequest) (*RemoveTaskResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.RemoveTask(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) GetService(ctx context.Context, r *GetServiceRequest) (*GetServiceResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.GetService(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) ListServices(ctx context.Context, r *ListServicesRequest) (*ListServicesResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.ListServices(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) CreateService(ctx context.Context, r *CreateServiceRequest) (*CreateServiceResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.CreateService(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) UpdateService(ctx context.Context, r *UpdateServiceRequest) (*UpdateServiceResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.UpdateService(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) RemoveService(ctx context.Context, r *RemoveServiceRequest) (*RemoveServiceResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.RemoveService(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) GetNetwork(ctx context.Context, r *GetNetworkRequest) (*GetNetworkResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.GetNetwork(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) ListNetworks(ctx context.Context, r *ListNetworksRequest) (*ListNetworksResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.ListNetworks(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) CreateNetwork(ctx context.Context, r *CreateNetworkRequest) (*CreateNetworkResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.CreateNetwork(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) RemoveNetwork(ctx context.Context, r *RemoveNetworkRequest) (*RemoveNetworkResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.RemoveNetwork(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) GetCluster(ctx context.Context, r *GetClusterRequest) (*GetClusterResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.GetCluster(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) ListClusters(ctx context.Context, r *ListClustersRequest) (*ListClustersResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.ListClusters(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) UpdateCluster(ctx context.Context, r *UpdateClusterRequest) (*UpdateClusterResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.UpdateCluster(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) GetSecret(ctx context.Context, r *GetSecretRequest) (*GetSecretResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.GetSecret(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) UpdateSecret(ctx context.Context, r *UpdateSecretRequest) (*UpdateSecretResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.UpdateSecret(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) ListSecrets(ctx context.Context, r *ListSecretsRequest) (*ListSecretsResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.ListSecrets(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) CreateSecret(ctx context.Context, r *CreateSecretRequest) (*CreateSecretResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.CreateSecret(ctx, r)
|
|
}
|
|
|
|
func (p *authenticatedWrapperControlServer) RemoveSecret(ctx context.Context, r *RemoveSecretRequest) (*RemoveSecretResponse, error) {
|
|
|
|
if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.local.RemoveSecret(ctx, r)
|
|
}
|
|
|
|
func (m *GetNodeRequest) Copy() *GetNodeRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetNodeRequest{
|
|
NodeID: m.NodeID,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetNodeResponse) Copy() *GetNodeResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetNodeResponse{
|
|
Node: m.Node.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListNodesRequest) Copy() *ListNodesRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListNodesRequest{
|
|
Filters: m.Filters.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListNodesRequest_Filters) Copy() *ListNodesRequest_Filters {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListNodesRequest_Filters{}
|
|
|
|
if m.Names != nil {
|
|
o.Names = make([]string, 0, len(m.Names))
|
|
o.Names = append(o.Names, m.Names...)
|
|
}
|
|
|
|
if m.IDPrefixes != nil {
|
|
o.IDPrefixes = make([]string, 0, len(m.IDPrefixes))
|
|
o.IDPrefixes = append(o.IDPrefixes, m.IDPrefixes...)
|
|
}
|
|
|
|
if m.Labels != nil {
|
|
o.Labels = make(map[string]string)
|
|
for k, v := range m.Labels {
|
|
o.Labels[k] = v
|
|
}
|
|
}
|
|
|
|
if m.Memberships != nil {
|
|
o.Memberships = make([]NodeSpec_Membership, 0, len(m.Memberships))
|
|
o.Memberships = append(o.Memberships, m.Memberships...)
|
|
}
|
|
|
|
if m.Roles != nil {
|
|
o.Roles = make([]NodeRole, 0, len(m.Roles))
|
|
o.Roles = append(o.Roles, m.Roles...)
|
|
}
|
|
|
|
if m.NamePrefixes != nil {
|
|
o.NamePrefixes = make([]string, 0, len(m.NamePrefixes))
|
|
o.NamePrefixes = append(o.NamePrefixes, m.NamePrefixes...)
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListNodesResponse) Copy() *ListNodesResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListNodesResponse{}
|
|
|
|
if m.Nodes != nil {
|
|
o.Nodes = make([]*Node, 0, len(m.Nodes))
|
|
for _, v := range m.Nodes {
|
|
o.Nodes = append(o.Nodes, v.Copy())
|
|
}
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *UpdateNodeRequest) Copy() *UpdateNodeRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &UpdateNodeRequest{
|
|
NodeID: m.NodeID,
|
|
NodeVersion: m.NodeVersion.Copy(),
|
|
Spec: m.Spec.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *UpdateNodeResponse) Copy() *UpdateNodeResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &UpdateNodeResponse{
|
|
Node: m.Node.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *RemoveNodeRequest) Copy() *RemoveNodeRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &RemoveNodeRequest{
|
|
NodeID: m.NodeID,
|
|
Force: m.Force,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *RemoveNodeResponse) Copy() *RemoveNodeResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &RemoveNodeResponse{}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetTaskRequest) Copy() *GetTaskRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetTaskRequest{
|
|
TaskID: m.TaskID,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetTaskResponse) Copy() *GetTaskResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetTaskResponse{
|
|
Task: m.Task.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *RemoveTaskRequest) Copy() *RemoveTaskRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &RemoveTaskRequest{
|
|
TaskID: m.TaskID,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *RemoveTaskResponse) Copy() *RemoveTaskResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &RemoveTaskResponse{}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListTasksRequest) Copy() *ListTasksRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListTasksRequest{
|
|
Filters: m.Filters.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListTasksRequest_Filters) Copy() *ListTasksRequest_Filters {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListTasksRequest_Filters{}
|
|
|
|
if m.Names != nil {
|
|
o.Names = make([]string, 0, len(m.Names))
|
|
o.Names = append(o.Names, m.Names...)
|
|
}
|
|
|
|
if m.IDPrefixes != nil {
|
|
o.IDPrefixes = make([]string, 0, len(m.IDPrefixes))
|
|
o.IDPrefixes = append(o.IDPrefixes, m.IDPrefixes...)
|
|
}
|
|
|
|
if m.Labels != nil {
|
|
o.Labels = make(map[string]string)
|
|
for k, v := range m.Labels {
|
|
o.Labels[k] = v
|
|
}
|
|
}
|
|
|
|
if m.ServiceIDs != nil {
|
|
o.ServiceIDs = make([]string, 0, len(m.ServiceIDs))
|
|
o.ServiceIDs = append(o.ServiceIDs, m.ServiceIDs...)
|
|
}
|
|
|
|
if m.NodeIDs != nil {
|
|
o.NodeIDs = make([]string, 0, len(m.NodeIDs))
|
|
o.NodeIDs = append(o.NodeIDs, m.NodeIDs...)
|
|
}
|
|
|
|
if m.DesiredStates != nil {
|
|
o.DesiredStates = make([]TaskState, 0, len(m.DesiredStates))
|
|
o.DesiredStates = append(o.DesiredStates, m.DesiredStates...)
|
|
}
|
|
|
|
if m.NamePrefixes != nil {
|
|
o.NamePrefixes = make([]string, 0, len(m.NamePrefixes))
|
|
o.NamePrefixes = append(o.NamePrefixes, m.NamePrefixes...)
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListTasksResponse) Copy() *ListTasksResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListTasksResponse{}
|
|
|
|
if m.Tasks != nil {
|
|
o.Tasks = make([]*Task, 0, len(m.Tasks))
|
|
for _, v := range m.Tasks {
|
|
o.Tasks = append(o.Tasks, v.Copy())
|
|
}
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *CreateServiceRequest) Copy() *CreateServiceRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &CreateServiceRequest{
|
|
Spec: m.Spec.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *CreateServiceResponse) Copy() *CreateServiceResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &CreateServiceResponse{
|
|
Service: m.Service.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetServiceRequest) Copy() *GetServiceRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetServiceRequest{
|
|
ServiceID: m.ServiceID,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetServiceResponse) Copy() *GetServiceResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetServiceResponse{
|
|
Service: m.Service.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *UpdateServiceRequest) Copy() *UpdateServiceRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &UpdateServiceRequest{
|
|
ServiceID: m.ServiceID,
|
|
ServiceVersion: m.ServiceVersion.Copy(),
|
|
Spec: m.Spec.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *UpdateServiceResponse) Copy() *UpdateServiceResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &UpdateServiceResponse{
|
|
Service: m.Service.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *RemoveServiceRequest) Copy() *RemoveServiceRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &RemoveServiceRequest{
|
|
ServiceID: m.ServiceID,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *RemoveServiceResponse) Copy() *RemoveServiceResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &RemoveServiceResponse{}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListServicesRequest) Copy() *ListServicesRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListServicesRequest{
|
|
Filters: m.Filters.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListServicesRequest_Filters) Copy() *ListServicesRequest_Filters {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListServicesRequest_Filters{}
|
|
|
|
if m.Names != nil {
|
|
o.Names = make([]string, 0, len(m.Names))
|
|
o.Names = append(o.Names, m.Names...)
|
|
}
|
|
|
|
if m.IDPrefixes != nil {
|
|
o.IDPrefixes = make([]string, 0, len(m.IDPrefixes))
|
|
o.IDPrefixes = append(o.IDPrefixes, m.IDPrefixes...)
|
|
}
|
|
|
|
if m.Labels != nil {
|
|
o.Labels = make(map[string]string)
|
|
for k, v := range m.Labels {
|
|
o.Labels[k] = v
|
|
}
|
|
}
|
|
|
|
if m.NamePrefixes != nil {
|
|
o.NamePrefixes = make([]string, 0, len(m.NamePrefixes))
|
|
o.NamePrefixes = append(o.NamePrefixes, m.NamePrefixes...)
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListServicesResponse) Copy() *ListServicesResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListServicesResponse{}
|
|
|
|
if m.Services != nil {
|
|
o.Services = make([]*Service, 0, len(m.Services))
|
|
for _, v := range m.Services {
|
|
o.Services = append(o.Services, v.Copy())
|
|
}
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *CreateNetworkRequest) Copy() *CreateNetworkRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &CreateNetworkRequest{
|
|
Spec: m.Spec.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *CreateNetworkResponse) Copy() *CreateNetworkResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &CreateNetworkResponse{
|
|
Network: m.Network.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetNetworkRequest) Copy() *GetNetworkRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetNetworkRequest{
|
|
Name: m.Name,
|
|
NetworkID: m.NetworkID,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetNetworkResponse) Copy() *GetNetworkResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetNetworkResponse{
|
|
Network: m.Network.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *RemoveNetworkRequest) Copy() *RemoveNetworkRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &RemoveNetworkRequest{
|
|
Name: m.Name,
|
|
NetworkID: m.NetworkID,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *RemoveNetworkResponse) Copy() *RemoveNetworkResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &RemoveNetworkResponse{}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListNetworksRequest) Copy() *ListNetworksRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListNetworksRequest{
|
|
Filters: m.Filters.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListNetworksRequest_Filters) Copy() *ListNetworksRequest_Filters {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListNetworksRequest_Filters{}
|
|
|
|
if m.Names != nil {
|
|
o.Names = make([]string, 0, len(m.Names))
|
|
o.Names = append(o.Names, m.Names...)
|
|
}
|
|
|
|
if m.IDPrefixes != nil {
|
|
o.IDPrefixes = make([]string, 0, len(m.IDPrefixes))
|
|
o.IDPrefixes = append(o.IDPrefixes, m.IDPrefixes...)
|
|
}
|
|
|
|
if m.Labels != nil {
|
|
o.Labels = make(map[string]string)
|
|
for k, v := range m.Labels {
|
|
o.Labels[k] = v
|
|
}
|
|
}
|
|
|
|
if m.NamePrefixes != nil {
|
|
o.NamePrefixes = make([]string, 0, len(m.NamePrefixes))
|
|
o.NamePrefixes = append(o.NamePrefixes, m.NamePrefixes...)
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListNetworksResponse) Copy() *ListNetworksResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListNetworksResponse{}
|
|
|
|
if m.Networks != nil {
|
|
o.Networks = make([]*Network, 0, len(m.Networks))
|
|
for _, v := range m.Networks {
|
|
o.Networks = append(o.Networks, v.Copy())
|
|
}
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetClusterRequest) Copy() *GetClusterRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetClusterRequest{
|
|
ClusterID: m.ClusterID,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetClusterResponse) Copy() *GetClusterResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetClusterResponse{
|
|
Cluster: m.Cluster.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListClustersRequest) Copy() *ListClustersRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListClustersRequest{
|
|
Filters: m.Filters.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListClustersRequest_Filters) Copy() *ListClustersRequest_Filters {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListClustersRequest_Filters{}
|
|
|
|
if m.Names != nil {
|
|
o.Names = make([]string, 0, len(m.Names))
|
|
o.Names = append(o.Names, m.Names...)
|
|
}
|
|
|
|
if m.IDPrefixes != nil {
|
|
o.IDPrefixes = make([]string, 0, len(m.IDPrefixes))
|
|
o.IDPrefixes = append(o.IDPrefixes, m.IDPrefixes...)
|
|
}
|
|
|
|
if m.Labels != nil {
|
|
o.Labels = make(map[string]string)
|
|
for k, v := range m.Labels {
|
|
o.Labels[k] = v
|
|
}
|
|
}
|
|
|
|
if m.NamePrefixes != nil {
|
|
o.NamePrefixes = make([]string, 0, len(m.NamePrefixes))
|
|
o.NamePrefixes = append(o.NamePrefixes, m.NamePrefixes...)
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListClustersResponse) Copy() *ListClustersResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListClustersResponse{}
|
|
|
|
if m.Clusters != nil {
|
|
o.Clusters = make([]*Cluster, 0, len(m.Clusters))
|
|
for _, v := range m.Clusters {
|
|
o.Clusters = append(o.Clusters, v.Copy())
|
|
}
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *KeyRotation) Copy() *KeyRotation {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &KeyRotation{
|
|
WorkerJoinToken: m.WorkerJoinToken,
|
|
ManagerJoinToken: m.ManagerJoinToken,
|
|
ManagerUnlockKey: m.ManagerUnlockKey,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *UpdateClusterRequest) Copy() *UpdateClusterRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &UpdateClusterRequest{
|
|
ClusterID: m.ClusterID,
|
|
ClusterVersion: m.ClusterVersion.Copy(),
|
|
Spec: m.Spec.Copy(),
|
|
Rotation: *m.Rotation.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *UpdateClusterResponse) Copy() *UpdateClusterResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &UpdateClusterResponse{
|
|
Cluster: m.Cluster.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetSecretRequest) Copy() *GetSecretRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetSecretRequest{
|
|
SecretID: m.SecretID,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *GetSecretResponse) Copy() *GetSecretResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &GetSecretResponse{
|
|
Secret: m.Secret.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *UpdateSecretRequest) Copy() *UpdateSecretRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &UpdateSecretRequest{
|
|
SecretID: m.SecretID,
|
|
SecretVersion: m.SecretVersion.Copy(),
|
|
Spec: m.Spec.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *UpdateSecretResponse) Copy() *UpdateSecretResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &UpdateSecretResponse{
|
|
Secret: m.Secret.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListSecretsRequest) Copy() *ListSecretsRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListSecretsRequest{
|
|
Filters: m.Filters.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListSecretsRequest_Filters) Copy() *ListSecretsRequest_Filters {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListSecretsRequest_Filters{}
|
|
|
|
if m.Names != nil {
|
|
o.Names = make([]string, 0, len(m.Names))
|
|
o.Names = append(o.Names, m.Names...)
|
|
}
|
|
|
|
if m.IDPrefixes != nil {
|
|
o.IDPrefixes = make([]string, 0, len(m.IDPrefixes))
|
|
o.IDPrefixes = append(o.IDPrefixes, m.IDPrefixes...)
|
|
}
|
|
|
|
if m.Labels != nil {
|
|
o.Labels = make(map[string]string)
|
|
for k, v := range m.Labels {
|
|
o.Labels[k] = v
|
|
}
|
|
}
|
|
|
|
if m.NamePrefixes != nil {
|
|
o.NamePrefixes = make([]string, 0, len(m.NamePrefixes))
|
|
o.NamePrefixes = append(o.NamePrefixes, m.NamePrefixes...)
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *ListSecretsResponse) Copy() *ListSecretsResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &ListSecretsResponse{}
|
|
|
|
if m.Secrets != nil {
|
|
o.Secrets = make([]*Secret, 0, len(m.Secrets))
|
|
for _, v := range m.Secrets {
|
|
o.Secrets = append(o.Secrets, v.Copy())
|
|
}
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *CreateSecretRequest) Copy() *CreateSecretRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &CreateSecretRequest{
|
|
Spec: m.Spec.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *CreateSecretResponse) Copy() *CreateSecretResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &CreateSecretResponse{
|
|
Secret: m.Secret.Copy(),
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *RemoveSecretRequest) Copy() *RemoveSecretRequest {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &RemoveSecretRequest{
|
|
SecretID: m.SecretID,
|
|
}
|
|
|
|
return o
|
|
}
|
|
|
|
func (m *RemoveSecretResponse) Copy() *RemoveSecretResponse {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
o := &RemoveSecretResponse{}
|
|
|
|
return o
|
|
}
|
|
|
|
func (this *GetNodeRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetNodeRequest{")
|
|
s = append(s, "NodeID: "+fmt.Sprintf("%#v", this.NodeID)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetNodeResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetNodeResponse{")
|
|
if this.Node != nil {
|
|
s = append(s, "Node: "+fmt.Sprintf("%#v", this.Node)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListNodesRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListNodesRequest{")
|
|
if this.Filters != nil {
|
|
s = append(s, "Filters: "+fmt.Sprintf("%#v", this.Filters)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListNodesRequest_Filters) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 10)
|
|
s = append(s, "&api.ListNodesRequest_Filters{")
|
|
s = append(s, "Names: "+fmt.Sprintf("%#v", this.Names)+",\n")
|
|
s = append(s, "IDPrefixes: "+fmt.Sprintf("%#v", this.IDPrefixes)+",\n")
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%#v: %#v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
if this.Labels != nil {
|
|
s = append(s, "Labels: "+mapStringForLabels+",\n")
|
|
}
|
|
s = append(s, "Memberships: "+fmt.Sprintf("%#v", this.Memberships)+",\n")
|
|
s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n")
|
|
s = append(s, "NamePrefixes: "+fmt.Sprintf("%#v", this.NamePrefixes)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListNodesResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListNodesResponse{")
|
|
if this.Nodes != nil {
|
|
s = append(s, "Nodes: "+fmt.Sprintf("%#v", this.Nodes)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *UpdateNodeRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 7)
|
|
s = append(s, "&api.UpdateNodeRequest{")
|
|
s = append(s, "NodeID: "+fmt.Sprintf("%#v", this.NodeID)+",\n")
|
|
if this.NodeVersion != nil {
|
|
s = append(s, "NodeVersion: "+fmt.Sprintf("%#v", this.NodeVersion)+",\n")
|
|
}
|
|
if this.Spec != nil {
|
|
s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *UpdateNodeResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.UpdateNodeResponse{")
|
|
if this.Node != nil {
|
|
s = append(s, "Node: "+fmt.Sprintf("%#v", this.Node)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RemoveNodeRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 6)
|
|
s = append(s, "&api.RemoveNodeRequest{")
|
|
s = append(s, "NodeID: "+fmt.Sprintf("%#v", this.NodeID)+",\n")
|
|
s = append(s, "Force: "+fmt.Sprintf("%#v", this.Force)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RemoveNodeResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 4)
|
|
s = append(s, "&api.RemoveNodeResponse{")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetTaskRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetTaskRequest{")
|
|
s = append(s, "TaskID: "+fmt.Sprintf("%#v", this.TaskID)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetTaskResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetTaskResponse{")
|
|
if this.Task != nil {
|
|
s = append(s, "Task: "+fmt.Sprintf("%#v", this.Task)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RemoveTaskRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.RemoveTaskRequest{")
|
|
s = append(s, "TaskID: "+fmt.Sprintf("%#v", this.TaskID)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RemoveTaskResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 4)
|
|
s = append(s, "&api.RemoveTaskResponse{")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListTasksRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListTasksRequest{")
|
|
if this.Filters != nil {
|
|
s = append(s, "Filters: "+fmt.Sprintf("%#v", this.Filters)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListTasksRequest_Filters) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 11)
|
|
s = append(s, "&api.ListTasksRequest_Filters{")
|
|
s = append(s, "Names: "+fmt.Sprintf("%#v", this.Names)+",\n")
|
|
s = append(s, "IDPrefixes: "+fmt.Sprintf("%#v", this.IDPrefixes)+",\n")
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%#v: %#v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
if this.Labels != nil {
|
|
s = append(s, "Labels: "+mapStringForLabels+",\n")
|
|
}
|
|
s = append(s, "ServiceIDs: "+fmt.Sprintf("%#v", this.ServiceIDs)+",\n")
|
|
s = append(s, "NodeIDs: "+fmt.Sprintf("%#v", this.NodeIDs)+",\n")
|
|
s = append(s, "DesiredStates: "+fmt.Sprintf("%#v", this.DesiredStates)+",\n")
|
|
s = append(s, "NamePrefixes: "+fmt.Sprintf("%#v", this.NamePrefixes)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListTasksResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListTasksResponse{")
|
|
if this.Tasks != nil {
|
|
s = append(s, "Tasks: "+fmt.Sprintf("%#v", this.Tasks)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *CreateServiceRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.CreateServiceRequest{")
|
|
if this.Spec != nil {
|
|
s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *CreateServiceResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.CreateServiceResponse{")
|
|
if this.Service != nil {
|
|
s = append(s, "Service: "+fmt.Sprintf("%#v", this.Service)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetServiceRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetServiceRequest{")
|
|
s = append(s, "ServiceID: "+fmt.Sprintf("%#v", this.ServiceID)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetServiceResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetServiceResponse{")
|
|
if this.Service != nil {
|
|
s = append(s, "Service: "+fmt.Sprintf("%#v", this.Service)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *UpdateServiceRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 7)
|
|
s = append(s, "&api.UpdateServiceRequest{")
|
|
s = append(s, "ServiceID: "+fmt.Sprintf("%#v", this.ServiceID)+",\n")
|
|
if this.ServiceVersion != nil {
|
|
s = append(s, "ServiceVersion: "+fmt.Sprintf("%#v", this.ServiceVersion)+",\n")
|
|
}
|
|
if this.Spec != nil {
|
|
s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *UpdateServiceResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.UpdateServiceResponse{")
|
|
if this.Service != nil {
|
|
s = append(s, "Service: "+fmt.Sprintf("%#v", this.Service)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RemoveServiceRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.RemoveServiceRequest{")
|
|
s = append(s, "ServiceID: "+fmt.Sprintf("%#v", this.ServiceID)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RemoveServiceResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 4)
|
|
s = append(s, "&api.RemoveServiceResponse{")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListServicesRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListServicesRequest{")
|
|
if this.Filters != nil {
|
|
s = append(s, "Filters: "+fmt.Sprintf("%#v", this.Filters)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListServicesRequest_Filters) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 8)
|
|
s = append(s, "&api.ListServicesRequest_Filters{")
|
|
s = append(s, "Names: "+fmt.Sprintf("%#v", this.Names)+",\n")
|
|
s = append(s, "IDPrefixes: "+fmt.Sprintf("%#v", this.IDPrefixes)+",\n")
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%#v: %#v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
if this.Labels != nil {
|
|
s = append(s, "Labels: "+mapStringForLabels+",\n")
|
|
}
|
|
s = append(s, "NamePrefixes: "+fmt.Sprintf("%#v", this.NamePrefixes)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListServicesResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListServicesResponse{")
|
|
if this.Services != nil {
|
|
s = append(s, "Services: "+fmt.Sprintf("%#v", this.Services)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *CreateNetworkRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.CreateNetworkRequest{")
|
|
if this.Spec != nil {
|
|
s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *CreateNetworkResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.CreateNetworkResponse{")
|
|
if this.Network != nil {
|
|
s = append(s, "Network: "+fmt.Sprintf("%#v", this.Network)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetNetworkRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 6)
|
|
s = append(s, "&api.GetNetworkRequest{")
|
|
s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
|
|
s = append(s, "NetworkID: "+fmt.Sprintf("%#v", this.NetworkID)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetNetworkResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetNetworkResponse{")
|
|
if this.Network != nil {
|
|
s = append(s, "Network: "+fmt.Sprintf("%#v", this.Network)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RemoveNetworkRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 6)
|
|
s = append(s, "&api.RemoveNetworkRequest{")
|
|
s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
|
|
s = append(s, "NetworkID: "+fmt.Sprintf("%#v", this.NetworkID)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RemoveNetworkResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 4)
|
|
s = append(s, "&api.RemoveNetworkResponse{")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListNetworksRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListNetworksRequest{")
|
|
if this.Filters != nil {
|
|
s = append(s, "Filters: "+fmt.Sprintf("%#v", this.Filters)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListNetworksRequest_Filters) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 8)
|
|
s = append(s, "&api.ListNetworksRequest_Filters{")
|
|
s = append(s, "Names: "+fmt.Sprintf("%#v", this.Names)+",\n")
|
|
s = append(s, "IDPrefixes: "+fmt.Sprintf("%#v", this.IDPrefixes)+",\n")
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%#v: %#v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
if this.Labels != nil {
|
|
s = append(s, "Labels: "+mapStringForLabels+",\n")
|
|
}
|
|
s = append(s, "NamePrefixes: "+fmt.Sprintf("%#v", this.NamePrefixes)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListNetworksResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListNetworksResponse{")
|
|
if this.Networks != nil {
|
|
s = append(s, "Networks: "+fmt.Sprintf("%#v", this.Networks)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetClusterRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetClusterRequest{")
|
|
s = append(s, "ClusterID: "+fmt.Sprintf("%#v", this.ClusterID)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetClusterResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetClusterResponse{")
|
|
if this.Cluster != nil {
|
|
s = append(s, "Cluster: "+fmt.Sprintf("%#v", this.Cluster)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListClustersRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListClustersRequest{")
|
|
if this.Filters != nil {
|
|
s = append(s, "Filters: "+fmt.Sprintf("%#v", this.Filters)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListClustersRequest_Filters) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 8)
|
|
s = append(s, "&api.ListClustersRequest_Filters{")
|
|
s = append(s, "Names: "+fmt.Sprintf("%#v", this.Names)+",\n")
|
|
s = append(s, "IDPrefixes: "+fmt.Sprintf("%#v", this.IDPrefixes)+",\n")
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%#v: %#v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
if this.Labels != nil {
|
|
s = append(s, "Labels: "+mapStringForLabels+",\n")
|
|
}
|
|
s = append(s, "NamePrefixes: "+fmt.Sprintf("%#v", this.NamePrefixes)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListClustersResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListClustersResponse{")
|
|
if this.Clusters != nil {
|
|
s = append(s, "Clusters: "+fmt.Sprintf("%#v", this.Clusters)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *KeyRotation) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 7)
|
|
s = append(s, "&api.KeyRotation{")
|
|
s = append(s, "WorkerJoinToken: "+fmt.Sprintf("%#v", this.WorkerJoinToken)+",\n")
|
|
s = append(s, "ManagerJoinToken: "+fmt.Sprintf("%#v", this.ManagerJoinToken)+",\n")
|
|
s = append(s, "ManagerUnlockKey: "+fmt.Sprintf("%#v", this.ManagerUnlockKey)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *UpdateClusterRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 8)
|
|
s = append(s, "&api.UpdateClusterRequest{")
|
|
s = append(s, "ClusterID: "+fmt.Sprintf("%#v", this.ClusterID)+",\n")
|
|
if this.ClusterVersion != nil {
|
|
s = append(s, "ClusterVersion: "+fmt.Sprintf("%#v", this.ClusterVersion)+",\n")
|
|
}
|
|
if this.Spec != nil {
|
|
s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n")
|
|
}
|
|
s = append(s, "Rotation: "+strings.Replace(this.Rotation.GoString(), `&`, ``, 1)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *UpdateClusterResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.UpdateClusterResponse{")
|
|
if this.Cluster != nil {
|
|
s = append(s, "Cluster: "+fmt.Sprintf("%#v", this.Cluster)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetSecretRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetSecretRequest{")
|
|
s = append(s, "SecretID: "+fmt.Sprintf("%#v", this.SecretID)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GetSecretResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.GetSecretResponse{")
|
|
if this.Secret != nil {
|
|
s = append(s, "Secret: "+fmt.Sprintf("%#v", this.Secret)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *UpdateSecretRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 7)
|
|
s = append(s, "&api.UpdateSecretRequest{")
|
|
s = append(s, "SecretID: "+fmt.Sprintf("%#v", this.SecretID)+",\n")
|
|
if this.SecretVersion != nil {
|
|
s = append(s, "SecretVersion: "+fmt.Sprintf("%#v", this.SecretVersion)+",\n")
|
|
}
|
|
if this.Spec != nil {
|
|
s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *UpdateSecretResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.UpdateSecretResponse{")
|
|
if this.Secret != nil {
|
|
s = append(s, "Secret: "+fmt.Sprintf("%#v", this.Secret)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListSecretsRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListSecretsRequest{")
|
|
if this.Filters != nil {
|
|
s = append(s, "Filters: "+fmt.Sprintf("%#v", this.Filters)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListSecretsRequest_Filters) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 8)
|
|
s = append(s, "&api.ListSecretsRequest_Filters{")
|
|
s = append(s, "Names: "+fmt.Sprintf("%#v", this.Names)+",\n")
|
|
s = append(s, "IDPrefixes: "+fmt.Sprintf("%#v", this.IDPrefixes)+",\n")
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%#v: %#v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
if this.Labels != nil {
|
|
s = append(s, "Labels: "+mapStringForLabels+",\n")
|
|
}
|
|
s = append(s, "NamePrefixes: "+fmt.Sprintf("%#v", this.NamePrefixes)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *ListSecretsResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.ListSecretsResponse{")
|
|
if this.Secrets != nil {
|
|
s = append(s, "Secrets: "+fmt.Sprintf("%#v", this.Secrets)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *CreateSecretRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.CreateSecretRequest{")
|
|
if this.Spec != nil {
|
|
s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *CreateSecretResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.CreateSecretResponse{")
|
|
if this.Secret != nil {
|
|
s = append(s, "Secret: "+fmt.Sprintf("%#v", this.Secret)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RemoveSecretRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&api.RemoveSecretRequest{")
|
|
s = append(s, "SecretID: "+fmt.Sprintf("%#v", this.SecretID)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RemoveSecretResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 4)
|
|
s = append(s, "&api.RemoveSecretResponse{")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func valueToGoStringControl(v interface{}, typ string) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
|
}
|
|
func extensionToGoStringControl(m github_com_gogo_protobuf_proto.Message) string {
|
|
e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m)
|
|
if e == nil {
|
|
return "nil"
|
|
}
|
|
s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{"
|
|
keys := make([]int, 0, len(e))
|
|
for k := range e {
|
|
keys = append(keys, int(k))
|
|
}
|
|
sort.Ints(keys)
|
|
ss := []string{}
|
|
for _, k := range keys {
|
|
ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString())
|
|
}
|
|
s += strings.Join(ss, ",") + "})"
|
|
return s
|
|
}
|
|
|
|
// 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.SupportPackageIsVersion3
|
|
|
|
// Client API for Control service
|
|
|
|
type ControlClient interface {
|
|
GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*GetNodeResponse, error)
|
|
ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error)
|
|
UpdateNode(ctx context.Context, in *UpdateNodeRequest, opts ...grpc.CallOption) (*UpdateNodeResponse, error)
|
|
RemoveNode(ctx context.Context, in *RemoveNodeRequest, opts ...grpc.CallOption) (*RemoveNodeResponse, error)
|
|
GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*GetTaskResponse, error)
|
|
ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error)
|
|
RemoveTask(ctx context.Context, in *RemoveTaskRequest, opts ...grpc.CallOption) (*RemoveTaskResponse, error)
|
|
GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*GetServiceResponse, error)
|
|
ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error)
|
|
CreateService(ctx context.Context, in *CreateServiceRequest, opts ...grpc.CallOption) (*CreateServiceResponse, error)
|
|
UpdateService(ctx context.Context, in *UpdateServiceRequest, opts ...grpc.CallOption) (*UpdateServiceResponse, error)
|
|
RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error)
|
|
GetNetwork(ctx context.Context, in *GetNetworkRequest, opts ...grpc.CallOption) (*GetNetworkResponse, error)
|
|
ListNetworks(ctx context.Context, in *ListNetworksRequest, opts ...grpc.CallOption) (*ListNetworksResponse, error)
|
|
CreateNetwork(ctx context.Context, in *CreateNetworkRequest, opts ...grpc.CallOption) (*CreateNetworkResponse, error)
|
|
RemoveNetwork(ctx context.Context, in *RemoveNetworkRequest, opts ...grpc.CallOption) (*RemoveNetworkResponse, error)
|
|
GetCluster(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*GetClusterResponse, error)
|
|
ListClusters(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error)
|
|
UpdateCluster(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*UpdateClusterResponse, error)
|
|
// GetSecret returns a `GetSecretResponse` with a `Secret` with the same
|
|
// id as `GetSecretRequest.SecretID`
|
|
// - Returns `NotFound` if the Secret with the given id is not found.
|
|
// - Returns `InvalidArgument` if the `GetSecretRequest.SecretID` is empty.
|
|
// - Returns an error if getting fails.
|
|
GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*GetSecretResponse, error)
|
|
// UpdateSecret returns a `UpdateSecretResponse` with a `Secret` with the same
|
|
// id as `GetSecretRequest.SecretID`
|
|
// - Returns `NotFound` if the Secret with the given id is not found.
|
|
// - Returns `InvalidArgument` if the `GetSecretRequest.SecretID` is empty.
|
|
// - Returns an error if updating fails.
|
|
UpdateSecret(ctx context.Context, in *UpdateSecretRequest, opts ...grpc.CallOption) (*UpdateSecretResponse, error)
|
|
// ListSecrets returns a `ListSecretResponse` with a list all non-internal `Secret`s being
|
|
// managed, or all secrets matching any name in `ListSecretsRequest.Names`, any
|
|
// name prefix in `ListSecretsRequest.NamePrefixes`, any id in
|
|
// `ListSecretsRequest.SecretIDs`, or any id prefix in `ListSecretsRequest.IDPrefixes`.
|
|
// - Returns an error if listing fails.
|
|
ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error)
|
|
// CreateSecret creates and return a `CreateSecretResponse` with a `Secret` based
|
|
// on the provided `CreateSecretRequest.SecretSpec`.
|
|
// - Returns `InvalidArgument` if the `CreateSecretRequest.SecretSpec` is malformed,
|
|
// or if the secret data is too long or contains invalid characters.
|
|
// - Returns an error if the creation fails.
|
|
CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*CreateSecretResponse, error)
|
|
// RemoveSecret removes the secret referenced by `RemoveSecretRequest.ID`.
|
|
// - Returns `InvalidArgument` if `RemoveSecretRequest.ID` is empty.
|
|
// - Returns `NotFound` if the a secret named `RemoveSecretRequest.ID` is not found.
|
|
// - Returns an error if the deletion fails.
|
|
RemoveSecret(ctx context.Context, in *RemoveSecretRequest, opts ...grpc.CallOption) (*RemoveSecretResponse, error)
|
|
}
|
|
|
|
type controlClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewControlClient(cc *grpc.ClientConn) ControlClient {
|
|
return &controlClient{cc}
|
|
}
|
|
|
|
func (c *controlClient) GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*GetNodeResponse, error) {
|
|
out := new(GetNodeResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/GetNode", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) {
|
|
out := new(ListNodesResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/ListNodes", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) UpdateNode(ctx context.Context, in *UpdateNodeRequest, opts ...grpc.CallOption) (*UpdateNodeResponse, error) {
|
|
out := new(UpdateNodeResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/UpdateNode", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) RemoveNode(ctx context.Context, in *RemoveNodeRequest, opts ...grpc.CallOption) (*RemoveNodeResponse, error) {
|
|
out := new(RemoveNodeResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/RemoveNode", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*GetTaskResponse, error) {
|
|
out := new(GetTaskResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/GetTask", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) {
|
|
out := new(ListTasksResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/ListTasks", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) RemoveTask(ctx context.Context, in *RemoveTaskRequest, opts ...grpc.CallOption) (*RemoveTaskResponse, error) {
|
|
out := new(RemoveTaskResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/RemoveTask", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*GetServiceResponse, error) {
|
|
out := new(GetServiceResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/GetService", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) {
|
|
out := new(ListServicesResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/ListServices", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) CreateService(ctx context.Context, in *CreateServiceRequest, opts ...grpc.CallOption) (*CreateServiceResponse, error) {
|
|
out := new(CreateServiceResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/CreateService", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) UpdateService(ctx context.Context, in *UpdateServiceRequest, opts ...grpc.CallOption) (*UpdateServiceResponse, error) {
|
|
out := new(UpdateServiceResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/UpdateService", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error) {
|
|
out := new(RemoveServiceResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/RemoveService", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) GetNetwork(ctx context.Context, in *GetNetworkRequest, opts ...grpc.CallOption) (*GetNetworkResponse, error) {
|
|
out := new(GetNetworkResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/GetNetwork", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) ListNetworks(ctx context.Context, in *ListNetworksRequest, opts ...grpc.CallOption) (*ListNetworksResponse, error) {
|
|
out := new(ListNetworksResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/ListNetworks", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) CreateNetwork(ctx context.Context, in *CreateNetworkRequest, opts ...grpc.CallOption) (*CreateNetworkResponse, error) {
|
|
out := new(CreateNetworkResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/CreateNetwork", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) RemoveNetwork(ctx context.Context, in *RemoveNetworkRequest, opts ...grpc.CallOption) (*RemoveNetworkResponse, error) {
|
|
out := new(RemoveNetworkResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/RemoveNetwork", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) GetCluster(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*GetClusterResponse, error) {
|
|
out := new(GetClusterResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/GetCluster", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) ListClusters(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) {
|
|
out := new(ListClustersResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/ListClusters", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) UpdateCluster(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*UpdateClusterResponse, error) {
|
|
out := new(UpdateClusterResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/UpdateCluster", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*GetSecretResponse, error) {
|
|
out := new(GetSecretResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/GetSecret", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) UpdateSecret(ctx context.Context, in *UpdateSecretRequest, opts ...grpc.CallOption) (*UpdateSecretResponse, error) {
|
|
out := new(UpdateSecretResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/UpdateSecret", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) {
|
|
out := new(ListSecretsResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/ListSecrets", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*CreateSecretResponse, error) {
|
|
out := new(CreateSecretResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/CreateSecret", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *controlClient) RemoveSecret(ctx context.Context, in *RemoveSecretRequest, opts ...grpc.CallOption) (*RemoveSecretResponse, error) {
|
|
out := new(RemoveSecretResponse)
|
|
err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Control/RemoveSecret", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for Control service
|
|
|
|
type ControlServer interface {
|
|
GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error)
|
|
ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error)
|
|
UpdateNode(context.Context, *UpdateNodeRequest) (*UpdateNodeResponse, error)
|
|
RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error)
|
|
GetTask(context.Context, *GetTaskRequest) (*GetTaskResponse, error)
|
|
ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error)
|
|
RemoveTask(context.Context, *RemoveTaskRequest) (*RemoveTaskResponse, error)
|
|
GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error)
|
|
ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error)
|
|
CreateService(context.Context, *CreateServiceRequest) (*CreateServiceResponse, error)
|
|
UpdateService(context.Context, *UpdateServiceRequest) (*UpdateServiceResponse, error)
|
|
RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error)
|
|
GetNetwork(context.Context, *GetNetworkRequest) (*GetNetworkResponse, error)
|
|
ListNetworks(context.Context, *ListNetworksRequest) (*ListNetworksResponse, error)
|
|
CreateNetwork(context.Context, *CreateNetworkRequest) (*CreateNetworkResponse, error)
|
|
RemoveNetwork(context.Context, *RemoveNetworkRequest) (*RemoveNetworkResponse, error)
|
|
GetCluster(context.Context, *GetClusterRequest) (*GetClusterResponse, error)
|
|
ListClusters(context.Context, *ListClustersRequest) (*ListClustersResponse, error)
|
|
UpdateCluster(context.Context, *UpdateClusterRequest) (*UpdateClusterResponse, error)
|
|
// GetSecret returns a `GetSecretResponse` with a `Secret` with the same
|
|
// id as `GetSecretRequest.SecretID`
|
|
// - Returns `NotFound` if the Secret with the given id is not found.
|
|
// - Returns `InvalidArgument` if the `GetSecretRequest.SecretID` is empty.
|
|
// - Returns an error if getting fails.
|
|
GetSecret(context.Context, *GetSecretRequest) (*GetSecretResponse, error)
|
|
// UpdateSecret returns a `UpdateSecretResponse` with a `Secret` with the same
|
|
// id as `GetSecretRequest.SecretID`
|
|
// - Returns `NotFound` if the Secret with the given id is not found.
|
|
// - Returns `InvalidArgument` if the `GetSecretRequest.SecretID` is empty.
|
|
// - Returns an error if updating fails.
|
|
UpdateSecret(context.Context, *UpdateSecretRequest) (*UpdateSecretResponse, error)
|
|
// ListSecrets returns a `ListSecretResponse` with a list all non-internal `Secret`s being
|
|
// managed, or all secrets matching any name in `ListSecretsRequest.Names`, any
|
|
// name prefix in `ListSecretsRequest.NamePrefixes`, any id in
|
|
// `ListSecretsRequest.SecretIDs`, or any id prefix in `ListSecretsRequest.IDPrefixes`.
|
|
// - Returns an error if listing fails.
|
|
ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error)
|
|
// CreateSecret creates and return a `CreateSecretResponse` with a `Secret` based
|
|
// on the provided `CreateSecretRequest.SecretSpec`.
|
|
// - Returns `InvalidArgument` if the `CreateSecretRequest.SecretSpec` is malformed,
|
|
// or if the secret data is too long or contains invalid characters.
|
|
// - Returns an error if the creation fails.
|
|
CreateSecret(context.Context, *CreateSecretRequest) (*CreateSecretResponse, error)
|
|
// RemoveSecret removes the secret referenced by `RemoveSecretRequest.ID`.
|
|
// - Returns `InvalidArgument` if `RemoveSecretRequest.ID` is empty.
|
|
// - Returns `NotFound` if the a secret named `RemoveSecretRequest.ID` is not found.
|
|
// - Returns an error if the deletion fails.
|
|
RemoveSecret(context.Context, *RemoveSecretRequest) (*RemoveSecretResponse, error)
|
|
}
|
|
|
|
func RegisterControlServer(s *grpc.Server, srv ControlServer) {
|
|
s.RegisterService(&_Control_serviceDesc, srv)
|
|
}
|
|
|
|
func _Control_GetNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetNodeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).GetNode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/GetNode",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).GetNode(ctx, req.(*GetNodeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_ListNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListNodesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).ListNodes(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/ListNodes",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).ListNodes(ctx, req.(*ListNodesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_UpdateNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateNodeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).UpdateNode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/UpdateNode",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).UpdateNode(ctx, req.(*UpdateNodeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_RemoveNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RemoveNodeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).RemoveNode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/RemoveNode",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).RemoveNode(ctx, req.(*RemoveNodeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetTaskRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).GetTask(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/GetTask",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).GetTask(ctx, req.(*GetTaskRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_ListTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListTasksRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).ListTasks(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/ListTasks",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).ListTasks(ctx, req.(*ListTasksRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_RemoveTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RemoveTaskRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).RemoveTask(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/RemoveTask",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).RemoveTask(ctx, req.(*RemoveTaskRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetServiceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).GetService(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/GetService",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).GetService(ctx, req.(*GetServiceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListServicesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).ListServices(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/ListServices",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).ListServices(ctx, req.(*ListServicesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_CreateService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateServiceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).CreateService(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/CreateService",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).CreateService(ctx, req.(*CreateServiceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_UpdateService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateServiceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).UpdateService(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/UpdateService",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).UpdateService(ctx, req.(*UpdateServiceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_RemoveService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RemoveServiceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).RemoveService(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/RemoveService",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).RemoveService(ctx, req.(*RemoveServiceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_GetNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetNetworkRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).GetNetwork(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/GetNetwork",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).GetNetwork(ctx, req.(*GetNetworkRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_ListNetworks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListNetworksRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).ListNetworks(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/ListNetworks",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).ListNetworks(ctx, req.(*ListNetworksRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_CreateNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateNetworkRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).CreateNetwork(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/CreateNetwork",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).CreateNetwork(ctx, req.(*CreateNetworkRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_RemoveNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RemoveNetworkRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).RemoveNetwork(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/RemoveNetwork",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).RemoveNetwork(ctx, req.(*RemoveNetworkRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetClusterRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).GetCluster(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/GetCluster",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).GetCluster(ctx, req.(*GetClusterRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_ListClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListClustersRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).ListClusters(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/ListClusters",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).ListClusters(ctx, req.(*ListClustersRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_UpdateCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateClusterRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).UpdateCluster(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/UpdateCluster",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).UpdateCluster(ctx, req.(*UpdateClusterRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_GetSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetSecretRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).GetSecret(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/GetSecret",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).GetSecret(ctx, req.(*GetSecretRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_UpdateSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateSecretRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).UpdateSecret(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/UpdateSecret",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).UpdateSecret(ctx, req.(*UpdateSecretRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_ListSecrets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListSecretsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).ListSecrets(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/ListSecrets",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).ListSecrets(ctx, req.(*ListSecretsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_CreateSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateSecretRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).CreateSecret(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/CreateSecret",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).CreateSecret(ctx, req.(*CreateSecretRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Control_RemoveSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RemoveSecretRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ControlServer).RemoveSecret(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/docker.swarmkit.v1.Control/RemoveSecret",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServer).RemoveSecret(ctx, req.(*RemoveSecretRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Control_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "docker.swarmkit.v1.Control",
|
|
HandlerType: (*ControlServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetNode",
|
|
Handler: _Control_GetNode_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListNodes",
|
|
Handler: _Control_ListNodes_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateNode",
|
|
Handler: _Control_UpdateNode_Handler,
|
|
},
|
|
{
|
|
MethodName: "RemoveNode",
|
|
Handler: _Control_RemoveNode_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetTask",
|
|
Handler: _Control_GetTask_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListTasks",
|
|
Handler: _Control_ListTasks_Handler,
|
|
},
|
|
{
|
|
MethodName: "RemoveTask",
|
|
Handler: _Control_RemoveTask_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetService",
|
|
Handler: _Control_GetService_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListServices",
|
|
Handler: _Control_ListServices_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateService",
|
|
Handler: _Control_CreateService_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateService",
|
|
Handler: _Control_UpdateService_Handler,
|
|
},
|
|
{
|
|
MethodName: "RemoveService",
|
|
Handler: _Control_RemoveService_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetNetwork",
|
|
Handler: _Control_GetNetwork_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListNetworks",
|
|
Handler: _Control_ListNetworks_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateNetwork",
|
|
Handler: _Control_CreateNetwork_Handler,
|
|
},
|
|
{
|
|
MethodName: "RemoveNetwork",
|
|
Handler: _Control_RemoveNetwork_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetCluster",
|
|
Handler: _Control_GetCluster_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListClusters",
|
|
Handler: _Control_ListClusters_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateCluster",
|
|
Handler: _Control_UpdateCluster_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetSecret",
|
|
Handler: _Control_GetSecret_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateSecret",
|
|
Handler: _Control_UpdateSecret_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListSecrets",
|
|
Handler: _Control_ListSecrets_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateSecret",
|
|
Handler: _Control_CreateSecret_Handler,
|
|
},
|
|
{
|
|
MethodName: "RemoveSecret",
|
|
Handler: _Control_RemoveSecret_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: fileDescriptorControl,
|
|
}
|
|
|
|
func (m *GetNodeRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetNodeRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.NodeID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.NodeID)))
|
|
i += copy(data[i:], m.NodeID)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetNodeResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetNodeResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Node != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Node.Size()))
|
|
n1, err := m.Node.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n1
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListNodesRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListNodesRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Filters.Size()))
|
|
n2, err := m.Filters.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n2
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListNodesRequest_Filters) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListNodesRequest_Filters) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
data[i] = 0xa
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
data[i] = 0x12
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, _ := range m.Labels {
|
|
data[i] = 0x1a
|
|
i++
|
|
v := m.Labels[k]
|
|
mapSize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
i = encodeVarintControl(data, i, uint64(mapSize))
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(k)))
|
|
i += copy(data[i:], k)
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(v)))
|
|
i += copy(data[i:], v)
|
|
}
|
|
}
|
|
if len(m.Memberships) > 0 {
|
|
for _, num := range m.Memberships {
|
|
data[i] = 0x20
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(num))
|
|
}
|
|
}
|
|
if len(m.Roles) > 0 {
|
|
for _, num := range m.Roles {
|
|
data[i] = 0x28
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(num))
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
data[i] = 0x32
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListNodesResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListNodesResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Nodes) > 0 {
|
|
for _, msg := range m.Nodes {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *UpdateNodeRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *UpdateNodeRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.NodeID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.NodeID)))
|
|
i += copy(data[i:], m.NodeID)
|
|
}
|
|
if m.NodeVersion != nil {
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.NodeVersion.Size()))
|
|
n3, err := m.NodeVersion.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n3
|
|
}
|
|
if m.Spec != nil {
|
|
data[i] = 0x1a
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Spec.Size()))
|
|
n4, err := m.Spec.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n4
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *UpdateNodeResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *UpdateNodeResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Node != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Node.Size()))
|
|
n5, err := m.Node.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n5
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RemoveNodeRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *RemoveNodeRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.NodeID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.NodeID)))
|
|
i += copy(data[i:], m.NodeID)
|
|
}
|
|
if m.Force {
|
|
data[i] = 0x10
|
|
i++
|
|
if m.Force {
|
|
data[i] = 1
|
|
} else {
|
|
data[i] = 0
|
|
}
|
|
i++
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RemoveNodeResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *RemoveNodeResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetTaskRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetTaskRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.TaskID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.TaskID)))
|
|
i += copy(data[i:], m.TaskID)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetTaskResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetTaskResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Task != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Task.Size()))
|
|
n6, err := m.Task.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n6
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RemoveTaskRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *RemoveTaskRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.TaskID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.TaskID)))
|
|
i += copy(data[i:], m.TaskID)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RemoveTaskResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *RemoveTaskResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListTasksRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListTasksRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Filters.Size()))
|
|
n7, err := m.Filters.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n7
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListTasksRequest_Filters) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListTasksRequest_Filters) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
data[i] = 0xa
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
data[i] = 0x12
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, _ := range m.Labels {
|
|
data[i] = 0x1a
|
|
i++
|
|
v := m.Labels[k]
|
|
mapSize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
i = encodeVarintControl(data, i, uint64(mapSize))
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(k)))
|
|
i += copy(data[i:], k)
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(v)))
|
|
i += copy(data[i:], v)
|
|
}
|
|
}
|
|
if len(m.ServiceIDs) > 0 {
|
|
for _, s := range m.ServiceIDs {
|
|
data[i] = 0x22
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.NodeIDs) > 0 {
|
|
for _, s := range m.NodeIDs {
|
|
data[i] = 0x2a
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.DesiredStates) > 0 {
|
|
for _, num := range m.DesiredStates {
|
|
data[i] = 0x30
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(num))
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
data[i] = 0x3a
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListTasksResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListTasksResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Tasks) > 0 {
|
|
for _, msg := range m.Tasks {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *CreateServiceRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *CreateServiceRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Spec != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Spec.Size()))
|
|
n8, err := m.Spec.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n8
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *CreateServiceResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *CreateServiceResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Service != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Service.Size()))
|
|
n9, err := m.Service.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n9
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetServiceRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetServiceRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.ServiceID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.ServiceID)))
|
|
i += copy(data[i:], m.ServiceID)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetServiceResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetServiceResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Service != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Service.Size()))
|
|
n10, err := m.Service.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n10
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *UpdateServiceRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *UpdateServiceRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.ServiceID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.ServiceID)))
|
|
i += copy(data[i:], m.ServiceID)
|
|
}
|
|
if m.ServiceVersion != nil {
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.ServiceVersion.Size()))
|
|
n11, err := m.ServiceVersion.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n11
|
|
}
|
|
if m.Spec != nil {
|
|
data[i] = 0x1a
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Spec.Size()))
|
|
n12, err := m.Spec.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n12
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *UpdateServiceResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *UpdateServiceResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Service != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Service.Size()))
|
|
n13, err := m.Service.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n13
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RemoveServiceRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *RemoveServiceRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.ServiceID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.ServiceID)))
|
|
i += copy(data[i:], m.ServiceID)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RemoveServiceResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *RemoveServiceResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListServicesRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListServicesRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Filters.Size()))
|
|
n14, err := m.Filters.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n14
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListServicesRequest_Filters) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListServicesRequest_Filters) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
data[i] = 0xa
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
data[i] = 0x12
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, _ := range m.Labels {
|
|
data[i] = 0x1a
|
|
i++
|
|
v := m.Labels[k]
|
|
mapSize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
i = encodeVarintControl(data, i, uint64(mapSize))
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(k)))
|
|
i += copy(data[i:], k)
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(v)))
|
|
i += copy(data[i:], v)
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
data[i] = 0x22
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListServicesResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListServicesResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Services) > 0 {
|
|
for _, msg := range m.Services {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *CreateNetworkRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *CreateNetworkRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Spec != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Spec.Size()))
|
|
n15, err := m.Spec.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n15
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *CreateNetworkResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *CreateNetworkResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Network != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Network.Size()))
|
|
n16, err := m.Network.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n16
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetNetworkRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetNetworkRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Name) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.Name)))
|
|
i += copy(data[i:], m.Name)
|
|
}
|
|
if len(m.NetworkID) > 0 {
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.NetworkID)))
|
|
i += copy(data[i:], m.NetworkID)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetNetworkResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetNetworkResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Network != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Network.Size()))
|
|
n17, err := m.Network.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n17
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RemoveNetworkRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *RemoveNetworkRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Name) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.Name)))
|
|
i += copy(data[i:], m.Name)
|
|
}
|
|
if len(m.NetworkID) > 0 {
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.NetworkID)))
|
|
i += copy(data[i:], m.NetworkID)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RemoveNetworkResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *RemoveNetworkResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListNetworksRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListNetworksRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Filters.Size()))
|
|
n18, err := m.Filters.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n18
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListNetworksRequest_Filters) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListNetworksRequest_Filters) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
data[i] = 0xa
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
data[i] = 0x12
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, _ := range m.Labels {
|
|
data[i] = 0x1a
|
|
i++
|
|
v := m.Labels[k]
|
|
mapSize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
i = encodeVarintControl(data, i, uint64(mapSize))
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(k)))
|
|
i += copy(data[i:], k)
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(v)))
|
|
i += copy(data[i:], v)
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
data[i] = 0x22
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListNetworksResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListNetworksResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Networks) > 0 {
|
|
for _, msg := range m.Networks {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetClusterRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetClusterRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.ClusterID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.ClusterID)))
|
|
i += copy(data[i:], m.ClusterID)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetClusterResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetClusterResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Cluster != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Cluster.Size()))
|
|
n19, err := m.Cluster.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n19
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListClustersRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListClustersRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Filters.Size()))
|
|
n20, err := m.Filters.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n20
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListClustersRequest_Filters) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListClustersRequest_Filters) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
data[i] = 0xa
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
data[i] = 0x12
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, _ := range m.Labels {
|
|
data[i] = 0x1a
|
|
i++
|
|
v := m.Labels[k]
|
|
mapSize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
i = encodeVarintControl(data, i, uint64(mapSize))
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(k)))
|
|
i += copy(data[i:], k)
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(v)))
|
|
i += copy(data[i:], v)
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
data[i] = 0x22
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListClustersResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListClustersResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Clusters) > 0 {
|
|
for _, msg := range m.Clusters {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *KeyRotation) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *KeyRotation) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.WorkerJoinToken {
|
|
data[i] = 0x8
|
|
i++
|
|
if m.WorkerJoinToken {
|
|
data[i] = 1
|
|
} else {
|
|
data[i] = 0
|
|
}
|
|
i++
|
|
}
|
|
if m.ManagerJoinToken {
|
|
data[i] = 0x10
|
|
i++
|
|
if m.ManagerJoinToken {
|
|
data[i] = 1
|
|
} else {
|
|
data[i] = 0
|
|
}
|
|
i++
|
|
}
|
|
if m.ManagerUnlockKey {
|
|
data[i] = 0x18
|
|
i++
|
|
if m.ManagerUnlockKey {
|
|
data[i] = 1
|
|
} else {
|
|
data[i] = 0
|
|
}
|
|
i++
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *UpdateClusterRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *UpdateClusterRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.ClusterID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.ClusterID)))
|
|
i += copy(data[i:], m.ClusterID)
|
|
}
|
|
if m.ClusterVersion != nil {
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.ClusterVersion.Size()))
|
|
n21, err := m.ClusterVersion.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n21
|
|
}
|
|
if m.Spec != nil {
|
|
data[i] = 0x1a
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Spec.Size()))
|
|
n22, err := m.Spec.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n22
|
|
}
|
|
data[i] = 0x22
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Rotation.Size()))
|
|
n23, err := m.Rotation.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n23
|
|
return i, nil
|
|
}
|
|
|
|
func (m *UpdateClusterResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *UpdateClusterResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Cluster != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Cluster.Size()))
|
|
n24, err := m.Cluster.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n24
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetSecretRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetSecretRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.SecretID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.SecretID)))
|
|
i += copy(data[i:], m.SecretID)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetSecretResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *GetSecretResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Secret != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Secret.Size()))
|
|
n25, err := m.Secret.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n25
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *UpdateSecretRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *UpdateSecretRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.SecretID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.SecretID)))
|
|
i += copy(data[i:], m.SecretID)
|
|
}
|
|
if m.SecretVersion != nil {
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.SecretVersion.Size()))
|
|
n26, err := m.SecretVersion.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n26
|
|
}
|
|
if m.Spec != nil {
|
|
data[i] = 0x1a
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Spec.Size()))
|
|
n27, err := m.Spec.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n27
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *UpdateSecretResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *UpdateSecretResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Secret != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Secret.Size()))
|
|
n28, err := m.Secret.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n28
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListSecretsRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListSecretsRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Filters.Size()))
|
|
n29, err := m.Filters.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n29
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListSecretsRequest_Filters) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListSecretsRequest_Filters) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
data[i] = 0xa
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
data[i] = 0x12
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, _ := range m.Labels {
|
|
data[i] = 0x1a
|
|
i++
|
|
v := m.Labels[k]
|
|
mapSize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
i = encodeVarintControl(data, i, uint64(mapSize))
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(k)))
|
|
i += copy(data[i:], k)
|
|
data[i] = 0x12
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(v)))
|
|
i += copy(data[i:], v)
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
data[i] = 0x22
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
data[i] = uint8(l)
|
|
i++
|
|
i += copy(data[i:], s)
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ListSecretsResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *ListSecretsResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Secrets) > 0 {
|
|
for _, msg := range m.Secrets {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *CreateSecretRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *CreateSecretRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Spec != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Spec.Size()))
|
|
n30, err := m.Spec.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n30
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *CreateSecretResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *CreateSecretResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Secret != nil {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(m.Secret.Size()))
|
|
n31, err := m.Secret.MarshalTo(data[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n31
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RemoveSecretRequest) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *RemoveSecretRequest) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.SecretID) > 0 {
|
|
data[i] = 0xa
|
|
i++
|
|
i = encodeVarintControl(data, i, uint64(len(m.SecretID)))
|
|
i += copy(data[i:], m.SecretID)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *RemoveSecretResponse) Marshal() (data []byte, err error) {
|
|
size := m.Size()
|
|
data = make([]byte, size)
|
|
n, err := m.MarshalTo(data)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return data[:n], nil
|
|
}
|
|
|
|
func (m *RemoveSecretResponse) MarshalTo(data []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
return i, nil
|
|
}
|
|
|
|
func encodeFixed64Control(data []byte, offset int, v uint64) int {
|
|
data[offset] = uint8(v)
|
|
data[offset+1] = uint8(v >> 8)
|
|
data[offset+2] = uint8(v >> 16)
|
|
data[offset+3] = uint8(v >> 24)
|
|
data[offset+4] = uint8(v >> 32)
|
|
data[offset+5] = uint8(v >> 40)
|
|
data[offset+6] = uint8(v >> 48)
|
|
data[offset+7] = uint8(v >> 56)
|
|
return offset + 8
|
|
}
|
|
func encodeFixed32Control(data []byte, offset int, v uint32) int {
|
|
data[offset] = uint8(v)
|
|
data[offset+1] = uint8(v >> 8)
|
|
data[offset+2] = uint8(v >> 16)
|
|
data[offset+3] = uint8(v >> 24)
|
|
return offset + 4
|
|
}
|
|
func encodeVarintControl(data []byte, offset int, v uint64) int {
|
|
for v >= 1<<7 {
|
|
data[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
data[offset] = uint8(v)
|
|
return offset + 1
|
|
}
|
|
|
|
type raftProxyControlServer struct {
|
|
local ControlServer
|
|
connSelector raftselector.ConnProvider
|
|
ctxMods []func(context.Context) (context.Context, error)
|
|
}
|
|
|
|
func NewRaftProxyControlServer(local ControlServer, connSelector raftselector.ConnProvider, ctxMod func(context.Context) (context.Context, error)) ControlServer {
|
|
redirectChecker := func(ctx context.Context) (context.Context, error) {
|
|
s, ok := transport.StreamFromContext(ctx)
|
|
if !ok {
|
|
return ctx, grpc.Errorf(codes.InvalidArgument, "remote addr is not found in context")
|
|
}
|
|
addr := s.ServerTransport().RemoteAddr().String()
|
|
md, ok := metadata.FromContext(ctx)
|
|
if ok && len(md["redirect"]) != 0 {
|
|
return ctx, grpc.Errorf(codes.ResourceExhausted, "more than one redirect to leader from: %s", md["redirect"])
|
|
}
|
|
if !ok {
|
|
md = metadata.New(map[string]string{})
|
|
}
|
|
md["redirect"] = append(md["redirect"], addr)
|
|
return metadata.NewContext(ctx, md), nil
|
|
}
|
|
mods := []func(context.Context) (context.Context, error){redirectChecker}
|
|
mods = append(mods, ctxMod)
|
|
|
|
return &raftProxyControlServer{
|
|
local: local,
|
|
connSelector: connSelector,
|
|
ctxMods: mods,
|
|
}
|
|
}
|
|
func (p *raftProxyControlServer) runCtxMods(ctx context.Context) (context.Context, error) {
|
|
var err error
|
|
for _, mod := range p.ctxMods {
|
|
ctx, err = mod(ctx)
|
|
if err != nil {
|
|
return ctx, err
|
|
}
|
|
}
|
|
return ctx, nil
|
|
}
|
|
func (p *raftProxyControlServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
|
|
ticker := time.NewTicker(500 * time.Millisecond)
|
|
defer ticker.Stop()
|
|
for {
|
|
select {
|
|
case <-ticker.C:
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
client := NewHealthClient(conn)
|
|
|
|
resp, err := client.Check(ctx, &HealthCheckRequest{Service: "Raft"})
|
|
if err != nil || resp.Status != HealthCheckResponse_SERVING {
|
|
continue
|
|
}
|
|
return conn, nil
|
|
case <-ctx.Done():
|
|
return nil, ctx.Err()
|
|
}
|
|
}
|
|
}
|
|
|
|
func (p *raftProxyControlServer) GetNode(ctx context.Context, r *GetNodeRequest) (*GetNodeResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetNode(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).GetNode(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetNode(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).GetNode(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) ListNodes(ctx context.Context, r *ListNodesRequest) (*ListNodesResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListNodes(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).ListNodes(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListNodes(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).ListNodes(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) UpdateNode(ctx context.Context, r *UpdateNodeRequest) (*UpdateNodeResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.UpdateNode(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).UpdateNode(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.UpdateNode(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).UpdateNode(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) RemoveNode(ctx context.Context, r *RemoveNodeRequest) (*RemoveNodeResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.RemoveNode(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).RemoveNode(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.RemoveNode(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).RemoveNode(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) GetTask(ctx context.Context, r *GetTaskRequest) (*GetTaskResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetTask(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).GetTask(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetTask(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).GetTask(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) ListTasks(ctx context.Context, r *ListTasksRequest) (*ListTasksResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListTasks(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).ListTasks(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListTasks(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).ListTasks(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) RemoveTask(ctx context.Context, r *RemoveTaskRequest) (*RemoveTaskResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.RemoveTask(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).RemoveTask(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.RemoveTask(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).RemoveTask(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) GetService(ctx context.Context, r *GetServiceRequest) (*GetServiceResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetService(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).GetService(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetService(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).GetService(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) ListServices(ctx context.Context, r *ListServicesRequest) (*ListServicesResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListServices(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).ListServices(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListServices(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).ListServices(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) CreateService(ctx context.Context, r *CreateServiceRequest) (*CreateServiceResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.CreateService(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).CreateService(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.CreateService(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).CreateService(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) UpdateService(ctx context.Context, r *UpdateServiceRequest) (*UpdateServiceResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.UpdateService(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).UpdateService(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.UpdateService(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).UpdateService(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) RemoveService(ctx context.Context, r *RemoveServiceRequest) (*RemoveServiceResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.RemoveService(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).RemoveService(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.RemoveService(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).RemoveService(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) GetNetwork(ctx context.Context, r *GetNetworkRequest) (*GetNetworkResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetNetwork(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).GetNetwork(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetNetwork(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).GetNetwork(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) ListNetworks(ctx context.Context, r *ListNetworksRequest) (*ListNetworksResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListNetworks(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).ListNetworks(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListNetworks(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).ListNetworks(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) CreateNetwork(ctx context.Context, r *CreateNetworkRequest) (*CreateNetworkResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.CreateNetwork(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).CreateNetwork(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.CreateNetwork(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).CreateNetwork(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) RemoveNetwork(ctx context.Context, r *RemoveNetworkRequest) (*RemoveNetworkResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.RemoveNetwork(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).RemoveNetwork(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.RemoveNetwork(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).RemoveNetwork(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) GetCluster(ctx context.Context, r *GetClusterRequest) (*GetClusterResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetCluster(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).GetCluster(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetCluster(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).GetCluster(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) ListClusters(ctx context.Context, r *ListClustersRequest) (*ListClustersResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListClusters(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).ListClusters(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListClusters(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).ListClusters(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) UpdateCluster(ctx context.Context, r *UpdateClusterRequest) (*UpdateClusterResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.UpdateCluster(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).UpdateCluster(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.UpdateCluster(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).UpdateCluster(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) GetSecret(ctx context.Context, r *GetSecretRequest) (*GetSecretResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetSecret(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).GetSecret(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.GetSecret(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).GetSecret(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) UpdateSecret(ctx context.Context, r *UpdateSecretRequest) (*UpdateSecretResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.UpdateSecret(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).UpdateSecret(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.UpdateSecret(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).UpdateSecret(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) ListSecrets(ctx context.Context, r *ListSecretsRequest) (*ListSecretsResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListSecrets(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).ListSecrets(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.ListSecrets(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).ListSecrets(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) CreateSecret(ctx context.Context, r *CreateSecretRequest) (*CreateSecretResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.CreateSecret(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).CreateSecret(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.CreateSecret(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).CreateSecret(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (p *raftProxyControlServer) RemoveSecret(ctx context.Context, r *RemoveSecretRequest) (*RemoveSecretResponse, error) {
|
|
|
|
conn, err := p.connSelector.LeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.RemoveSecret(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
modCtx, err := p.runCtxMods(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
resp, err := NewControlClient(conn).RemoveSecret(modCtx, r)
|
|
if err != nil {
|
|
if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
|
|
return resp, err
|
|
}
|
|
conn, err := p.pollNewLeaderConn(ctx)
|
|
if err != nil {
|
|
if err == raftselector.ErrIsLeader {
|
|
return p.local.RemoveSecret(ctx, r)
|
|
}
|
|
return nil, err
|
|
}
|
|
return NewControlClient(conn).RemoveSecret(modCtx, r)
|
|
}
|
|
return resp, err
|
|
}
|
|
|
|
func (m *GetNodeRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.NodeID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetNodeResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Node != nil {
|
|
l = m.Node.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListNodesRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
l = m.Filters.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListNodesRequest_Filters) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, v := range m.Labels {
|
|
_ = k
|
|
_ = v
|
|
mapEntrySize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
n += mapEntrySize + 1 + sovControl(uint64(mapEntrySize))
|
|
}
|
|
}
|
|
if len(m.Memberships) > 0 {
|
|
for _, e := range m.Memberships {
|
|
n += 1 + sovControl(uint64(e))
|
|
}
|
|
}
|
|
if len(m.Roles) > 0 {
|
|
for _, e := range m.Roles {
|
|
n += 1 + sovControl(uint64(e))
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListNodesResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Nodes) > 0 {
|
|
for _, e := range m.Nodes {
|
|
l = e.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *UpdateNodeRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.NodeID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
if m.NodeVersion != nil {
|
|
l = m.NodeVersion.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
if m.Spec != nil {
|
|
l = m.Spec.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *UpdateNodeResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Node != nil {
|
|
l = m.Node.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RemoveNodeRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.NodeID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
if m.Force {
|
|
n += 2
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RemoveNodeResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
return n
|
|
}
|
|
|
|
func (m *GetTaskRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.TaskID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetTaskResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Task != nil {
|
|
l = m.Task.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RemoveTaskRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.TaskID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RemoveTaskResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
return n
|
|
}
|
|
|
|
func (m *ListTasksRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
l = m.Filters.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListTasksRequest_Filters) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, v := range m.Labels {
|
|
_ = k
|
|
_ = v
|
|
mapEntrySize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
n += mapEntrySize + 1 + sovControl(uint64(mapEntrySize))
|
|
}
|
|
}
|
|
if len(m.ServiceIDs) > 0 {
|
|
for _, s := range m.ServiceIDs {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.NodeIDs) > 0 {
|
|
for _, s := range m.NodeIDs {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.DesiredStates) > 0 {
|
|
for _, e := range m.DesiredStates {
|
|
n += 1 + sovControl(uint64(e))
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListTasksResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Tasks) > 0 {
|
|
for _, e := range m.Tasks {
|
|
l = e.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CreateServiceRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Spec != nil {
|
|
l = m.Spec.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CreateServiceResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Service != nil {
|
|
l = m.Service.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetServiceRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.ServiceID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetServiceResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Service != nil {
|
|
l = m.Service.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *UpdateServiceRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.ServiceID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
if m.ServiceVersion != nil {
|
|
l = m.ServiceVersion.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
if m.Spec != nil {
|
|
l = m.Spec.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *UpdateServiceResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Service != nil {
|
|
l = m.Service.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RemoveServiceRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.ServiceID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RemoveServiceResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
return n
|
|
}
|
|
|
|
func (m *ListServicesRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
l = m.Filters.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListServicesRequest_Filters) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, v := range m.Labels {
|
|
_ = k
|
|
_ = v
|
|
mapEntrySize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
n += mapEntrySize + 1 + sovControl(uint64(mapEntrySize))
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListServicesResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Services) > 0 {
|
|
for _, e := range m.Services {
|
|
l = e.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CreateNetworkRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Spec != nil {
|
|
l = m.Spec.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CreateNetworkResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Network != nil {
|
|
l = m.Network.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetNetworkRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
l = len(m.NetworkID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetNetworkResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Network != nil {
|
|
l = m.Network.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RemoveNetworkRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
l = len(m.NetworkID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RemoveNetworkResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
return n
|
|
}
|
|
|
|
func (m *ListNetworksRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
l = m.Filters.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListNetworksRequest_Filters) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, v := range m.Labels {
|
|
_ = k
|
|
_ = v
|
|
mapEntrySize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
n += mapEntrySize + 1 + sovControl(uint64(mapEntrySize))
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListNetworksResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Networks) > 0 {
|
|
for _, e := range m.Networks {
|
|
l = e.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetClusterRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.ClusterID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetClusterResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Cluster != nil {
|
|
l = m.Cluster.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListClustersRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
l = m.Filters.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListClustersRequest_Filters) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, v := range m.Labels {
|
|
_ = k
|
|
_ = v
|
|
mapEntrySize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
n += mapEntrySize + 1 + sovControl(uint64(mapEntrySize))
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListClustersResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Clusters) > 0 {
|
|
for _, e := range m.Clusters {
|
|
l = e.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *KeyRotation) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.WorkerJoinToken {
|
|
n += 2
|
|
}
|
|
if m.ManagerJoinToken {
|
|
n += 2
|
|
}
|
|
if m.ManagerUnlockKey {
|
|
n += 2
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *UpdateClusterRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.ClusterID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
if m.ClusterVersion != nil {
|
|
l = m.ClusterVersion.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
if m.Spec != nil {
|
|
l = m.Spec.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
l = m.Rotation.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
return n
|
|
}
|
|
|
|
func (m *UpdateClusterResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Cluster != nil {
|
|
l = m.Cluster.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetSecretRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.SecretID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetSecretResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Secret != nil {
|
|
l = m.Secret.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *UpdateSecretRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.SecretID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
if m.SecretVersion != nil {
|
|
l = m.SecretVersion.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
if m.Spec != nil {
|
|
l = m.Spec.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *UpdateSecretResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Secret != nil {
|
|
l = m.Secret.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListSecretsRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Filters != nil {
|
|
l = m.Filters.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListSecretsRequest_Filters) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Names) > 0 {
|
|
for _, s := range m.Names {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.IDPrefixes) > 0 {
|
|
for _, s := range m.IDPrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for k, v := range m.Labels {
|
|
_ = k
|
|
_ = v
|
|
mapEntrySize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v)))
|
|
n += mapEntrySize + 1 + sovControl(uint64(mapEntrySize))
|
|
}
|
|
}
|
|
if len(m.NamePrefixes) > 0 {
|
|
for _, s := range m.NamePrefixes {
|
|
l = len(s)
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListSecretsResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Secrets) > 0 {
|
|
for _, e := range m.Secrets {
|
|
l = e.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CreateSecretRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Spec != nil {
|
|
l = m.Spec.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CreateSecretResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.Secret != nil {
|
|
l = m.Secret.Size()
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RemoveSecretRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.SecretID)
|
|
if l > 0 {
|
|
n += 1 + l + sovControl(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RemoveSecretResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
return n
|
|
}
|
|
|
|
func sovControl(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozControl(x uint64) (n int) {
|
|
return sovControl(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (this *GetNodeRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetNodeRequest{`,
|
|
`NodeID:` + fmt.Sprintf("%v", this.NodeID) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetNodeResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetNodeResponse{`,
|
|
`Node:` + strings.Replace(fmt.Sprintf("%v", this.Node), "Node", "Node", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListNodesRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListNodesRequest{`,
|
|
`Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "ListNodesRequest_Filters", "ListNodesRequest_Filters", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListNodesRequest_Filters) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
s := strings.Join([]string{`&ListNodesRequest_Filters{`,
|
|
`Names:` + fmt.Sprintf("%v", this.Names) + `,`,
|
|
`IDPrefixes:` + fmt.Sprintf("%v", this.IDPrefixes) + `,`,
|
|
`Labels:` + mapStringForLabels + `,`,
|
|
`Memberships:` + fmt.Sprintf("%v", this.Memberships) + `,`,
|
|
`Roles:` + fmt.Sprintf("%v", this.Roles) + `,`,
|
|
`NamePrefixes:` + fmt.Sprintf("%v", this.NamePrefixes) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListNodesResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListNodesResponse{`,
|
|
`Nodes:` + strings.Replace(fmt.Sprintf("%v", this.Nodes), "Node", "Node", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *UpdateNodeRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&UpdateNodeRequest{`,
|
|
`NodeID:` + fmt.Sprintf("%v", this.NodeID) + `,`,
|
|
`NodeVersion:` + strings.Replace(fmt.Sprintf("%v", this.NodeVersion), "Version", "Version", 1) + `,`,
|
|
`Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "NodeSpec", "NodeSpec", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *UpdateNodeResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&UpdateNodeResponse{`,
|
|
`Node:` + strings.Replace(fmt.Sprintf("%v", this.Node), "Node", "Node", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RemoveNodeRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RemoveNodeRequest{`,
|
|
`NodeID:` + fmt.Sprintf("%v", this.NodeID) + `,`,
|
|
`Force:` + fmt.Sprintf("%v", this.Force) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RemoveNodeResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RemoveNodeResponse{`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetTaskRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetTaskRequest{`,
|
|
`TaskID:` + fmt.Sprintf("%v", this.TaskID) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetTaskResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetTaskResponse{`,
|
|
`Task:` + strings.Replace(fmt.Sprintf("%v", this.Task), "Task", "Task", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RemoveTaskRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RemoveTaskRequest{`,
|
|
`TaskID:` + fmt.Sprintf("%v", this.TaskID) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RemoveTaskResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RemoveTaskResponse{`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListTasksRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListTasksRequest{`,
|
|
`Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "ListTasksRequest_Filters", "ListTasksRequest_Filters", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListTasksRequest_Filters) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
s := strings.Join([]string{`&ListTasksRequest_Filters{`,
|
|
`Names:` + fmt.Sprintf("%v", this.Names) + `,`,
|
|
`IDPrefixes:` + fmt.Sprintf("%v", this.IDPrefixes) + `,`,
|
|
`Labels:` + mapStringForLabels + `,`,
|
|
`ServiceIDs:` + fmt.Sprintf("%v", this.ServiceIDs) + `,`,
|
|
`NodeIDs:` + fmt.Sprintf("%v", this.NodeIDs) + `,`,
|
|
`DesiredStates:` + fmt.Sprintf("%v", this.DesiredStates) + `,`,
|
|
`NamePrefixes:` + fmt.Sprintf("%v", this.NamePrefixes) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListTasksResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListTasksResponse{`,
|
|
`Tasks:` + strings.Replace(fmt.Sprintf("%v", this.Tasks), "Task", "Task", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *CreateServiceRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&CreateServiceRequest{`,
|
|
`Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "ServiceSpec", "ServiceSpec", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *CreateServiceResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&CreateServiceResponse{`,
|
|
`Service:` + strings.Replace(fmt.Sprintf("%v", this.Service), "Service", "Service", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetServiceRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetServiceRequest{`,
|
|
`ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetServiceResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetServiceResponse{`,
|
|
`Service:` + strings.Replace(fmt.Sprintf("%v", this.Service), "Service", "Service", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *UpdateServiceRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&UpdateServiceRequest{`,
|
|
`ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`,
|
|
`ServiceVersion:` + strings.Replace(fmt.Sprintf("%v", this.ServiceVersion), "Version", "Version", 1) + `,`,
|
|
`Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "ServiceSpec", "ServiceSpec", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *UpdateServiceResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&UpdateServiceResponse{`,
|
|
`Service:` + strings.Replace(fmt.Sprintf("%v", this.Service), "Service", "Service", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RemoveServiceRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RemoveServiceRequest{`,
|
|
`ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RemoveServiceResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RemoveServiceResponse{`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListServicesRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListServicesRequest{`,
|
|
`Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "ListServicesRequest_Filters", "ListServicesRequest_Filters", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListServicesRequest_Filters) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
s := strings.Join([]string{`&ListServicesRequest_Filters{`,
|
|
`Names:` + fmt.Sprintf("%v", this.Names) + `,`,
|
|
`IDPrefixes:` + fmt.Sprintf("%v", this.IDPrefixes) + `,`,
|
|
`Labels:` + mapStringForLabels + `,`,
|
|
`NamePrefixes:` + fmt.Sprintf("%v", this.NamePrefixes) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListServicesResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListServicesResponse{`,
|
|
`Services:` + strings.Replace(fmt.Sprintf("%v", this.Services), "Service", "Service", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *CreateNetworkRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&CreateNetworkRequest{`,
|
|
`Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "NetworkSpec", "NetworkSpec", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *CreateNetworkResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&CreateNetworkResponse{`,
|
|
`Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "Network", "Network", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetNetworkRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetNetworkRequest{`,
|
|
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
|
|
`NetworkID:` + fmt.Sprintf("%v", this.NetworkID) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetNetworkResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetNetworkResponse{`,
|
|
`Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "Network", "Network", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RemoveNetworkRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RemoveNetworkRequest{`,
|
|
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
|
|
`NetworkID:` + fmt.Sprintf("%v", this.NetworkID) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RemoveNetworkResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RemoveNetworkResponse{`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListNetworksRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListNetworksRequest{`,
|
|
`Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "ListNetworksRequest_Filters", "ListNetworksRequest_Filters", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListNetworksRequest_Filters) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
s := strings.Join([]string{`&ListNetworksRequest_Filters{`,
|
|
`Names:` + fmt.Sprintf("%v", this.Names) + `,`,
|
|
`IDPrefixes:` + fmt.Sprintf("%v", this.IDPrefixes) + `,`,
|
|
`Labels:` + mapStringForLabels + `,`,
|
|
`NamePrefixes:` + fmt.Sprintf("%v", this.NamePrefixes) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListNetworksResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListNetworksResponse{`,
|
|
`Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "Network", "Network", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetClusterRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetClusterRequest{`,
|
|
`ClusterID:` + fmt.Sprintf("%v", this.ClusterID) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetClusterResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetClusterResponse{`,
|
|
`Cluster:` + strings.Replace(fmt.Sprintf("%v", this.Cluster), "Cluster", "Cluster", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListClustersRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListClustersRequest{`,
|
|
`Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "ListClustersRequest_Filters", "ListClustersRequest_Filters", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListClustersRequest_Filters) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
s := strings.Join([]string{`&ListClustersRequest_Filters{`,
|
|
`Names:` + fmt.Sprintf("%v", this.Names) + `,`,
|
|
`IDPrefixes:` + fmt.Sprintf("%v", this.IDPrefixes) + `,`,
|
|
`Labels:` + mapStringForLabels + `,`,
|
|
`NamePrefixes:` + fmt.Sprintf("%v", this.NamePrefixes) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListClustersResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListClustersResponse{`,
|
|
`Clusters:` + strings.Replace(fmt.Sprintf("%v", this.Clusters), "Cluster", "Cluster", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *KeyRotation) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&KeyRotation{`,
|
|
`WorkerJoinToken:` + fmt.Sprintf("%v", this.WorkerJoinToken) + `,`,
|
|
`ManagerJoinToken:` + fmt.Sprintf("%v", this.ManagerJoinToken) + `,`,
|
|
`ManagerUnlockKey:` + fmt.Sprintf("%v", this.ManagerUnlockKey) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *UpdateClusterRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&UpdateClusterRequest{`,
|
|
`ClusterID:` + fmt.Sprintf("%v", this.ClusterID) + `,`,
|
|
`ClusterVersion:` + strings.Replace(fmt.Sprintf("%v", this.ClusterVersion), "Version", "Version", 1) + `,`,
|
|
`Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "ClusterSpec", "ClusterSpec", 1) + `,`,
|
|
`Rotation:` + strings.Replace(strings.Replace(this.Rotation.String(), "KeyRotation", "KeyRotation", 1), `&`, ``, 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *UpdateClusterResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&UpdateClusterResponse{`,
|
|
`Cluster:` + strings.Replace(fmt.Sprintf("%v", this.Cluster), "Cluster", "Cluster", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetSecretRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetSecretRequest{`,
|
|
`SecretID:` + fmt.Sprintf("%v", this.SecretID) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GetSecretResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&GetSecretResponse{`,
|
|
`Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *UpdateSecretRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&UpdateSecretRequest{`,
|
|
`SecretID:` + fmt.Sprintf("%v", this.SecretID) + `,`,
|
|
`SecretVersion:` + strings.Replace(fmt.Sprintf("%v", this.SecretVersion), "Version", "Version", 1) + `,`,
|
|
`Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "SecretSpec", "SecretSpec", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *UpdateSecretResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&UpdateSecretResponse{`,
|
|
`Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListSecretsRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListSecretsRequest{`,
|
|
`Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "ListSecretsRequest_Filters", "ListSecretsRequest_Filters", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListSecretsRequest_Filters) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
keysForLabels := make([]string, 0, len(this.Labels))
|
|
for k, _ := range this.Labels {
|
|
keysForLabels = append(keysForLabels, k)
|
|
}
|
|
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
|
|
mapStringForLabels := "map[string]string{"
|
|
for _, k := range keysForLabels {
|
|
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
|
|
}
|
|
mapStringForLabels += "}"
|
|
s := strings.Join([]string{`&ListSecretsRequest_Filters{`,
|
|
`Names:` + fmt.Sprintf("%v", this.Names) + `,`,
|
|
`IDPrefixes:` + fmt.Sprintf("%v", this.IDPrefixes) + `,`,
|
|
`Labels:` + mapStringForLabels + `,`,
|
|
`NamePrefixes:` + fmt.Sprintf("%v", this.NamePrefixes) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *ListSecretsResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&ListSecretsResponse{`,
|
|
`Secrets:` + strings.Replace(fmt.Sprintf("%v", this.Secrets), "Secret", "Secret", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *CreateSecretRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&CreateSecretRequest{`,
|
|
`Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "SecretSpec", "SecretSpec", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *CreateSecretResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&CreateSecretResponse{`,
|
|
`Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RemoveSecretRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RemoveSecretRequest{`,
|
|
`SecretID:` + fmt.Sprintf("%v", this.SecretID) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RemoveSecretResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RemoveSecretResponse{`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func valueToStringControl(v interface{}) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("*%v", pv)
|
|
}
|
|
func (m *GetNodeRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetNodeRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetNodeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NodeID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetNodeResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetNodeResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetNodeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Node == nil {
|
|
m.Node = &Node{}
|
|
}
|
|
if err := m.Node.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListNodesRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListNodesRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListNodesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Filters == nil {
|
|
m.Filters = &ListNodesRequest_Filters{}
|
|
}
|
|
if err := m.Filters.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListNodesRequest_Filters) 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 ErrIntOverflowControl
|
|
}
|
|
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: Filters: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Names = append(m.Names, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IDPrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.IDPrefixes = append(m.IDPrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var keykey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
keykey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapkey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapkey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapkey := int(stringLenmapkey)
|
|
if intStringLenmapkey < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
|
if postStringIndexmapkey > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapkey := string(data[iNdEx:postStringIndexmapkey])
|
|
iNdEx = postStringIndexmapkey
|
|
if m.Labels == nil {
|
|
m.Labels = make(map[string]string)
|
|
}
|
|
if iNdEx < postIndex {
|
|
var valuekey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
valuekey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapvalue uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapvalue := int(stringLenmapvalue)
|
|
if intStringLenmapvalue < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
|
if postStringIndexmapvalue > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapvalue := string(data[iNdEx:postStringIndexmapvalue])
|
|
iNdEx = postStringIndexmapvalue
|
|
m.Labels[mapkey] = mapvalue
|
|
} else {
|
|
var mapvalue string
|
|
m.Labels[mapkey] = mapvalue
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Memberships", wireType)
|
|
}
|
|
var v NodeSpec_Membership
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
v |= (NodeSpec_Membership(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Memberships = append(m.Memberships, v)
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType)
|
|
}
|
|
var v NodeRole
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
v |= (NodeRole(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Roles = append(m.Roles, v)
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NamePrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NamePrefixes = append(m.NamePrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListNodesResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListNodesResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListNodesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Nodes = append(m.Nodes, &Node{})
|
|
if err := m.Nodes[len(m.Nodes)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UpdateNodeRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: UpdateNodeRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdateNodeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NodeID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NodeVersion", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.NodeVersion == nil {
|
|
m.NodeVersion = &Version{}
|
|
}
|
|
if err := m.NodeVersion.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Spec == nil {
|
|
m.Spec = &NodeSpec{}
|
|
}
|
|
if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UpdateNodeResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: UpdateNodeResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdateNodeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Node == nil {
|
|
m.Node = &Node{}
|
|
}
|
|
if err := m.Node.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RemoveNodeRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: RemoveNodeRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RemoveNodeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NodeID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Force", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
v |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Force = bool(v != 0)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RemoveNodeResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: RemoveNodeResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RemoveNodeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetTaskRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetTaskRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TaskID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.TaskID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetTaskResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetTaskResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetTaskResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Task == nil {
|
|
m.Task = &Task{}
|
|
}
|
|
if err := m.Task.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RemoveTaskRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: RemoveTaskRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RemoveTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TaskID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.TaskID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RemoveTaskResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: RemoveTaskResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RemoveTaskResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListTasksRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListTasksRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListTasksRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Filters == nil {
|
|
m.Filters = &ListTasksRequest_Filters{}
|
|
}
|
|
if err := m.Filters.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListTasksRequest_Filters) 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 ErrIntOverflowControl
|
|
}
|
|
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: Filters: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Names = append(m.Names, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IDPrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.IDPrefixes = append(m.IDPrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var keykey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
keykey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapkey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapkey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapkey := int(stringLenmapkey)
|
|
if intStringLenmapkey < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
|
if postStringIndexmapkey > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapkey := string(data[iNdEx:postStringIndexmapkey])
|
|
iNdEx = postStringIndexmapkey
|
|
if m.Labels == nil {
|
|
m.Labels = make(map[string]string)
|
|
}
|
|
if iNdEx < postIndex {
|
|
var valuekey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
valuekey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapvalue uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapvalue := int(stringLenmapvalue)
|
|
if intStringLenmapvalue < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
|
if postStringIndexmapvalue > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapvalue := string(data[iNdEx:postStringIndexmapvalue])
|
|
iNdEx = postStringIndexmapvalue
|
|
m.Labels[mapkey] = mapvalue
|
|
} else {
|
|
var mapvalue string
|
|
m.Labels[mapkey] = mapvalue
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ServiceIDs", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ServiceIDs = append(m.ServiceIDs, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NodeIDs", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NodeIDs = append(m.NodeIDs, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field DesiredStates", wireType)
|
|
}
|
|
var v TaskState
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
v |= (TaskState(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.DesiredStates = append(m.DesiredStates, v)
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NamePrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NamePrefixes = append(m.NamePrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListTasksResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListTasksResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListTasksResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Tasks", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Tasks = append(m.Tasks, &Task{})
|
|
if err := m.Tasks[len(m.Tasks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CreateServiceRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: CreateServiceRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CreateServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Spec == nil {
|
|
m.Spec = &ServiceSpec{}
|
|
}
|
|
if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CreateServiceResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: CreateServiceResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CreateServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Service == nil {
|
|
m.Service = &Service{}
|
|
}
|
|
if err := m.Service.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetServiceRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetServiceRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ServiceID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetServiceResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetServiceResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Service == nil {
|
|
m.Service = &Service{}
|
|
}
|
|
if err := m.Service.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UpdateServiceRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: UpdateServiceRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdateServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ServiceID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ServiceVersion", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.ServiceVersion == nil {
|
|
m.ServiceVersion = &Version{}
|
|
}
|
|
if err := m.ServiceVersion.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Spec == nil {
|
|
m.Spec = &ServiceSpec{}
|
|
}
|
|
if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UpdateServiceResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: UpdateServiceResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdateServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Service == nil {
|
|
m.Service = &Service{}
|
|
}
|
|
if err := m.Service.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RemoveServiceRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: RemoveServiceRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RemoveServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ServiceID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RemoveServiceResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: RemoveServiceResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RemoveServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListServicesRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListServicesRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListServicesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Filters == nil {
|
|
m.Filters = &ListServicesRequest_Filters{}
|
|
}
|
|
if err := m.Filters.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListServicesRequest_Filters) 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 ErrIntOverflowControl
|
|
}
|
|
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: Filters: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Names = append(m.Names, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IDPrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.IDPrefixes = append(m.IDPrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var keykey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
keykey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapkey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapkey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapkey := int(stringLenmapkey)
|
|
if intStringLenmapkey < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
|
if postStringIndexmapkey > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapkey := string(data[iNdEx:postStringIndexmapkey])
|
|
iNdEx = postStringIndexmapkey
|
|
if m.Labels == nil {
|
|
m.Labels = make(map[string]string)
|
|
}
|
|
if iNdEx < postIndex {
|
|
var valuekey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
valuekey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapvalue uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapvalue := int(stringLenmapvalue)
|
|
if intStringLenmapvalue < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
|
if postStringIndexmapvalue > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapvalue := string(data[iNdEx:postStringIndexmapvalue])
|
|
iNdEx = postStringIndexmapvalue
|
|
m.Labels[mapkey] = mapvalue
|
|
} else {
|
|
var mapvalue string
|
|
m.Labels[mapkey] = mapvalue
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NamePrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NamePrefixes = append(m.NamePrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListServicesResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListServicesResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListServicesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Services = append(m.Services, &Service{})
|
|
if err := m.Services[len(m.Services)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CreateNetworkRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: CreateNetworkRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CreateNetworkRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Spec == nil {
|
|
m.Spec = &NetworkSpec{}
|
|
}
|
|
if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CreateNetworkResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: CreateNetworkResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CreateNetworkResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Network == nil {
|
|
m.Network = &Network{}
|
|
}
|
|
if err := m.Network.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetNetworkRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetNetworkRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetNetworkRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
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 ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NetworkID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NetworkID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetNetworkResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetNetworkResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetNetworkResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Network == nil {
|
|
m.Network = &Network{}
|
|
}
|
|
if err := m.Network.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RemoveNetworkRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: RemoveNetworkRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RemoveNetworkRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
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 ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NetworkID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NetworkID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RemoveNetworkResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: RemoveNetworkResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RemoveNetworkResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListNetworksRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListNetworksRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListNetworksRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Filters == nil {
|
|
m.Filters = &ListNetworksRequest_Filters{}
|
|
}
|
|
if err := m.Filters.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListNetworksRequest_Filters) 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 ErrIntOverflowControl
|
|
}
|
|
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: Filters: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Names = append(m.Names, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IDPrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.IDPrefixes = append(m.IDPrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var keykey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
keykey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapkey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapkey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapkey := int(stringLenmapkey)
|
|
if intStringLenmapkey < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
|
if postStringIndexmapkey > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapkey := string(data[iNdEx:postStringIndexmapkey])
|
|
iNdEx = postStringIndexmapkey
|
|
if m.Labels == nil {
|
|
m.Labels = make(map[string]string)
|
|
}
|
|
if iNdEx < postIndex {
|
|
var valuekey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
valuekey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapvalue uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapvalue := int(stringLenmapvalue)
|
|
if intStringLenmapvalue < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
|
if postStringIndexmapvalue > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapvalue := string(data[iNdEx:postStringIndexmapvalue])
|
|
iNdEx = postStringIndexmapvalue
|
|
m.Labels[mapkey] = mapvalue
|
|
} else {
|
|
var mapvalue string
|
|
m.Labels[mapkey] = mapvalue
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NamePrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NamePrefixes = append(m.NamePrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListNetworksResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListNetworksResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListNetworksResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Networks", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Networks = append(m.Networks, &Network{})
|
|
if err := m.Networks[len(m.Networks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetClusterRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetClusterRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetClusterRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ClusterID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ClusterID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetClusterResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetClusterResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetClusterResponse: 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 ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Cluster == nil {
|
|
m.Cluster = &Cluster{}
|
|
}
|
|
if err := m.Cluster.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListClustersRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListClustersRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListClustersRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Filters == nil {
|
|
m.Filters = &ListClustersRequest_Filters{}
|
|
}
|
|
if err := m.Filters.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListClustersRequest_Filters) 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 ErrIntOverflowControl
|
|
}
|
|
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: Filters: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Names = append(m.Names, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IDPrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.IDPrefixes = append(m.IDPrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var keykey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
keykey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapkey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapkey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapkey := int(stringLenmapkey)
|
|
if intStringLenmapkey < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
|
if postStringIndexmapkey > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapkey := string(data[iNdEx:postStringIndexmapkey])
|
|
iNdEx = postStringIndexmapkey
|
|
if m.Labels == nil {
|
|
m.Labels = make(map[string]string)
|
|
}
|
|
if iNdEx < postIndex {
|
|
var valuekey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
valuekey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapvalue uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapvalue := int(stringLenmapvalue)
|
|
if intStringLenmapvalue < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
|
if postStringIndexmapvalue > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapvalue := string(data[iNdEx:postStringIndexmapvalue])
|
|
iNdEx = postStringIndexmapvalue
|
|
m.Labels[mapkey] = mapvalue
|
|
} else {
|
|
var mapvalue string
|
|
m.Labels[mapkey] = mapvalue
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NamePrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NamePrefixes = append(m.NamePrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListClustersResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListClustersResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListClustersResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Clusters", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Clusters = append(m.Clusters, &Cluster{})
|
|
if err := m.Clusters[len(m.Clusters)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *KeyRotation) 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 ErrIntOverflowControl
|
|
}
|
|
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: KeyRotation: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: KeyRotation: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field WorkerJoinToken", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
v |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.WorkerJoinToken = bool(v != 0)
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ManagerJoinToken", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
v |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.ManagerJoinToken = bool(v != 0)
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ManagerUnlockKey", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
v |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.ManagerUnlockKey = bool(v != 0)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UpdateClusterRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: UpdateClusterRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdateClusterRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ClusterID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ClusterID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ClusterVersion", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.ClusterVersion == nil {
|
|
m.ClusterVersion = &Version{}
|
|
}
|
|
if err := m.ClusterVersion.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Spec == nil {
|
|
m.Spec = &ClusterSpec{}
|
|
}
|
|
if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Rotation", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := m.Rotation.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UpdateClusterResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: UpdateClusterResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdateClusterResponse: 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 ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Cluster == nil {
|
|
m.Cluster = &Cluster{}
|
|
}
|
|
if err := m.Cluster.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetSecretRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetSecretRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetSecretRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SecretID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.SecretID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetSecretResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: GetSecretResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetSecretResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Secret == nil {
|
|
m.Secret = &Secret{}
|
|
}
|
|
if err := m.Secret.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UpdateSecretRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: UpdateSecretRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdateSecretRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SecretID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.SecretID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SecretVersion", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.SecretVersion == nil {
|
|
m.SecretVersion = &Version{}
|
|
}
|
|
if err := m.SecretVersion.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Spec == nil {
|
|
m.Spec = &SecretSpec{}
|
|
}
|
|
if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UpdateSecretResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: UpdateSecretResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdateSecretResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Secret == nil {
|
|
m.Secret = &Secret{}
|
|
}
|
|
if err := m.Secret.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListSecretsRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListSecretsRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListSecretsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Filters == nil {
|
|
m.Filters = &ListSecretsRequest_Filters{}
|
|
}
|
|
if err := m.Filters.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListSecretsRequest_Filters) 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 ErrIntOverflowControl
|
|
}
|
|
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: Filters: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Names = append(m.Names, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IDPrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.IDPrefixes = append(m.IDPrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var keykey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
keykey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapkey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapkey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapkey := int(stringLenmapkey)
|
|
if intStringLenmapkey < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
|
if postStringIndexmapkey > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapkey := string(data[iNdEx:postStringIndexmapkey])
|
|
iNdEx = postStringIndexmapkey
|
|
if m.Labels == nil {
|
|
m.Labels = make(map[string]string)
|
|
}
|
|
if iNdEx < postIndex {
|
|
var valuekey uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
valuekey |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
var stringLenmapvalue uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLenmapvalue := int(stringLenmapvalue)
|
|
if intStringLenmapvalue < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
|
if postStringIndexmapvalue > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
mapvalue := string(data[iNdEx:postStringIndexmapvalue])
|
|
iNdEx = postStringIndexmapvalue
|
|
m.Labels[mapkey] = mapvalue
|
|
} else {
|
|
var mapvalue string
|
|
m.Labels[mapkey] = mapvalue
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NamePrefixes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NamePrefixes = append(m.NamePrefixes, string(data[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListSecretsResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: ListSecretsResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListSecretsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Secrets = append(m.Secrets, &Secret{})
|
|
if err := m.Secrets[len(m.Secrets)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CreateSecretRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: CreateSecretRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CreateSecretRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Spec == nil {
|
|
m.Spec = &SecretSpec{}
|
|
}
|
|
if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CreateSecretResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: CreateSecretResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CreateSecretResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Secret == nil {
|
|
m.Secret = &Secret{}
|
|
}
|
|
if err := m.Secret.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RemoveSecretRequest) 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 ErrIntOverflowControl
|
|
}
|
|
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: RemoveSecretRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RemoveSecretRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SecretID", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowControl
|
|
}
|
|
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 ErrInvalidLengthControl
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.SecretID = string(data[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RemoveSecretResponse) 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 ErrIntOverflowControl
|
|
}
|
|
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: RemoveSecretResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RemoveSecretResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipControl(data[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthControl
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipControl(data []byte) (n int, err error) {
|
|
l := len(data)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowControl
|
|
}
|
|
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, ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if data[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 1:
|
|
iNdEx += 8
|
|
return iNdEx, nil
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
iNdEx += length
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthControl
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowControl
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := data[iNdEx]
|
|
iNdEx++
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
innerWireType := int(innerWire & 0x7)
|
|
if innerWireType == 4 {
|
|
break
|
|
}
|
|
next, err := skipControl(data[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
}
|
|
return iNdEx, nil
|
|
case 4:
|
|
return iNdEx, nil
|
|
case 5:
|
|
iNdEx += 4
|
|
return iNdEx, nil
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthControl = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowControl = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|
|
func init() { proto.RegisterFile("control.proto", fileDescriptorControl) }
|
|
|
|
var fileDescriptorControl = []byte{
|
|
// 1781 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x6f, 0x1b, 0x45,
|
|
0x14, 0xaf, 0xed, 0x24, 0x4e, 0x9e, 0xe3, 0x7c, 0x4c, 0xdc, 0x62, 0x6d, 0x8b, 0x53, 0x6d, 0x69,
|
|
0xea, 0xa0, 0xe0, 0x80, 0x4b, 0x45, 0x29, 0xe2, 0xa3, 0x8e, 0x69, 0x71, 0x53, 0x42, 0xb5, 0x69,
|
|
0x11, 0xb7, 0xc8, 0xb1, 0xa7, 0x61, 0x6b, 0xc7, 0x6b, 0x76, 0x37, 0x69, 0x23, 0x2e, 0x80, 0xe0,
|
|
0x4f, 0x40, 0xe2, 0xca, 0x15, 0x24, 0xce, 0xdc, 0xb8, 0x56, 0x9c, 0x38, 0x72, 0xb2, 0xa8, 0x25,
|
|
0x24, 0x4e, 0x88, 0xbf, 0x00, 0xa1, 0xf9, 0xda, 0x2f, 0xcf, 0xee, 0xda, 0x71, 0x50, 0x7a, 0x8a,
|
|
0x77, 0xf6, 0xf7, 0xe6, 0xbd, 0x99, 0xf7, 0x9b, 0xdf, 0xbe, 0x79, 0x0a, 0x64, 0x1b, 0x46, 0xc7,
|
|
0x36, 0x8d, 0x76, 0xa9, 0x6b, 0x1a, 0xb6, 0x81, 0x50, 0xd3, 0x68, 0xb4, 0xb0, 0x59, 0xb2, 0x1e,
|
|
0xd7, 0xcd, 0xfd, 0x96, 0x6e, 0x97, 0x0e, 0x5f, 0x53, 0x32, 0x56, 0x17, 0x37, 0x2c, 0x06, 0x50,
|
|
0xb2, 0xc6, 0xee, 0x23, 0xdc, 0xb0, 0xc5, 0x63, 0xc6, 0x3e, 0xea, 0x62, 0xf1, 0x90, 0xdb, 0x33,
|
|
0xf6, 0x0c, 0xfa, 0x73, 0x9d, 0xfc, 0xe2, 0xa3, 0x4b, 0xdd, 0xf6, 0xc1, 0x9e, 0xde, 0x59, 0x67,
|
|
0x7f, 0xd8, 0xa0, 0x7a, 0x0d, 0xe6, 0x6e, 0x63, 0x7b, 0xcb, 0x68, 0x62, 0x0d, 0x7f, 0x76, 0x80,
|
|
0x2d, 0x1b, 0x5d, 0x82, 0x74, 0xc7, 0x68, 0xe2, 0x1d, 0xbd, 0x99, 0x4f, 0x5c, 0x4c, 0x14, 0x67,
|
|
0x2a, 0xd0, 0xef, 0x2d, 0x4f, 0x11, 0x44, 0xad, 0xaa, 0x4d, 0x91, 0x57, 0xb5, 0xa6, 0xfa, 0x2e,
|
|
0xcc, 0x3b, 0x66, 0x56, 0xd7, 0xe8, 0x58, 0x18, 0xad, 0xc1, 0x04, 0x79, 0x49, 0x8d, 0x32, 0xe5,
|
|
0x7c, 0x69, 0x70, 0x01, 0x25, 0x8a, 0xa7, 0x28, 0xb5, 0x97, 0x82, 0x85, 0xbb, 0xba, 0x45, 0xa7,
|
|
0xb0, 0x84, 0xeb, 0x5b, 0x90, 0x7e, 0xa8, 0xb7, 0x6d, 0x6c, 0x5a, 0x7c, 0x96, 0x35, 0xd9, 0x2c,
|
|
0x41, 0xb3, 0xd2, 0x2d, 0x66, 0xa3, 0x09, 0x63, 0xe5, 0xcb, 0x14, 0xa4, 0xf9, 0x20, 0xca, 0xc1,
|
|
0x64, 0xa7, 0xbe, 0x8f, 0xc9, 0x8c, 0xa9, 0xe2, 0x8c, 0xc6, 0x1e, 0xd0, 0x3a, 0x64, 0xf4, 0xe6,
|
|
0x4e, 0xd7, 0xc4, 0x0f, 0xf5, 0x27, 0xd8, 0xca, 0x27, 0xc9, 0xbb, 0xca, 0x5c, 0xbf, 0xb7, 0x0c,
|
|
0xb5, 0xea, 0x3d, 0x3e, 0xaa, 0x81, 0xde, 0x14, 0xbf, 0xd1, 0x3d, 0x98, 0x6a, 0xd7, 0x77, 0x71,
|
|
0xdb, 0xca, 0xa7, 0x2e, 0xa6, 0x8a, 0x99, 0xf2, 0xf5, 0x51, 0x22, 0x2b, 0xdd, 0xa5, 0xa6, 0xef,
|
|
0x77, 0x6c, 0xf3, 0x48, 0xe3, 0xf3, 0xa0, 0x1a, 0x64, 0xf6, 0xf1, 0xfe, 0x2e, 0x36, 0xad, 0x4f,
|
|
0xf5, 0xae, 0x95, 0x9f, 0xb8, 0x98, 0x2a, 0xce, 0x95, 0xaf, 0x84, 0x6d, 0xdb, 0x76, 0x17, 0x37,
|
|
0x4a, 0x1f, 0x3a, 0x78, 0xcd, 0x6b, 0x8b, 0xca, 0x30, 0x69, 0x1a, 0x6d, 0x6c, 0xe5, 0x27, 0xe9,
|
|
0x24, 0x17, 0x42, 0xf7, 0xde, 0x68, 0x63, 0x8d, 0x41, 0xd1, 0x25, 0xc8, 0x92, 0xad, 0x70, 0xf7,
|
|
0x60, 0x8a, 0xee, 0xcf, 0x2c, 0x19, 0x14, 0xab, 0x56, 0xde, 0x84, 0x8c, 0x27, 0x74, 0xb4, 0x00,
|
|
0xa9, 0x16, 0x3e, 0x62, 0xb4, 0xd0, 0xc8, 0x4f, 0xb2, 0xbb, 0x87, 0xf5, 0xf6, 0x01, 0xce, 0x27,
|
|
0xe9, 0x18, 0x7b, 0xb8, 0x91, 0xbc, 0x9e, 0x50, 0x37, 0x60, 0xd1, 0xb3, 0x1d, 0x9c, 0x23, 0x25,
|
|
0x98, 0x24, 0xd9, 0x67, 0xc9, 0x88, 0x22, 0x09, 0x83, 0xa9, 0x3f, 0x24, 0x60, 0xf1, 0x41, 0xb7,
|
|
0x59, 0xb7, 0xf1, 0xa8, 0x0c, 0x45, 0xef, 0xc0, 0x2c, 0x05, 0x1d, 0x62, 0xd3, 0xd2, 0x8d, 0x0e,
|
|
0x0d, 0x30, 0x53, 0x3e, 0x2f, 0xf3, 0xf8, 0x31, 0x83, 0x68, 0x19, 0x62, 0xc0, 0x1f, 0xd0, 0xab,
|
|
0x30, 0x41, 0x8e, 0x5b, 0x3e, 0x45, 0xed, 0x2e, 0x44, 0xe5, 0x45, 0xa3, 0x48, 0xb5, 0x02, 0xc8,
|
|
0x1b, 0xeb, 0xb1, 0x8e, 0xc5, 0x16, 0x2c, 0x6a, 0x78, 0xdf, 0x38, 0x1c, 0x7d, 0xbd, 0x39, 0x98,
|
|
0x7c, 0x68, 0x98, 0x0d, 0x96, 0x89, 0x69, 0x8d, 0x3d, 0xa8, 0x39, 0x40, 0xde, 0xf9, 0x58, 0x4c,
|
|
0xfc, 0xd0, 0xdf, 0xaf, 0x5b, 0x2d, 0x8f, 0x0b, 0xbb, 0x6e, 0xb5, 0x02, 0x2e, 0x08, 0x82, 0xb8,
|
|
0x20, 0xaf, 0x9c, 0x43, 0xcf, 0xcc, 0xdc, 0xd5, 0x91, 0x97, 0x51, 0xab, 0xa3, 0x78, 0x8a, 0x52,
|
|
0xaf, 0x8b, 0xd5, 0x8d, 0xec, 0xda, 0x59, 0x87, 0xd7, 0xbb, 0xfa, 0x2f, 0x17, 0x11, 0x32, 0x78,
|
|
0x0c, 0x11, 0xf1, 0x9a, 0x0d, 0x8a, 0xc8, 0xf7, 0xa7, 0x28, 0x22, 0xb2, 0xc8, 0xa4, 0x22, 0xb2,
|
|
0x0e, 0x19, 0x0b, 0x9b, 0x87, 0x7a, 0x83, 0xb0, 0x83, 0x89, 0x08, 0x0f, 0x61, 0x9b, 0x0d, 0xd7,
|
|
0xaa, 0x96, 0x06, 0x1c, 0x52, 0x6b, 0x5a, 0x68, 0x05, 0xa6, 0x39, 0x97, 0x98, 0x5a, 0xcc, 0x54,
|
|
0x32, 0xfd, 0xde, 0x72, 0x9a, 0x91, 0xc9, 0xd2, 0xd2, 0x8c, 0x4d, 0x16, 0xaa, 0xc2, 0x5c, 0x13,
|
|
0x5b, 0xba, 0x89, 0x9b, 0x3b, 0x96, 0x5d, 0xb7, 0xb9, 0x3e, 0xcc, 0x95, 0x5f, 0x0c, 0x4b, 0xf1,
|
|
0x36, 0x41, 0x69, 0x59, 0x6e, 0x44, 0x9f, 0x24, 0x22, 0x93, 0xfe, 0x5f, 0x44, 0x86, 0x6f, 0x97,
|
|
0x2b, 0x32, 0x84, 0x35, 0x91, 0x22, 0x43, 0x69, 0xc4, 0x60, 0xea, 0x26, 0xe4, 0x36, 0x4c, 0x5c,
|
|
0xb7, 0x31, 0xdf, 0x32, 0x41, 0xa4, 0xab, 0x5c, 0x01, 0x18, 0x8b, 0x96, 0x65, 0xd3, 0x70, 0x0b,
|
|
0x8f, 0x08, 0x6c, 0xc1, 0xd9, 0xc0, 0x64, 0x3c, 0xaa, 0x6b, 0x90, 0xe6, 0x69, 0xe0, 0x13, 0x9e,
|
|
0x8f, 0x98, 0x50, 0x13, 0x58, 0xf5, 0x26, 0x2c, 0xde, 0xc6, 0x76, 0x20, 0xb2, 0x35, 0x00, 0x37,
|
|
0xeb, 0xfc, 0xd4, 0x64, 0xfb, 0xbd, 0xe5, 0x19, 0x27, 0xe9, 0xda, 0x8c, 0x93, 0x73, 0x75, 0x13,
|
|
0x90, 0x77, 0x8a, 0xf1, 0xe2, 0xf9, 0x25, 0x01, 0x39, 0xa6, 0x72, 0xe3, 0xc4, 0x84, 0xaa, 0x30,
|
|
0x2f, 0xd0, 0x23, 0x08, 0xf4, 0x1c, 0xb7, 0x11, 0x1a, 0x7d, 0xd5, 0xa7, 0xd1, 0xc3, 0x67, 0x28,
|
|
0xb0, 0x80, 0xf1, 0x76, 0xa4, 0x0a, 0x39, 0x26, 0x4d, 0x63, 0x25, 0xe9, 0x05, 0x38, 0x1b, 0x98,
|
|
0x85, 0x6b, 0xdc, 0x5f, 0x49, 0x58, 0x22, 0x1c, 0xe7, 0xe3, 0x8e, 0xcc, 0xd5, 0x82, 0x32, 0xb7,
|
|
0x1e, 0x26, 0x26, 0x01, 0xcb, 0x41, 0xa5, 0xfb, 0x26, 0x79, 0xe2, 0x4a, 0xb7, 0x1d, 0x50, 0xba,
|
|
0xb7, 0x46, 0x0c, 0x4e, 0x2a, 0x76, 0x03, 0x6a, 0x32, 0x71, 0xb2, 0x6a, 0xf2, 0x11, 0xe4, 0xfc,
|
|
0x21, 0x71, 0x62, 0xbc, 0x01, 0xd3, 0x3c, 0x51, 0x42, 0x53, 0x22, 0x99, 0xe1, 0x80, 0x5d, 0x65,
|
|
0xd9, 0xc2, 0xf6, 0x63, 0xc3, 0x6c, 0x8d, 0xa0, 0x2c, 0xdc, 0x42, 0xa6, 0x2c, 0xce, 0x64, 0x2e,
|
|
0x6f, 0x3b, 0x6c, 0x28, 0x8a, 0xb7, 0xc2, 0x4a, 0x60, 0xd5, 0x07, 0x54, 0x59, 0x02, 0x91, 0x21,
|
|
0x98, 0x20, 0xbb, 0xc9, 0xf7, 0x8b, 0xfe, 0x26, 0x44, 0xe6, 0x36, 0x84, 0xc8, 0x49, 0x97, 0xc8,
|
|
0xdc, 0x96, 0x10, 0x99, 0x03, 0x1c, 0xb5, 0x39, 0xa1, 0x18, 0x3f, 0x11, 0x67, 0xeb, 0xc4, 0xc3,
|
|
0x74, 0xce, 0x5b, 0x20, 0x52, 0xe7, 0xbc, 0xf1, 0xf1, 0x63, 0x9c, 0xb7, 0x80, 0xe5, 0xf3, 0x75,
|
|
0xde, 0x42, 0x82, 0x3b, 0xcd, 0xf3, 0xe6, 0x86, 0xe4, 0x9e, 0x37, 0x9e, 0xa8, 0xc8, 0xf3, 0x26,
|
|
0x32, 0xe7, 0x80, 0xf9, 0xc7, 0x72, 0xa3, 0x7d, 0x60, 0xd9, 0xd8, 0xf4, 0xe8, 0x70, 0x83, 0x8d,
|
|
0x04, 0x74, 0x98, 0xe3, 0x08, 0x2f, 0x38, 0xc0, 0xa1, 0xaf, 0x33, 0x85, 0x4b, 0x5f, 0x0e, 0x89,
|
|
0xa2, 0xaf, 0xb0, 0x12, 0x58, 0x87, 0x4b, 0xfc, 0xc5, 0x31, 0xb8, 0x14, 0xb0, 0x7c, 0xbe, 0xb8,
|
|
0x14, 0x12, 0xdc, 0x69, 0x72, 0xc9, 0x0d, 0xc9, 0xe5, 0x12, 0xcf, 0x46, 0x24, 0x97, 0x44, 0xea,
|
|
0x1c, 0xb0, 0xfa, 0x6d, 0x02, 0x32, 0x9b, 0xf8, 0x48, 0x33, 0xec, 0xba, 0x4d, 0x6a, 0x8d, 0x97,
|
|
0x61, 0x91, 0x90, 0x0c, 0x9b, 0x3b, 0x8f, 0x0c, 0xbd, 0xb3, 0x63, 0x1b, 0x2d, 0xdc, 0xa1, 0xa1,
|
|
0x4d, 0x6b, 0xf3, 0xec, 0xc5, 0x1d, 0x43, 0xef, 0xdc, 0x27, 0xc3, 0x68, 0x0d, 0xd0, 0x7e, 0xbd,
|
|
0x53, 0xdf, 0xf3, 0x83, 0xd9, 0xc5, 0x6c, 0x81, 0xbf, 0x91, 0xa2, 0x0f, 0x3a, 0x6d, 0xa3, 0xd1,
|
|
0xda, 0x21, 0xab, 0x4e, 0xf9, 0xd0, 0x0f, 0xe8, 0x8b, 0x4d, 0x7c, 0xa4, 0x7e, 0x95, 0x14, 0x05,
|
|
0xd8, 0x38, 0x3c, 0x27, 0x05, 0x98, 0x40, 0x8f, 0x52, 0x80, 0x71, 0x9b, 0x11, 0x0a, 0x30, 0xee,
|
|
0xdd, 0xfd, 0x90, 0xa1, 0x9b, 0x30, 0x6d, 0xf2, 0x5d, 0xcd, 0x4f, 0x84, 0x1b, 0x7a, 0x36, 0xbf,
|
|
0x32, 0xf1, 0xb4, 0xb7, 0x7c, 0x46, 0x73, 0xcc, 0xdc, 0x1a, 0xee, 0x84, 0x0e, 0xea, 0xdb, 0xb0,
|
|
0x40, 0x4b, 0xe4, 0x86, 0x89, 0x6d, 0xb1, 0x9f, 0xab, 0x30, 0x63, 0xd1, 0x01, 0x77, 0x3b, 0x67,
|
|
0xfb, 0xbd, 0xe5, 0x69, 0x86, 0xaa, 0x55, 0xc9, 0x77, 0x9e, 0xfe, 0x6a, 0xaa, 0xb7, 0x79, 0x91,
|
|
0xce, 0xcc, 0x79, 0x28, 0x65, 0x98, 0x62, 0x00, 0x1e, 0x89, 0x22, 0xaf, 0x19, 0xa8, 0x0d, 0x47,
|
|
0xaa, 0x3f, 0x27, 0x60, 0x49, 0x14, 0xa7, 0xc7, 0x8b, 0x05, 0x55, 0x60, 0x8e, 0x43, 0x47, 0xc8,
|
|
0x6b, 0x96, 0x99, 0x88, 0xb4, 0x96, 0x7d, 0x69, 0x2d, 0x84, 0x07, 0xee, 0x29, 0x4f, 0xee, 0xb8,
|
|
0xf7, 0x82, 0xb1, 0xb7, 0xe1, 0xcf, 0x24, 0x20, 0x56, 0x89, 0x91, 0x47, 0x47, 0x36, 0x3f, 0x08,
|
|
0xca, 0x66, 0x29, 0xbc, 0xaa, 0xf4, 0x1a, 0x0e, 0xaa, 0xe6, 0xd7, 0x27, 0xaf, 0x9a, 0x5a, 0x40,
|
|
0x35, 0x6f, 0x8c, 0x16, 0xdb, 0xa9, 0x88, 0xe6, 0xa6, 0xb8, 0x5a, 0xf0, 0x88, 0x78, 0xca, 0x5e,
|
|
0x27, 0x17, 0x21, 0x3a, 0xc4, 0x25, 0x33, 0x2a, 0x67, 0x02, 0xaa, 0xd6, 0x60, 0x49, 0xdc, 0x7c,
|
|
0xbd, 0xd4, 0x2d, 0xfb, 0x6a, 0xdd, 0xa1, 0xb9, 0xe4, 0x9f, 0x6a, 0x0c, 0x2e, 0xbd, 0x07, 0x4b,
|
|
0xe2, 0x62, 0x75, 0xcc, 0xd3, 0x7d, 0xce, 0xbd, 0xe0, 0x79, 0xa3, 0x29, 0xff, 0x78, 0x0e, 0xd2,
|
|
0x1b, 0xac, 0x69, 0x8f, 0x74, 0x48, 0xf3, 0x7e, 0x38, 0x52, 0x65, 0x41, 0xf9, 0x7b, 0xec, 0xca,
|
|
0xa5, 0x48, 0x0c, 0xaf, 0x44, 0xcf, 0xfe, 0xfa, 0xd3, 0xdf, 0xdf, 0x25, 0xe7, 0x21, 0x4b, 0x41,
|
|
0xaf, 0xf0, 0x2f, 0x01, 0x32, 0x60, 0xc6, 0x69, 0xac, 0xa2, 0x97, 0x86, 0x69, 0x43, 0x2b, 0x97,
|
|
0x63, 0x50, 0xd1, 0x0e, 0x4d, 0x00, 0xb7, 0xaf, 0x89, 0xa4, 0x73, 0x0d, 0xf4, 0x68, 0x95, 0x95,
|
|
0x38, 0x58, 0xac, 0x4f, 0xb7, 0x6f, 0x29, 0xf7, 0x39, 0xd0, 0x27, 0x95, 0xfb, 0x94, 0xb4, 0x3f,
|
|
0x43, 0x7c, 0xb2, 0x1c, 0xde, 0xaf, 0x5b, 0xad, 0xd0, 0x1c, 0x7a, 0xfa, 0x96, 0xa1, 0x39, 0xf4,
|
|
0x75, 0x28, 0xa3, 0x73, 0x48, 0xfb, 0x56, 0xe1, 0x39, 0xf4, 0x76, 0x01, 0xc3, 0x73, 0xe8, 0x6b,
|
|
0x7e, 0xc5, 0xee, 0x27, 0x5d, 0x5e, 0xc4, 0x7e, 0x7a, 0x57, 0xb8, 0x12, 0x07, 0x8b, 0xf5, 0xe9,
|
|
0xf6, 0x9d, 0xe4, 0x3e, 0x07, 0x5a, 0x5b, 0x72, 0x9f, 0x83, 0xed, 0xab, 0x30, 0x9f, 0x4f, 0x60,
|
|
0xd6, 0x7b, 0x85, 0x47, 0x57, 0x86, 0xec, 0x3b, 0x28, 0xc5, 0x78, 0x60, 0xb4, 0xe7, 0xcf, 0x21,
|
|
0xeb, 0x6b, 0xfc, 0x21, 0xe9, 0x8c, 0xb2, 0x46, 0xa3, 0xb2, 0x3a, 0x04, 0x32, 0xd6, 0xb9, 0xaf,
|
|
0xa7, 0x25, 0x77, 0x2e, 0xeb, 0xdb, 0xc9, 0x9d, 0x4b, 0x1b, 0x64, 0x11, 0xce, 0x7d, 0xad, 0x2b,
|
|
0xb9, 0x73, 0x59, 0x8f, 0x4c, 0xee, 0x5c, 0xde, 0x07, 0x8b, 0x24, 0x19, 0xbf, 0x0a, 0x86, 0x92,
|
|
0xcc, 0xdf, 0x3e, 0x08, 0x25, 0x59, 0xb0, 0x17, 0x10, 0x4d, 0x32, 0x71, 0x6f, 0x0d, 0x27, 0x59,
|
|
0xe0, 0xb2, 0x1d, 0x4e, 0xb2, 0xe0, 0x15, 0x38, 0x96, 0x64, 0x62, 0xc1, 0x11, 0x24, 0x0b, 0xac,
|
|
0x79, 0x75, 0x08, 0xe4, 0x90, 0x79, 0x8e, 0x74, 0x2e, 0xeb, 0xd7, 0x44, 0xe5, 0x79, 0x48, 0xe7,
|
|
0x2c, 0xcf, 0xbc, 0x70, 0x0f, 0xcd, 0xb3, 0xff, 0x4a, 0x14, 0x9a, 0xe7, 0xc0, 0xad, 0x21, 0x26,
|
|
0xcf, 0xe2, 0x4e, 0x19, 0x9e, 0xe7, 0xc0, 0x45, 0x38, 0x3c, 0xcf, 0xc1, 0xeb, 0x69, 0xec, 0x79,
|
|
0x16, 0x0b, 0x8e, 0x38, 0xcf, 0x81, 0x35, 0xaf, 0x0e, 0x81, 0x8c, 0xfd, 0x38, 0x39, 0xb7, 0x19,
|
|
0xf9, 0xc7, 0x29, 0x78, 0x57, 0x52, 0x2e, 0xc7, 0xa0, 0x62, 0xf7, 0xd9, 0x7b, 0x75, 0x90, 0xef,
|
|
0xb3, 0xe4, 0x5a, 0xa4, 0x14, 0xe3, 0x81, 0xd1, 0x9e, 0x0f, 0x20, 0xe3, 0x29, 0x80, 0xd1, 0xca,
|
|
0x70, 0x35, 0xbb, 0x72, 0x25, 0x16, 0x17, 0xbb, 0x60, 0x6f, 0x7d, 0x2b, 0x5f, 0xb0, 0xa4, 0x98,
|
|
0x56, 0x8a, 0xf1, 0xc0, 0x58, 0xcf, 0xde, 0x5a, 0x56, 0xee, 0x59, 0x52, 0x2f, 0x2b, 0xc5, 0x78,
|
|
0x60, 0xa4, 0xe7, 0xca, 0x85, 0xa7, 0xcf, 0x0a, 0x67, 0x7e, 0x7f, 0x56, 0x38, 0xf3, 0xcf, 0xb3,
|
|
0x42, 0xe2, 0x8b, 0x7e, 0x21, 0xf1, 0xb4, 0x5f, 0x48, 0xfc, 0xd6, 0x2f, 0x24, 0xfe, 0xe8, 0x17,
|
|
0x12, 0xbb, 0x53, 0xf4, 0xbf, 0x51, 0xae, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xe8, 0xa4,
|
|
0xf9, 0x06, 0x23, 0x00, 0x00,
|
|
}
|