github.com/argoproj/argo-cd@v1.8.7/pkg/apiclient/cluster/cluster.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: server/cluster/cluster.proto 3 4 // Cluster Service 5 // 6 // Cluster Service API performs CRUD actions against cluster resources 7 8 package cluster 9 10 import ( 11 context "context" 12 fmt "fmt" 13 v1alpha1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" 14 _ "github.com/gogo/protobuf/gogoproto" 15 proto "github.com/gogo/protobuf/proto" 16 _ "google.golang.org/genproto/googleapis/api/annotations" 17 grpc "google.golang.org/grpc" 18 codes "google.golang.org/grpc/codes" 19 status "google.golang.org/grpc/status" 20 io "io" 21 _ "k8s.io/api/core/v1" 22 math "math" 23 math_bits "math/bits" 24 ) 25 26 // Reference imports to suppress errors if they are not otherwise used. 27 var _ = proto.Marshal 28 var _ = fmt.Errorf 29 var _ = math.Inf 30 31 // This is a compile-time assertion to ensure that this generated file 32 // is compatible with the proto package it is being compiled against. 33 // A compilation error at this line likely means your copy of the 34 // proto package needs to be updated. 35 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 36 37 // ClusterQuery is a query for cluster resources 38 type ClusterQuery struct { 39 Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` 40 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` 41 XXX_NoUnkeyedLiteral struct{} `json:"-"` 42 XXX_unrecognized []byte `json:"-"` 43 XXX_sizecache int32 `json:"-"` 44 } 45 46 func (m *ClusterQuery) Reset() { *m = ClusterQuery{} } 47 func (m *ClusterQuery) String() string { return proto.CompactTextString(m) } 48 func (*ClusterQuery) ProtoMessage() {} 49 func (*ClusterQuery) Descriptor() ([]byte, []int) { 50 return fileDescriptor_a6b5ba0b5aa57b32, []int{0} 51 } 52 func (m *ClusterQuery) XXX_Unmarshal(b []byte) error { 53 return m.Unmarshal(b) 54 } 55 func (m *ClusterQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 56 if deterministic { 57 return xxx_messageInfo_ClusterQuery.Marshal(b, m, deterministic) 58 } else { 59 b = b[:cap(b)] 60 n, err := m.MarshalToSizedBuffer(b) 61 if err != nil { 62 return nil, err 63 } 64 return b[:n], nil 65 } 66 } 67 func (m *ClusterQuery) XXX_Merge(src proto.Message) { 68 xxx_messageInfo_ClusterQuery.Merge(m, src) 69 } 70 func (m *ClusterQuery) XXX_Size() int { 71 return m.Size() 72 } 73 func (m *ClusterQuery) XXX_DiscardUnknown() { 74 xxx_messageInfo_ClusterQuery.DiscardUnknown(m) 75 } 76 77 var xxx_messageInfo_ClusterQuery proto.InternalMessageInfo 78 79 func (m *ClusterQuery) GetServer() string { 80 if m != nil { 81 return m.Server 82 } 83 return "" 84 } 85 86 func (m *ClusterQuery) GetName() string { 87 if m != nil { 88 return m.Name 89 } 90 return "" 91 } 92 93 type ClusterResponse struct { 94 XXX_NoUnkeyedLiteral struct{} `json:"-"` 95 XXX_unrecognized []byte `json:"-"` 96 XXX_sizecache int32 `json:"-"` 97 } 98 99 func (m *ClusterResponse) Reset() { *m = ClusterResponse{} } 100 func (m *ClusterResponse) String() string { return proto.CompactTextString(m) } 101 func (*ClusterResponse) ProtoMessage() {} 102 func (*ClusterResponse) Descriptor() ([]byte, []int) { 103 return fileDescriptor_a6b5ba0b5aa57b32, []int{1} 104 } 105 func (m *ClusterResponse) XXX_Unmarshal(b []byte) error { 106 return m.Unmarshal(b) 107 } 108 func (m *ClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 109 if deterministic { 110 return xxx_messageInfo_ClusterResponse.Marshal(b, m, deterministic) 111 } else { 112 b = b[:cap(b)] 113 n, err := m.MarshalToSizedBuffer(b) 114 if err != nil { 115 return nil, err 116 } 117 return b[:n], nil 118 } 119 } 120 func (m *ClusterResponse) XXX_Merge(src proto.Message) { 121 xxx_messageInfo_ClusterResponse.Merge(m, src) 122 } 123 func (m *ClusterResponse) XXX_Size() int { 124 return m.Size() 125 } 126 func (m *ClusterResponse) XXX_DiscardUnknown() { 127 xxx_messageInfo_ClusterResponse.DiscardUnknown(m) 128 } 129 130 var xxx_messageInfo_ClusterResponse proto.InternalMessageInfo 131 132 type ClusterCreateRequest struct { 133 Cluster *v1alpha1.Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` 134 Upsert bool `protobuf:"varint,2,opt,name=upsert,proto3" json:"upsert,omitempty"` 135 XXX_NoUnkeyedLiteral struct{} `json:"-"` 136 XXX_unrecognized []byte `json:"-"` 137 XXX_sizecache int32 `json:"-"` 138 } 139 140 func (m *ClusterCreateRequest) Reset() { *m = ClusterCreateRequest{} } 141 func (m *ClusterCreateRequest) String() string { return proto.CompactTextString(m) } 142 func (*ClusterCreateRequest) ProtoMessage() {} 143 func (*ClusterCreateRequest) Descriptor() ([]byte, []int) { 144 return fileDescriptor_a6b5ba0b5aa57b32, []int{2} 145 } 146 func (m *ClusterCreateRequest) XXX_Unmarshal(b []byte) error { 147 return m.Unmarshal(b) 148 } 149 func (m *ClusterCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 150 if deterministic { 151 return xxx_messageInfo_ClusterCreateRequest.Marshal(b, m, deterministic) 152 } else { 153 b = b[:cap(b)] 154 n, err := m.MarshalToSizedBuffer(b) 155 if err != nil { 156 return nil, err 157 } 158 return b[:n], nil 159 } 160 } 161 func (m *ClusterCreateRequest) XXX_Merge(src proto.Message) { 162 xxx_messageInfo_ClusterCreateRequest.Merge(m, src) 163 } 164 func (m *ClusterCreateRequest) XXX_Size() int { 165 return m.Size() 166 } 167 func (m *ClusterCreateRequest) XXX_DiscardUnknown() { 168 xxx_messageInfo_ClusterCreateRequest.DiscardUnknown(m) 169 } 170 171 var xxx_messageInfo_ClusterCreateRequest proto.InternalMessageInfo 172 173 func (m *ClusterCreateRequest) GetCluster() *v1alpha1.Cluster { 174 if m != nil { 175 return m.Cluster 176 } 177 return nil 178 } 179 180 func (m *ClusterCreateRequest) GetUpsert() bool { 181 if m != nil { 182 return m.Upsert 183 } 184 return false 185 } 186 187 type ClusterUpdateRequest struct { 188 Cluster *v1alpha1.Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` 189 UpdatedFields []string `protobuf:"bytes,2,rep,name=updatedFields,proto3" json:"updatedFields,omitempty"` 190 XXX_NoUnkeyedLiteral struct{} `json:"-"` 191 XXX_unrecognized []byte `json:"-"` 192 XXX_sizecache int32 `json:"-"` 193 } 194 195 func (m *ClusterUpdateRequest) Reset() { *m = ClusterUpdateRequest{} } 196 func (m *ClusterUpdateRequest) String() string { return proto.CompactTextString(m) } 197 func (*ClusterUpdateRequest) ProtoMessage() {} 198 func (*ClusterUpdateRequest) Descriptor() ([]byte, []int) { 199 return fileDescriptor_a6b5ba0b5aa57b32, []int{3} 200 } 201 func (m *ClusterUpdateRequest) XXX_Unmarshal(b []byte) error { 202 return m.Unmarshal(b) 203 } 204 func (m *ClusterUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 205 if deterministic { 206 return xxx_messageInfo_ClusterUpdateRequest.Marshal(b, m, deterministic) 207 } else { 208 b = b[:cap(b)] 209 n, err := m.MarshalToSizedBuffer(b) 210 if err != nil { 211 return nil, err 212 } 213 return b[:n], nil 214 } 215 } 216 func (m *ClusterUpdateRequest) XXX_Merge(src proto.Message) { 217 xxx_messageInfo_ClusterUpdateRequest.Merge(m, src) 218 } 219 func (m *ClusterUpdateRequest) XXX_Size() int { 220 return m.Size() 221 } 222 func (m *ClusterUpdateRequest) XXX_DiscardUnknown() { 223 xxx_messageInfo_ClusterUpdateRequest.DiscardUnknown(m) 224 } 225 226 var xxx_messageInfo_ClusterUpdateRequest proto.InternalMessageInfo 227 228 func (m *ClusterUpdateRequest) GetCluster() *v1alpha1.Cluster { 229 if m != nil { 230 return m.Cluster 231 } 232 return nil 233 } 234 235 func (m *ClusterUpdateRequest) GetUpdatedFields() []string { 236 if m != nil { 237 return m.UpdatedFields 238 } 239 return nil 240 } 241 242 func init() { 243 proto.RegisterType((*ClusterQuery)(nil), "cluster.ClusterQuery") 244 proto.RegisterType((*ClusterResponse)(nil), "cluster.ClusterResponse") 245 proto.RegisterType((*ClusterCreateRequest)(nil), "cluster.ClusterCreateRequest") 246 proto.RegisterType((*ClusterUpdateRequest)(nil), "cluster.ClusterUpdateRequest") 247 } 248 249 func init() { proto.RegisterFile("server/cluster/cluster.proto", fileDescriptor_a6b5ba0b5aa57b32) } 250 251 var fileDescriptor_a6b5ba0b5aa57b32 = []byte{ 252 // 564 bytes of a gzipped FileDescriptorProto 253 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xc1, 0x6b, 0x13, 0x4f, 254 0x14, 0xc7, 0xd9, 0xb4, 0xa4, 0xbf, 0xce, 0x4f, 0xad, 0x0e, 0x55, 0x62, 0xac, 0xa1, 0x5d, 0x14, 255 0x4b, 0x31, 0x33, 0x24, 0x5e, 0xa4, 0x17, 0xb1, 0x91, 0x4a, 0xc1, 0x8b, 0x2b, 0x5e, 0xa4, 0x20, 256 0xd3, 0xdd, 0xc7, 0x66, 0xcc, 0x76, 0x67, 0x9c, 0x99, 0x5d, 0x10, 0x11, 0x41, 0xaf, 0xe2, 0xc5, 257 0x9b, 0x17, 0xfd, 0x37, 0xfc, 0x0f, 0x3c, 0x0a, 0xfe, 0x03, 0x12, 0xfc, 0x43, 0x64, 0x67, 0x67, 258 0x93, 0x26, 0x21, 0xa2, 0x18, 0x3d, 0x65, 0xe6, 0x4d, 0xe6, 0xbd, 0xcf, 0xf7, 0xfb, 0xde, 0x0e, 259 0xda, 0xd0, 0xa0, 0x72, 0x50, 0x34, 0x4c, 0x32, 0x6d, 0xc6, 0xbf, 0x44, 0x2a, 0x61, 0x04, 0x5e, 260 0x71, 0xdb, 0xe6, 0x7a, 0x2c, 0x62, 0x61, 0x63, 0xb4, 0x58, 0x95, 0xc7, 0xcd, 0x8d, 0x58, 0x88, 261 0x38, 0x01, 0xca, 0x24, 0xa7, 0x2c, 0x4d, 0x85, 0x61, 0x86, 0x8b, 0x54, 0xbb, 0x53, 0x7f, 0x70, 262 0x53, 0x13, 0x2e, 0xec, 0x69, 0x28, 0x14, 0xd0, 0xbc, 0x43, 0x63, 0x48, 0x41, 0x31, 0x03, 0x91, 263 0xfb, 0xcf, 0x41, 0xcc, 0x4d, 0x3f, 0x3b, 0x22, 0xa1, 0x38, 0xa6, 0x4c, 0xd9, 0x12, 0x4f, 0xec, 264 0xa2, 0x1d, 0x46, 0x54, 0x0e, 0xe2, 0xe2, 0xb2, 0xa6, 0x4c, 0xca, 0x84, 0x87, 0x36, 0x39, 0xcd, 265 0x3b, 0x2c, 0x91, 0x7d, 0x36, 0x93, 0xca, 0xdf, 0x45, 0xa7, 0x7a, 0x25, 0xed, 0xfd, 0x0c, 0xd4, 266 0x33, 0x7c, 0x01, 0xd5, 0x4b, 0x6d, 0x0d, 0x6f, 0xd3, 0xdb, 0x5e, 0x0d, 0xdc, 0x0e, 0x63, 0xb4, 267 0x9c, 0xb2, 0x63, 0x68, 0xd4, 0x6c, 0xd4, 0xae, 0xfd, 0x73, 0x68, 0xcd, 0xdd, 0x0d, 0x40, 0x4b, 268 0x91, 0x6a, 0xf0, 0xdf, 0x78, 0x68, 0xdd, 0xc5, 0x7a, 0x0a, 0x98, 0x81, 0x00, 0x9e, 0x66, 0xa0, 269 0x0d, 0x3e, 0x44, 0x95, 0x2b, 0x36, 0xf1, 0xff, 0xdd, 0x3d, 0x32, 0x16, 0x41, 0x2a, 0x11, 0x76, 270 0xf1, 0x38, 0x8c, 0x88, 0x1c, 0xc4, 0xa4, 0x10, 0x41, 0x4e, 0x88, 0x20, 0x95, 0x08, 0x52, 0x55, 271 0xad, 0x52, 0x16, 0xd4, 0x99, 0xd4, 0xa0, 0x8c, 0xe5, 0xfb, 0x2f, 0x70, 0x3b, 0xff, 0xfd, 0x18, 272 0xe7, 0xa1, 0x8c, 0xfe, 0x19, 0xce, 0x15, 0x74, 0x3a, 0xb3, 0xe5, 0xa2, 0x7d, 0x0e, 0x49, 0xa4, 273 0x1b, 0xb5, 0xcd, 0xa5, 0xed, 0xd5, 0x60, 0x32, 0xd8, 0xfd, 0xb4, 0x82, 0xce, 0xb8, 0xab, 0x0f, 274 0x40, 0xe5, 0x3c, 0x04, 0xfc, 0x12, 0x2d, 0xdf, 0xe3, 0xda, 0xe0, 0xf3, 0xa4, 0x9a, 0xa8, 0x93, 275 0xcd, 0x69, 0xee, 0xff, 0x39, 0x64, 0x91, 0xde, 0x6f, 0xbc, 0xfa, 0xfa, 0xfd, 0x5d, 0x0d, 0xe3, 276 0xb3, 0x76, 0xca, 0xf2, 0x4e, 0x35, 0xbf, 0x1a, 0xbf, 0xf5, 0x50, 0xbd, 0x6c, 0x1c, 0xbe, 0x3c, 277 0xcd, 0x30, 0xd1, 0xd0, 0xe6, 0x02, 0x0c, 0xf3, 0xb7, 0x2c, 0xc7, 0x25, 0x7f, 0x86, 0x63, 0x77, 278 0x64, 0xe5, 0x6b, 0x0f, 0x2d, 0xdd, 0x85, 0xb9, 0x8e, 0x2c, 0x90, 0x02, 0x5f, 0x9c, 0xa6, 0xa0, 279 0xcf, 0xcb, 0xe1, 0x7f, 0x81, 0x3f, 0x78, 0xa8, 0x5e, 0x0e, 0xd0, 0xac, 0x2d, 0x13, 0x83, 0xb5, 280 0x10, 0xa0, 0xae, 0x05, 0xba, 0xde, 0xdc, 0x9a, 0x05, 0xaa, 0x6a, 0x3b, 0xb0, 0xb1, 0x4f, 0x87, 281 0xa8, 0x7e, 0x07, 0x12, 0x30, 0x30, 0xcf, 0xa9, 0xc6, 0x74, 0x78, 0xf4, 0xcd, 0x3a, 0xfd, 0x3b, 282 0x3f, 0xd1, 0x9f, 0x20, 0x14, 0x14, 0xef, 0x14, 0xdc, 0xce, 0x4c, 0xff, 0xf7, 0x2b, 0xb4, 0x6d, 283 0x85, 0x6b, 0xfe, 0xd5, 0xb9, 0x15, 0xa8, 0xb2, 0xe9, 0xdb, 0xac, 0xc8, 0xff, 0xd1, 0x43, 0x6b, 284 0x07, 0x69, 0xce, 0x12, 0x5e, 0x38, 0xdb, 0x63, 0x61, 0x1f, 0xfe, 0x66, 0xff, 0x9d, 0xdd, 0xfe, 285 0xce, 0x7c, 0x3a, 0x3e, 0xa2, 0x69, 0x87, 0x05, 0xce, 0xde, 0xad, 0xcf, 0xc3, 0x96, 0xf7, 0x65, 286 0xd8, 0xf2, 0xbe, 0x0d, 0x5b, 0xde, 0xa3, 0xce, 0x2f, 0xbc, 0xc7, 0x61, 0xc2, 0x21, 0x35, 0x55, 287 0xee, 0xa3, 0xba, 0x7d, 0x7e, 0x6f, 0xfc, 0x08, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x55, 0xe8, 0x91, 288 0x4a, 0x06, 0x00, 0x00, 289 } 290 291 // Reference imports to suppress errors if they are not otherwise used. 292 var _ context.Context 293 var _ grpc.ClientConn 294 295 // This is a compile-time assertion to ensure that this generated file 296 // is compatible with the grpc package it is being compiled against. 297 const _ = grpc.SupportPackageIsVersion4 298 299 // ClusterServiceClient is the client API for ClusterService service. 300 // 301 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 302 type ClusterServiceClient interface { 303 // List returns list of clusters 304 List(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.ClusterList, error) 305 // Create creates a cluster 306 Create(ctx context.Context, in *ClusterCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) 307 // Get returns a cluster by server address 308 Get(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) 309 // Update updates a cluster 310 Update(ctx context.Context, in *ClusterUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) 311 // Delete deletes a cluster 312 Delete(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) 313 // RotateAuth rotates the bearer token used for a cluster 314 RotateAuth(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) 315 // InvalidateCache invalidates cluster cache 316 InvalidateCache(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) 317 } 318 319 type clusterServiceClient struct { 320 cc *grpc.ClientConn 321 } 322 323 func NewClusterServiceClient(cc *grpc.ClientConn) ClusterServiceClient { 324 return &clusterServiceClient{cc} 325 } 326 327 func (c *clusterServiceClient) List(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.ClusterList, error) { 328 out := new(v1alpha1.ClusterList) 329 err := c.cc.Invoke(ctx, "/cluster.ClusterService/List", in, out, opts...) 330 if err != nil { 331 return nil, err 332 } 333 return out, nil 334 } 335 336 func (c *clusterServiceClient) Create(ctx context.Context, in *ClusterCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { 337 out := new(v1alpha1.Cluster) 338 err := c.cc.Invoke(ctx, "/cluster.ClusterService/Create", in, out, opts...) 339 if err != nil { 340 return nil, err 341 } 342 return out, nil 343 } 344 345 func (c *clusterServiceClient) Get(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { 346 out := new(v1alpha1.Cluster) 347 err := c.cc.Invoke(ctx, "/cluster.ClusterService/Get", in, out, opts...) 348 if err != nil { 349 return nil, err 350 } 351 return out, nil 352 } 353 354 func (c *clusterServiceClient) Update(ctx context.Context, in *ClusterUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { 355 out := new(v1alpha1.Cluster) 356 err := c.cc.Invoke(ctx, "/cluster.ClusterService/Update", in, out, opts...) 357 if err != nil { 358 return nil, err 359 } 360 return out, nil 361 } 362 363 func (c *clusterServiceClient) Delete(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) { 364 out := new(ClusterResponse) 365 err := c.cc.Invoke(ctx, "/cluster.ClusterService/Delete", in, out, opts...) 366 if err != nil { 367 return nil, err 368 } 369 return out, nil 370 } 371 372 func (c *clusterServiceClient) RotateAuth(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) { 373 out := new(ClusterResponse) 374 err := c.cc.Invoke(ctx, "/cluster.ClusterService/RotateAuth", in, out, opts...) 375 if err != nil { 376 return nil, err 377 } 378 return out, nil 379 } 380 381 func (c *clusterServiceClient) InvalidateCache(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { 382 out := new(v1alpha1.Cluster) 383 err := c.cc.Invoke(ctx, "/cluster.ClusterService/InvalidateCache", in, out, opts...) 384 if err != nil { 385 return nil, err 386 } 387 return out, nil 388 } 389 390 // ClusterServiceServer is the server API for ClusterService service. 391 type ClusterServiceServer interface { 392 // List returns list of clusters 393 List(context.Context, *ClusterQuery) (*v1alpha1.ClusterList, error) 394 // Create creates a cluster 395 Create(context.Context, *ClusterCreateRequest) (*v1alpha1.Cluster, error) 396 // Get returns a cluster by server address 397 Get(context.Context, *ClusterQuery) (*v1alpha1.Cluster, error) 398 // Update updates a cluster 399 Update(context.Context, *ClusterUpdateRequest) (*v1alpha1.Cluster, error) 400 // Delete deletes a cluster 401 Delete(context.Context, *ClusterQuery) (*ClusterResponse, error) 402 // RotateAuth rotates the bearer token used for a cluster 403 RotateAuth(context.Context, *ClusterQuery) (*ClusterResponse, error) 404 // InvalidateCache invalidates cluster cache 405 InvalidateCache(context.Context, *ClusterQuery) (*v1alpha1.Cluster, error) 406 } 407 408 // UnimplementedClusterServiceServer can be embedded to have forward compatible implementations. 409 type UnimplementedClusterServiceServer struct { 410 } 411 412 func (*UnimplementedClusterServiceServer) List(ctx context.Context, req *ClusterQuery) (*v1alpha1.ClusterList, error) { 413 return nil, status.Errorf(codes.Unimplemented, "method List not implemented") 414 } 415 func (*UnimplementedClusterServiceServer) Create(ctx context.Context, req *ClusterCreateRequest) (*v1alpha1.Cluster, error) { 416 return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") 417 } 418 func (*UnimplementedClusterServiceServer) Get(ctx context.Context, req *ClusterQuery) (*v1alpha1.Cluster, error) { 419 return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") 420 } 421 func (*UnimplementedClusterServiceServer) Update(ctx context.Context, req *ClusterUpdateRequest) (*v1alpha1.Cluster, error) { 422 return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") 423 } 424 func (*UnimplementedClusterServiceServer) Delete(ctx context.Context, req *ClusterQuery) (*ClusterResponse, error) { 425 return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") 426 } 427 func (*UnimplementedClusterServiceServer) RotateAuth(ctx context.Context, req *ClusterQuery) (*ClusterResponse, error) { 428 return nil, status.Errorf(codes.Unimplemented, "method RotateAuth not implemented") 429 } 430 func (*UnimplementedClusterServiceServer) InvalidateCache(ctx context.Context, req *ClusterQuery) (*v1alpha1.Cluster, error) { 431 return nil, status.Errorf(codes.Unimplemented, "method InvalidateCache not implemented") 432 } 433 434 func RegisterClusterServiceServer(s *grpc.Server, srv ClusterServiceServer) { 435 s.RegisterService(&_ClusterService_serviceDesc, srv) 436 } 437 438 func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 439 in := new(ClusterQuery) 440 if err := dec(in); err != nil { 441 return nil, err 442 } 443 if interceptor == nil { 444 return srv.(ClusterServiceServer).List(ctx, in) 445 } 446 info := &grpc.UnaryServerInfo{ 447 Server: srv, 448 FullMethod: "/cluster.ClusterService/List", 449 } 450 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 451 return srv.(ClusterServiceServer).List(ctx, req.(*ClusterQuery)) 452 } 453 return interceptor(ctx, in, info, handler) 454 } 455 456 func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 457 in := new(ClusterCreateRequest) 458 if err := dec(in); err != nil { 459 return nil, err 460 } 461 if interceptor == nil { 462 return srv.(ClusterServiceServer).Create(ctx, in) 463 } 464 info := &grpc.UnaryServerInfo{ 465 Server: srv, 466 FullMethod: "/cluster.ClusterService/Create", 467 } 468 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 469 return srv.(ClusterServiceServer).Create(ctx, req.(*ClusterCreateRequest)) 470 } 471 return interceptor(ctx, in, info, handler) 472 } 473 474 func _ClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 475 in := new(ClusterQuery) 476 if err := dec(in); err != nil { 477 return nil, err 478 } 479 if interceptor == nil { 480 return srv.(ClusterServiceServer).Get(ctx, in) 481 } 482 info := &grpc.UnaryServerInfo{ 483 Server: srv, 484 FullMethod: "/cluster.ClusterService/Get", 485 } 486 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 487 return srv.(ClusterServiceServer).Get(ctx, req.(*ClusterQuery)) 488 } 489 return interceptor(ctx, in, info, handler) 490 } 491 492 func _ClusterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 493 in := new(ClusterUpdateRequest) 494 if err := dec(in); err != nil { 495 return nil, err 496 } 497 if interceptor == nil { 498 return srv.(ClusterServiceServer).Update(ctx, in) 499 } 500 info := &grpc.UnaryServerInfo{ 501 Server: srv, 502 FullMethod: "/cluster.ClusterService/Update", 503 } 504 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 505 return srv.(ClusterServiceServer).Update(ctx, req.(*ClusterUpdateRequest)) 506 } 507 return interceptor(ctx, in, info, handler) 508 } 509 510 func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 511 in := new(ClusterQuery) 512 if err := dec(in); err != nil { 513 return nil, err 514 } 515 if interceptor == nil { 516 return srv.(ClusterServiceServer).Delete(ctx, in) 517 } 518 info := &grpc.UnaryServerInfo{ 519 Server: srv, 520 FullMethod: "/cluster.ClusterService/Delete", 521 } 522 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 523 return srv.(ClusterServiceServer).Delete(ctx, req.(*ClusterQuery)) 524 } 525 return interceptor(ctx, in, info, handler) 526 } 527 528 func _ClusterService_RotateAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 529 in := new(ClusterQuery) 530 if err := dec(in); err != nil { 531 return nil, err 532 } 533 if interceptor == nil { 534 return srv.(ClusterServiceServer).RotateAuth(ctx, in) 535 } 536 info := &grpc.UnaryServerInfo{ 537 Server: srv, 538 FullMethod: "/cluster.ClusterService/RotateAuth", 539 } 540 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 541 return srv.(ClusterServiceServer).RotateAuth(ctx, req.(*ClusterQuery)) 542 } 543 return interceptor(ctx, in, info, handler) 544 } 545 546 func _ClusterService_InvalidateCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 547 in := new(ClusterQuery) 548 if err := dec(in); err != nil { 549 return nil, err 550 } 551 if interceptor == nil { 552 return srv.(ClusterServiceServer).InvalidateCache(ctx, in) 553 } 554 info := &grpc.UnaryServerInfo{ 555 Server: srv, 556 FullMethod: "/cluster.ClusterService/InvalidateCache", 557 } 558 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 559 return srv.(ClusterServiceServer).InvalidateCache(ctx, req.(*ClusterQuery)) 560 } 561 return interceptor(ctx, in, info, handler) 562 } 563 564 var _ClusterService_serviceDesc = grpc.ServiceDesc{ 565 ServiceName: "cluster.ClusterService", 566 HandlerType: (*ClusterServiceServer)(nil), 567 Methods: []grpc.MethodDesc{ 568 { 569 MethodName: "List", 570 Handler: _ClusterService_List_Handler, 571 }, 572 { 573 MethodName: "Create", 574 Handler: _ClusterService_Create_Handler, 575 }, 576 { 577 MethodName: "Get", 578 Handler: _ClusterService_Get_Handler, 579 }, 580 { 581 MethodName: "Update", 582 Handler: _ClusterService_Update_Handler, 583 }, 584 { 585 MethodName: "Delete", 586 Handler: _ClusterService_Delete_Handler, 587 }, 588 { 589 MethodName: "RotateAuth", 590 Handler: _ClusterService_RotateAuth_Handler, 591 }, 592 { 593 MethodName: "InvalidateCache", 594 Handler: _ClusterService_InvalidateCache_Handler, 595 }, 596 }, 597 Streams: []grpc.StreamDesc{}, 598 Metadata: "server/cluster/cluster.proto", 599 } 600 601 func (m *ClusterQuery) Marshal() (dAtA []byte, err error) { 602 size := m.Size() 603 dAtA = make([]byte, size) 604 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 605 if err != nil { 606 return nil, err 607 } 608 return dAtA[:n], nil 609 } 610 611 func (m *ClusterQuery) MarshalTo(dAtA []byte) (int, error) { 612 size := m.Size() 613 return m.MarshalToSizedBuffer(dAtA[:size]) 614 } 615 616 func (m *ClusterQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { 617 i := len(dAtA) 618 _ = i 619 var l int 620 _ = l 621 if m.XXX_unrecognized != nil { 622 i -= len(m.XXX_unrecognized) 623 copy(dAtA[i:], m.XXX_unrecognized) 624 } 625 if len(m.Name) > 0 { 626 i -= len(m.Name) 627 copy(dAtA[i:], m.Name) 628 i = encodeVarintCluster(dAtA, i, uint64(len(m.Name))) 629 i-- 630 dAtA[i] = 0x12 631 } 632 if len(m.Server) > 0 { 633 i -= len(m.Server) 634 copy(dAtA[i:], m.Server) 635 i = encodeVarintCluster(dAtA, i, uint64(len(m.Server))) 636 i-- 637 dAtA[i] = 0xa 638 } 639 return len(dAtA) - i, nil 640 } 641 642 func (m *ClusterResponse) Marshal() (dAtA []byte, err error) { 643 size := m.Size() 644 dAtA = make([]byte, size) 645 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 646 if err != nil { 647 return nil, err 648 } 649 return dAtA[:n], nil 650 } 651 652 func (m *ClusterResponse) MarshalTo(dAtA []byte) (int, error) { 653 size := m.Size() 654 return m.MarshalToSizedBuffer(dAtA[:size]) 655 } 656 657 func (m *ClusterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 658 i := len(dAtA) 659 _ = i 660 var l int 661 _ = l 662 if m.XXX_unrecognized != nil { 663 i -= len(m.XXX_unrecognized) 664 copy(dAtA[i:], m.XXX_unrecognized) 665 } 666 return len(dAtA) - i, nil 667 } 668 669 func (m *ClusterCreateRequest) Marshal() (dAtA []byte, err error) { 670 size := m.Size() 671 dAtA = make([]byte, size) 672 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 673 if err != nil { 674 return nil, err 675 } 676 return dAtA[:n], nil 677 } 678 679 func (m *ClusterCreateRequest) MarshalTo(dAtA []byte) (int, error) { 680 size := m.Size() 681 return m.MarshalToSizedBuffer(dAtA[:size]) 682 } 683 684 func (m *ClusterCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 685 i := len(dAtA) 686 _ = i 687 var l int 688 _ = l 689 if m.XXX_unrecognized != nil { 690 i -= len(m.XXX_unrecognized) 691 copy(dAtA[i:], m.XXX_unrecognized) 692 } 693 if m.Upsert { 694 i-- 695 if m.Upsert { 696 dAtA[i] = 1 697 } else { 698 dAtA[i] = 0 699 } 700 i-- 701 dAtA[i] = 0x10 702 } 703 if m.Cluster != nil { 704 { 705 size, err := m.Cluster.MarshalToSizedBuffer(dAtA[:i]) 706 if err != nil { 707 return 0, err 708 } 709 i -= size 710 i = encodeVarintCluster(dAtA, i, uint64(size)) 711 } 712 i-- 713 dAtA[i] = 0xa 714 } 715 return len(dAtA) - i, nil 716 } 717 718 func (m *ClusterUpdateRequest) Marshal() (dAtA []byte, err error) { 719 size := m.Size() 720 dAtA = make([]byte, size) 721 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 722 if err != nil { 723 return nil, err 724 } 725 return dAtA[:n], nil 726 } 727 728 func (m *ClusterUpdateRequest) MarshalTo(dAtA []byte) (int, error) { 729 size := m.Size() 730 return m.MarshalToSizedBuffer(dAtA[:size]) 731 } 732 733 func (m *ClusterUpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 734 i := len(dAtA) 735 _ = i 736 var l int 737 _ = l 738 if m.XXX_unrecognized != nil { 739 i -= len(m.XXX_unrecognized) 740 copy(dAtA[i:], m.XXX_unrecognized) 741 } 742 if len(m.UpdatedFields) > 0 { 743 for iNdEx := len(m.UpdatedFields) - 1; iNdEx >= 0; iNdEx-- { 744 i -= len(m.UpdatedFields[iNdEx]) 745 copy(dAtA[i:], m.UpdatedFields[iNdEx]) 746 i = encodeVarintCluster(dAtA, i, uint64(len(m.UpdatedFields[iNdEx]))) 747 i-- 748 dAtA[i] = 0x12 749 } 750 } 751 if m.Cluster != nil { 752 { 753 size, err := m.Cluster.MarshalToSizedBuffer(dAtA[:i]) 754 if err != nil { 755 return 0, err 756 } 757 i -= size 758 i = encodeVarintCluster(dAtA, i, uint64(size)) 759 } 760 i-- 761 dAtA[i] = 0xa 762 } 763 return len(dAtA) - i, nil 764 } 765 766 func encodeVarintCluster(dAtA []byte, offset int, v uint64) int { 767 offset -= sovCluster(v) 768 base := offset 769 for v >= 1<<7 { 770 dAtA[offset] = uint8(v&0x7f | 0x80) 771 v >>= 7 772 offset++ 773 } 774 dAtA[offset] = uint8(v) 775 return base 776 } 777 func (m *ClusterQuery) Size() (n int) { 778 if m == nil { 779 return 0 780 } 781 var l int 782 _ = l 783 l = len(m.Server) 784 if l > 0 { 785 n += 1 + l + sovCluster(uint64(l)) 786 } 787 l = len(m.Name) 788 if l > 0 { 789 n += 1 + l + sovCluster(uint64(l)) 790 } 791 if m.XXX_unrecognized != nil { 792 n += len(m.XXX_unrecognized) 793 } 794 return n 795 } 796 797 func (m *ClusterResponse) Size() (n int) { 798 if m == nil { 799 return 0 800 } 801 var l int 802 _ = l 803 if m.XXX_unrecognized != nil { 804 n += len(m.XXX_unrecognized) 805 } 806 return n 807 } 808 809 func (m *ClusterCreateRequest) Size() (n int) { 810 if m == nil { 811 return 0 812 } 813 var l int 814 _ = l 815 if m.Cluster != nil { 816 l = m.Cluster.Size() 817 n += 1 + l + sovCluster(uint64(l)) 818 } 819 if m.Upsert { 820 n += 2 821 } 822 if m.XXX_unrecognized != nil { 823 n += len(m.XXX_unrecognized) 824 } 825 return n 826 } 827 828 func (m *ClusterUpdateRequest) Size() (n int) { 829 if m == nil { 830 return 0 831 } 832 var l int 833 _ = l 834 if m.Cluster != nil { 835 l = m.Cluster.Size() 836 n += 1 + l + sovCluster(uint64(l)) 837 } 838 if len(m.UpdatedFields) > 0 { 839 for _, s := range m.UpdatedFields { 840 l = len(s) 841 n += 1 + l + sovCluster(uint64(l)) 842 } 843 } 844 if m.XXX_unrecognized != nil { 845 n += len(m.XXX_unrecognized) 846 } 847 return n 848 } 849 850 func sovCluster(x uint64) (n int) { 851 return (math_bits.Len64(x|1) + 6) / 7 852 } 853 func sozCluster(x uint64) (n int) { 854 return sovCluster(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 855 } 856 func (m *ClusterQuery) Unmarshal(dAtA []byte) error { 857 l := len(dAtA) 858 iNdEx := 0 859 for iNdEx < l { 860 preIndex := iNdEx 861 var wire uint64 862 for shift := uint(0); ; shift += 7 { 863 if shift >= 64 { 864 return ErrIntOverflowCluster 865 } 866 if iNdEx >= l { 867 return io.ErrUnexpectedEOF 868 } 869 b := dAtA[iNdEx] 870 iNdEx++ 871 wire |= uint64(b&0x7F) << shift 872 if b < 0x80 { 873 break 874 } 875 } 876 fieldNum := int32(wire >> 3) 877 wireType := int(wire & 0x7) 878 if wireType == 4 { 879 return fmt.Errorf("proto: ClusterQuery: wiretype end group for non-group") 880 } 881 if fieldNum <= 0 { 882 return fmt.Errorf("proto: ClusterQuery: illegal tag %d (wire type %d)", fieldNum, wire) 883 } 884 switch fieldNum { 885 case 1: 886 if wireType != 2 { 887 return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType) 888 } 889 var stringLen uint64 890 for shift := uint(0); ; shift += 7 { 891 if shift >= 64 { 892 return ErrIntOverflowCluster 893 } 894 if iNdEx >= l { 895 return io.ErrUnexpectedEOF 896 } 897 b := dAtA[iNdEx] 898 iNdEx++ 899 stringLen |= uint64(b&0x7F) << shift 900 if b < 0x80 { 901 break 902 } 903 } 904 intStringLen := int(stringLen) 905 if intStringLen < 0 { 906 return ErrInvalidLengthCluster 907 } 908 postIndex := iNdEx + intStringLen 909 if postIndex < 0 { 910 return ErrInvalidLengthCluster 911 } 912 if postIndex > l { 913 return io.ErrUnexpectedEOF 914 } 915 m.Server = string(dAtA[iNdEx:postIndex]) 916 iNdEx = postIndex 917 case 2: 918 if wireType != 2 { 919 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 920 } 921 var stringLen uint64 922 for shift := uint(0); ; shift += 7 { 923 if shift >= 64 { 924 return ErrIntOverflowCluster 925 } 926 if iNdEx >= l { 927 return io.ErrUnexpectedEOF 928 } 929 b := dAtA[iNdEx] 930 iNdEx++ 931 stringLen |= uint64(b&0x7F) << shift 932 if b < 0x80 { 933 break 934 } 935 } 936 intStringLen := int(stringLen) 937 if intStringLen < 0 { 938 return ErrInvalidLengthCluster 939 } 940 postIndex := iNdEx + intStringLen 941 if postIndex < 0 { 942 return ErrInvalidLengthCluster 943 } 944 if postIndex > l { 945 return io.ErrUnexpectedEOF 946 } 947 m.Name = string(dAtA[iNdEx:postIndex]) 948 iNdEx = postIndex 949 default: 950 iNdEx = preIndex 951 skippy, err := skipCluster(dAtA[iNdEx:]) 952 if err != nil { 953 return err 954 } 955 if skippy < 0 { 956 return ErrInvalidLengthCluster 957 } 958 if (iNdEx + skippy) < 0 { 959 return ErrInvalidLengthCluster 960 } 961 if (iNdEx + skippy) > l { 962 return io.ErrUnexpectedEOF 963 } 964 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 965 iNdEx += skippy 966 } 967 } 968 969 if iNdEx > l { 970 return io.ErrUnexpectedEOF 971 } 972 return nil 973 } 974 func (m *ClusterResponse) Unmarshal(dAtA []byte) error { 975 l := len(dAtA) 976 iNdEx := 0 977 for iNdEx < l { 978 preIndex := iNdEx 979 var wire uint64 980 for shift := uint(0); ; shift += 7 { 981 if shift >= 64 { 982 return ErrIntOverflowCluster 983 } 984 if iNdEx >= l { 985 return io.ErrUnexpectedEOF 986 } 987 b := dAtA[iNdEx] 988 iNdEx++ 989 wire |= uint64(b&0x7F) << shift 990 if b < 0x80 { 991 break 992 } 993 } 994 fieldNum := int32(wire >> 3) 995 wireType := int(wire & 0x7) 996 if wireType == 4 { 997 return fmt.Errorf("proto: ClusterResponse: wiretype end group for non-group") 998 } 999 if fieldNum <= 0 { 1000 return fmt.Errorf("proto: ClusterResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1001 } 1002 switch fieldNum { 1003 default: 1004 iNdEx = preIndex 1005 skippy, err := skipCluster(dAtA[iNdEx:]) 1006 if err != nil { 1007 return err 1008 } 1009 if skippy < 0 { 1010 return ErrInvalidLengthCluster 1011 } 1012 if (iNdEx + skippy) < 0 { 1013 return ErrInvalidLengthCluster 1014 } 1015 if (iNdEx + skippy) > l { 1016 return io.ErrUnexpectedEOF 1017 } 1018 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1019 iNdEx += skippy 1020 } 1021 } 1022 1023 if iNdEx > l { 1024 return io.ErrUnexpectedEOF 1025 } 1026 return nil 1027 } 1028 func (m *ClusterCreateRequest) Unmarshal(dAtA []byte) error { 1029 l := len(dAtA) 1030 iNdEx := 0 1031 for iNdEx < l { 1032 preIndex := iNdEx 1033 var wire uint64 1034 for shift := uint(0); ; shift += 7 { 1035 if shift >= 64 { 1036 return ErrIntOverflowCluster 1037 } 1038 if iNdEx >= l { 1039 return io.ErrUnexpectedEOF 1040 } 1041 b := dAtA[iNdEx] 1042 iNdEx++ 1043 wire |= uint64(b&0x7F) << shift 1044 if b < 0x80 { 1045 break 1046 } 1047 } 1048 fieldNum := int32(wire >> 3) 1049 wireType := int(wire & 0x7) 1050 if wireType == 4 { 1051 return fmt.Errorf("proto: ClusterCreateRequest: wiretype end group for non-group") 1052 } 1053 if fieldNum <= 0 { 1054 return fmt.Errorf("proto: ClusterCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1055 } 1056 switch fieldNum { 1057 case 1: 1058 if wireType != 2 { 1059 return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) 1060 } 1061 var msglen int 1062 for shift := uint(0); ; shift += 7 { 1063 if shift >= 64 { 1064 return ErrIntOverflowCluster 1065 } 1066 if iNdEx >= l { 1067 return io.ErrUnexpectedEOF 1068 } 1069 b := dAtA[iNdEx] 1070 iNdEx++ 1071 msglen |= int(b&0x7F) << shift 1072 if b < 0x80 { 1073 break 1074 } 1075 } 1076 if msglen < 0 { 1077 return ErrInvalidLengthCluster 1078 } 1079 postIndex := iNdEx + msglen 1080 if postIndex < 0 { 1081 return ErrInvalidLengthCluster 1082 } 1083 if postIndex > l { 1084 return io.ErrUnexpectedEOF 1085 } 1086 if m.Cluster == nil { 1087 m.Cluster = &v1alpha1.Cluster{} 1088 } 1089 if err := m.Cluster.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1090 return err 1091 } 1092 iNdEx = postIndex 1093 case 2: 1094 if wireType != 0 { 1095 return fmt.Errorf("proto: wrong wireType = %d for field Upsert", wireType) 1096 } 1097 var v int 1098 for shift := uint(0); ; shift += 7 { 1099 if shift >= 64 { 1100 return ErrIntOverflowCluster 1101 } 1102 if iNdEx >= l { 1103 return io.ErrUnexpectedEOF 1104 } 1105 b := dAtA[iNdEx] 1106 iNdEx++ 1107 v |= int(b&0x7F) << shift 1108 if b < 0x80 { 1109 break 1110 } 1111 } 1112 m.Upsert = bool(v != 0) 1113 default: 1114 iNdEx = preIndex 1115 skippy, err := skipCluster(dAtA[iNdEx:]) 1116 if err != nil { 1117 return err 1118 } 1119 if skippy < 0 { 1120 return ErrInvalidLengthCluster 1121 } 1122 if (iNdEx + skippy) < 0 { 1123 return ErrInvalidLengthCluster 1124 } 1125 if (iNdEx + skippy) > l { 1126 return io.ErrUnexpectedEOF 1127 } 1128 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1129 iNdEx += skippy 1130 } 1131 } 1132 1133 if iNdEx > l { 1134 return io.ErrUnexpectedEOF 1135 } 1136 return nil 1137 } 1138 func (m *ClusterUpdateRequest) Unmarshal(dAtA []byte) error { 1139 l := len(dAtA) 1140 iNdEx := 0 1141 for iNdEx < l { 1142 preIndex := iNdEx 1143 var wire uint64 1144 for shift := uint(0); ; shift += 7 { 1145 if shift >= 64 { 1146 return ErrIntOverflowCluster 1147 } 1148 if iNdEx >= l { 1149 return io.ErrUnexpectedEOF 1150 } 1151 b := dAtA[iNdEx] 1152 iNdEx++ 1153 wire |= uint64(b&0x7F) << shift 1154 if b < 0x80 { 1155 break 1156 } 1157 } 1158 fieldNum := int32(wire >> 3) 1159 wireType := int(wire & 0x7) 1160 if wireType == 4 { 1161 return fmt.Errorf("proto: ClusterUpdateRequest: wiretype end group for non-group") 1162 } 1163 if fieldNum <= 0 { 1164 return fmt.Errorf("proto: ClusterUpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1165 } 1166 switch fieldNum { 1167 case 1: 1168 if wireType != 2 { 1169 return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) 1170 } 1171 var msglen int 1172 for shift := uint(0); ; shift += 7 { 1173 if shift >= 64 { 1174 return ErrIntOverflowCluster 1175 } 1176 if iNdEx >= l { 1177 return io.ErrUnexpectedEOF 1178 } 1179 b := dAtA[iNdEx] 1180 iNdEx++ 1181 msglen |= int(b&0x7F) << shift 1182 if b < 0x80 { 1183 break 1184 } 1185 } 1186 if msglen < 0 { 1187 return ErrInvalidLengthCluster 1188 } 1189 postIndex := iNdEx + msglen 1190 if postIndex < 0 { 1191 return ErrInvalidLengthCluster 1192 } 1193 if postIndex > l { 1194 return io.ErrUnexpectedEOF 1195 } 1196 if m.Cluster == nil { 1197 m.Cluster = &v1alpha1.Cluster{} 1198 } 1199 if err := m.Cluster.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1200 return err 1201 } 1202 iNdEx = postIndex 1203 case 2: 1204 if wireType != 2 { 1205 return fmt.Errorf("proto: wrong wireType = %d for field UpdatedFields", wireType) 1206 } 1207 var stringLen uint64 1208 for shift := uint(0); ; shift += 7 { 1209 if shift >= 64 { 1210 return ErrIntOverflowCluster 1211 } 1212 if iNdEx >= l { 1213 return io.ErrUnexpectedEOF 1214 } 1215 b := dAtA[iNdEx] 1216 iNdEx++ 1217 stringLen |= uint64(b&0x7F) << shift 1218 if b < 0x80 { 1219 break 1220 } 1221 } 1222 intStringLen := int(stringLen) 1223 if intStringLen < 0 { 1224 return ErrInvalidLengthCluster 1225 } 1226 postIndex := iNdEx + intStringLen 1227 if postIndex < 0 { 1228 return ErrInvalidLengthCluster 1229 } 1230 if postIndex > l { 1231 return io.ErrUnexpectedEOF 1232 } 1233 m.UpdatedFields = append(m.UpdatedFields, string(dAtA[iNdEx:postIndex])) 1234 iNdEx = postIndex 1235 default: 1236 iNdEx = preIndex 1237 skippy, err := skipCluster(dAtA[iNdEx:]) 1238 if err != nil { 1239 return err 1240 } 1241 if skippy < 0 { 1242 return ErrInvalidLengthCluster 1243 } 1244 if (iNdEx + skippy) < 0 { 1245 return ErrInvalidLengthCluster 1246 } 1247 if (iNdEx + skippy) > l { 1248 return io.ErrUnexpectedEOF 1249 } 1250 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1251 iNdEx += skippy 1252 } 1253 } 1254 1255 if iNdEx > l { 1256 return io.ErrUnexpectedEOF 1257 } 1258 return nil 1259 } 1260 func skipCluster(dAtA []byte) (n int, err error) { 1261 l := len(dAtA) 1262 iNdEx := 0 1263 depth := 0 1264 for iNdEx < l { 1265 var wire uint64 1266 for shift := uint(0); ; shift += 7 { 1267 if shift >= 64 { 1268 return 0, ErrIntOverflowCluster 1269 } 1270 if iNdEx >= l { 1271 return 0, io.ErrUnexpectedEOF 1272 } 1273 b := dAtA[iNdEx] 1274 iNdEx++ 1275 wire |= (uint64(b) & 0x7F) << shift 1276 if b < 0x80 { 1277 break 1278 } 1279 } 1280 wireType := int(wire & 0x7) 1281 switch wireType { 1282 case 0: 1283 for shift := uint(0); ; shift += 7 { 1284 if shift >= 64 { 1285 return 0, ErrIntOverflowCluster 1286 } 1287 if iNdEx >= l { 1288 return 0, io.ErrUnexpectedEOF 1289 } 1290 iNdEx++ 1291 if dAtA[iNdEx-1] < 0x80 { 1292 break 1293 } 1294 } 1295 case 1: 1296 iNdEx += 8 1297 case 2: 1298 var length int 1299 for shift := uint(0); ; shift += 7 { 1300 if shift >= 64 { 1301 return 0, ErrIntOverflowCluster 1302 } 1303 if iNdEx >= l { 1304 return 0, io.ErrUnexpectedEOF 1305 } 1306 b := dAtA[iNdEx] 1307 iNdEx++ 1308 length |= (int(b) & 0x7F) << shift 1309 if b < 0x80 { 1310 break 1311 } 1312 } 1313 if length < 0 { 1314 return 0, ErrInvalidLengthCluster 1315 } 1316 iNdEx += length 1317 case 3: 1318 depth++ 1319 case 4: 1320 if depth == 0 { 1321 return 0, ErrUnexpectedEndOfGroupCluster 1322 } 1323 depth-- 1324 case 5: 1325 iNdEx += 4 1326 default: 1327 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1328 } 1329 if iNdEx < 0 { 1330 return 0, ErrInvalidLengthCluster 1331 } 1332 if depth == 0 { 1333 return iNdEx, nil 1334 } 1335 } 1336 return 0, io.ErrUnexpectedEOF 1337 } 1338 1339 var ( 1340 ErrInvalidLengthCluster = fmt.Errorf("proto: negative length found during unmarshaling") 1341 ErrIntOverflowCluster = fmt.Errorf("proto: integer overflow") 1342 ErrUnexpectedEndOfGroupCluster = fmt.Errorf("proto: unexpected end of group") 1343 )