github.com/mre-fog/trillianxx@v1.1.2-0.20180615153820-ae375a99d36a/quota/etcd/quotapb/quotapb.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: quotapb.proto 3 4 /* 5 Package quotapb is a generated protocol buffer package. 6 7 It is generated from these files: 8 quotapb.proto 9 10 It has these top-level messages: 11 Config 12 SequencingBasedStrategy 13 TimeBasedStrategy 14 CreateConfigRequest 15 DeleteConfigRequest 16 GetConfigRequest 17 ListConfigsRequest 18 ListConfigsResponse 19 UpdateConfigRequest 20 */ 21 package quotapb 22 23 import proto "github.com/golang/protobuf/proto" 24 import fmt "fmt" 25 import math "math" 26 import _ "google.golang.org/genproto/googleapis/api/annotations" 27 import google_protobuf1 "github.com/golang/protobuf/ptypes/empty" 28 import google_protobuf2 "google.golang.org/genproto/protobuf/field_mask" 29 30 import ( 31 context "golang.org/x/net/context" 32 grpc "google.golang.org/grpc" 33 ) 34 35 // Reference imports to suppress errors if they are not otherwise used. 36 var _ = proto.Marshal 37 var _ = fmt.Errorf 38 var _ = math.Inf 39 40 // This is a compile-time assertion to ensure that this generated file 41 // is compatible with the proto package it is being compiled against. 42 // A compilation error at this line likely means your copy of the 43 // proto package needs to be updated. 44 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 45 46 // Possible states of a quota configuration. 47 type Config_State int32 48 49 const ( 50 // Unknown quota state. Invalid. 51 Config_UNKNOWN_CONFIG_STATE Config_State = 0 52 // Quota is enabled. 53 Config_ENABLED Config_State = 1 54 // Quota is disabled (considered infinite). 55 Config_DISABLED Config_State = 2 56 ) 57 58 var Config_State_name = map[int32]string{ 59 0: "UNKNOWN_CONFIG_STATE", 60 1: "ENABLED", 61 2: "DISABLED", 62 } 63 var Config_State_value = map[string]int32{ 64 "UNKNOWN_CONFIG_STATE": 0, 65 "ENABLED": 1, 66 "DISABLED": 2, 67 } 68 69 func (x Config_State) String() string { 70 return proto.EnumName(Config_State_name, int32(x)) 71 } 72 func (Config_State) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } 73 74 // Possible views for ListConfig. 75 type ListConfigsRequest_ListView int32 76 77 const ( 78 // Only the Config name gets returned. 79 ListConfigsRequest_BASIC ListConfigsRequest_ListView = 0 80 // Complete Config. 81 ListConfigsRequest_FULL ListConfigsRequest_ListView = 1 82 ) 83 84 var ListConfigsRequest_ListView_name = map[int32]string{ 85 0: "BASIC", 86 1: "FULL", 87 } 88 var ListConfigsRequest_ListView_value = map[string]int32{ 89 "BASIC": 0, 90 "FULL": 1, 91 } 92 93 func (x ListConfigsRequest_ListView) String() string { 94 return proto.EnumName(ListConfigsRequest_ListView_name, int32(x)) 95 } 96 func (ListConfigsRequest_ListView) EnumDescriptor() ([]byte, []int) { 97 return fileDescriptor0, []int{6, 0} 98 } 99 100 // Configuration of a quota. 101 // 102 // Quotas contain a certain number of tokens that get applied to their 103 // corresponding entities. Global quotas apply to all operations, tree and user 104 // quotas to certain trees and users, respectively. 105 // 106 // Performing an operation costs a certain number of tokens (usually one). Once 107 // a quota has no more tokens available, requests that would subtract from it 108 // are denied with a resource_exhausted error. 109 // 110 // Tokens may be replenished in two different ways: either by passage of time or 111 // sequencing progress. Time-based replenishment adds a fixed amount of tokens 112 // after a certain interval. Sequencing-based adds a token for each leaf 113 // processed by the sequencer. Sequencing-based replenishment may only be used 114 // with global and tree quotas. 115 // 116 // A quota may be disabled or removed at any time. The effect is the same: a 117 // disabled or non-existing quota is considered infinite by the quota system. 118 // (Disabling is handy if you plan to re-enable a quota later on.) 119 type Config struct { 120 // Name of the config, eg, "quotas/trees/1234/read/config". 121 // Readonly. 122 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 123 // State of the config. 124 State Config_State `protobuf:"varint,2,opt,name=state,enum=quotapb.Config_State" json:"state,omitempty"` 125 // Max number of tokens available for the config. 126 MaxTokens int64 `protobuf:"varint,3,opt,name=max_tokens,json=maxTokens" json:"max_tokens,omitempty"` 127 // Replenishment strategy used by the config. 128 // 129 // Types that are valid to be assigned to ReplenishmentStrategy: 130 // *Config_SequencingBased 131 // *Config_TimeBased 132 ReplenishmentStrategy isConfig_ReplenishmentStrategy `protobuf_oneof:"replenishment_strategy"` 133 // Current number of tokens available for the config. 134 // May be higher than max_tokens for DISABLED configs, which are considered to 135 // have "infinite" tokens. 136 // Readonly. 137 CurrentTokens int64 `protobuf:"varint,6,opt,name=current_tokens,json=currentTokens" json:"current_tokens,omitempty"` 138 } 139 140 func (m *Config) Reset() { *m = Config{} } 141 func (m *Config) String() string { return proto.CompactTextString(m) } 142 func (*Config) ProtoMessage() {} 143 func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } 144 145 type isConfig_ReplenishmentStrategy interface { 146 isConfig_ReplenishmentStrategy() 147 } 148 149 type Config_SequencingBased struct { 150 SequencingBased *SequencingBasedStrategy `protobuf:"bytes,4,opt,name=sequencing_based,json=sequencingBased,oneof"` 151 } 152 type Config_TimeBased struct { 153 TimeBased *TimeBasedStrategy `protobuf:"bytes,5,opt,name=time_based,json=timeBased,oneof"` 154 } 155 156 func (*Config_SequencingBased) isConfig_ReplenishmentStrategy() {} 157 func (*Config_TimeBased) isConfig_ReplenishmentStrategy() {} 158 159 func (m *Config) GetReplenishmentStrategy() isConfig_ReplenishmentStrategy { 160 if m != nil { 161 return m.ReplenishmentStrategy 162 } 163 return nil 164 } 165 166 func (m *Config) GetName() string { 167 if m != nil { 168 return m.Name 169 } 170 return "" 171 } 172 173 func (m *Config) GetState() Config_State { 174 if m != nil { 175 return m.State 176 } 177 return Config_UNKNOWN_CONFIG_STATE 178 } 179 180 func (m *Config) GetMaxTokens() int64 { 181 if m != nil { 182 return m.MaxTokens 183 } 184 return 0 185 } 186 187 func (m *Config) GetSequencingBased() *SequencingBasedStrategy { 188 if x, ok := m.GetReplenishmentStrategy().(*Config_SequencingBased); ok { 189 return x.SequencingBased 190 } 191 return nil 192 } 193 194 func (m *Config) GetTimeBased() *TimeBasedStrategy { 195 if x, ok := m.GetReplenishmentStrategy().(*Config_TimeBased); ok { 196 return x.TimeBased 197 } 198 return nil 199 } 200 201 func (m *Config) GetCurrentTokens() int64 { 202 if m != nil { 203 return m.CurrentTokens 204 } 205 return 0 206 } 207 208 // XXX_OneofFuncs is for the internal use of the proto package. 209 func (*Config) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { 210 return _Config_OneofMarshaler, _Config_OneofUnmarshaler, _Config_OneofSizer, []interface{}{ 211 (*Config_SequencingBased)(nil), 212 (*Config_TimeBased)(nil), 213 } 214 } 215 216 func _Config_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { 217 m := msg.(*Config) 218 // replenishment_strategy 219 switch x := m.ReplenishmentStrategy.(type) { 220 case *Config_SequencingBased: 221 b.EncodeVarint(4<<3 | proto.WireBytes) 222 if err := b.EncodeMessage(x.SequencingBased); err != nil { 223 return err 224 } 225 case *Config_TimeBased: 226 b.EncodeVarint(5<<3 | proto.WireBytes) 227 if err := b.EncodeMessage(x.TimeBased); err != nil { 228 return err 229 } 230 case nil: 231 default: 232 return fmt.Errorf("Config.ReplenishmentStrategy has unexpected type %T", x) 233 } 234 return nil 235 } 236 237 func _Config_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { 238 m := msg.(*Config) 239 switch tag { 240 case 4: // replenishment_strategy.sequencing_based 241 if wire != proto.WireBytes { 242 return true, proto.ErrInternalBadWireType 243 } 244 msg := new(SequencingBasedStrategy) 245 err := b.DecodeMessage(msg) 246 m.ReplenishmentStrategy = &Config_SequencingBased{msg} 247 return true, err 248 case 5: // replenishment_strategy.time_based 249 if wire != proto.WireBytes { 250 return true, proto.ErrInternalBadWireType 251 } 252 msg := new(TimeBasedStrategy) 253 err := b.DecodeMessage(msg) 254 m.ReplenishmentStrategy = &Config_TimeBased{msg} 255 return true, err 256 default: 257 return false, nil 258 } 259 } 260 261 func _Config_OneofSizer(msg proto.Message) (n int) { 262 m := msg.(*Config) 263 // replenishment_strategy 264 switch x := m.ReplenishmentStrategy.(type) { 265 case *Config_SequencingBased: 266 s := proto.Size(x.SequencingBased) 267 n += proto.SizeVarint(4<<3 | proto.WireBytes) 268 n += proto.SizeVarint(uint64(s)) 269 n += s 270 case *Config_TimeBased: 271 s := proto.Size(x.TimeBased) 272 n += proto.SizeVarint(5<<3 | proto.WireBytes) 273 n += proto.SizeVarint(uint64(s)) 274 n += s 275 case nil: 276 default: 277 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) 278 } 279 return n 280 } 281 282 // Sequencing-based replenishment strategy settings. 283 // 284 // Only global/write and trees/write quotas may use sequencing-based 285 // replenishment. 286 type SequencingBasedStrategy struct { 287 } 288 289 func (m *SequencingBasedStrategy) Reset() { *m = SequencingBasedStrategy{} } 290 func (m *SequencingBasedStrategy) String() string { return proto.CompactTextString(m) } 291 func (*SequencingBasedStrategy) ProtoMessage() {} 292 func (*SequencingBasedStrategy) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } 293 294 // Time-based replenishment strategy settings. 295 type TimeBasedStrategy struct { 296 // Number of tokens to replenish at every replenish_interval_seconds. 297 TokensToReplenish int64 `protobuf:"varint,1,opt,name=tokens_to_replenish,json=tokensToReplenish" json:"tokens_to_replenish,omitempty"` 298 // Interval at which tokens_to_replenish get replenished. 299 ReplenishIntervalSeconds int64 `protobuf:"varint,2,opt,name=replenish_interval_seconds,json=replenishIntervalSeconds" json:"replenish_interval_seconds,omitempty"` 300 } 301 302 func (m *TimeBasedStrategy) Reset() { *m = TimeBasedStrategy{} } 303 func (m *TimeBasedStrategy) String() string { return proto.CompactTextString(m) } 304 func (*TimeBasedStrategy) ProtoMessage() {} 305 func (*TimeBasedStrategy) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } 306 307 func (m *TimeBasedStrategy) GetTokensToReplenish() int64 { 308 if m != nil { 309 return m.TokensToReplenish 310 } 311 return 0 312 } 313 314 func (m *TimeBasedStrategy) GetReplenishIntervalSeconds() int64 { 315 if m != nil { 316 return m.ReplenishIntervalSeconds 317 } 318 return 0 319 } 320 321 // CreateConfig request. 322 type CreateConfigRequest struct { 323 // Name of the config to create. 324 // For example, "quotas/global/read/config" (global/read quota) or 325 // "quotas/trees/1234/write/config" (write quota for tree 1234). 326 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 327 // Config to be created. 328 Config *Config `protobuf:"bytes,2,opt,name=config" json:"config,omitempty"` 329 } 330 331 func (m *CreateConfigRequest) Reset() { *m = CreateConfigRequest{} } 332 func (m *CreateConfigRequest) String() string { return proto.CompactTextString(m) } 333 func (*CreateConfigRequest) ProtoMessage() {} 334 func (*CreateConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } 335 336 func (m *CreateConfigRequest) GetName() string { 337 if m != nil { 338 return m.Name 339 } 340 return "" 341 } 342 343 func (m *CreateConfigRequest) GetConfig() *Config { 344 if m != nil { 345 return m.Config 346 } 347 return nil 348 } 349 350 // DeleteConfig request. 351 type DeleteConfigRequest struct { 352 // Name of the config to delete. 353 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 354 } 355 356 func (m *DeleteConfigRequest) Reset() { *m = DeleteConfigRequest{} } 357 func (m *DeleteConfigRequest) String() string { return proto.CompactTextString(m) } 358 func (*DeleteConfigRequest) ProtoMessage() {} 359 func (*DeleteConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } 360 361 func (m *DeleteConfigRequest) GetName() string { 362 if m != nil { 363 return m.Name 364 } 365 return "" 366 } 367 368 // GetConfig request. 369 type GetConfigRequest struct { 370 // Name of the config to retrieve. 371 // For example, "quotas/global/read/config". 372 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 373 } 374 375 func (m *GetConfigRequest) Reset() { *m = GetConfigRequest{} } 376 func (m *GetConfigRequest) String() string { return proto.CompactTextString(m) } 377 func (*GetConfigRequest) ProtoMessage() {} 378 func (*GetConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } 379 380 func (m *GetConfigRequest) GetName() string { 381 if m != nil { 382 return m.Name 383 } 384 return "" 385 } 386 387 // ListConfig request. 388 type ListConfigsRequest struct { 389 // Names of the config to retrieve. For example, "quotas/global/read/config". 390 // If empty, all configs are listed. 391 // Name components may be substituted by "-" to search for all variations of 392 // that component. For example: 393 // - "quotas/global/-/config" (both read and write global quotas) 394 // - "quotas/trees/-/-/config" (all tree quotas) 395 Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"` 396 // View specifies how much data to return. 397 View ListConfigsRequest_ListView `protobuf:"varint,2,opt,name=view,enum=quotapb.ListConfigsRequest_ListView" json:"view,omitempty"` 398 } 399 400 func (m *ListConfigsRequest) Reset() { *m = ListConfigsRequest{} } 401 func (m *ListConfigsRequest) String() string { return proto.CompactTextString(m) } 402 func (*ListConfigsRequest) ProtoMessage() {} 403 func (*ListConfigsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } 404 405 func (m *ListConfigsRequest) GetNames() []string { 406 if m != nil { 407 return m.Names 408 } 409 return nil 410 } 411 412 func (m *ListConfigsRequest) GetView() ListConfigsRequest_ListView { 413 if m != nil { 414 return m.View 415 } 416 return ListConfigsRequest_BASIC 417 } 418 419 // ListConfig response. 420 type ListConfigsResponse struct { 421 // Configs matching the request filter. 422 Configs []*Config `protobuf:"bytes,1,rep,name=configs" json:"configs,omitempty"` 423 } 424 425 func (m *ListConfigsResponse) Reset() { *m = ListConfigsResponse{} } 426 func (m *ListConfigsResponse) String() string { return proto.CompactTextString(m) } 427 func (*ListConfigsResponse) ProtoMessage() {} 428 func (*ListConfigsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } 429 430 func (m *ListConfigsResponse) GetConfigs() []*Config { 431 if m != nil { 432 return m.Configs 433 } 434 return nil 435 } 436 437 // Updates a quota config according to the update_mask provided. 438 // 439 // Some config changes will cause the current number of tokens to be updated, as 440 // listed below: 441 // 442 // * If max_tokens is reduced and the current number of tokens is greater than 443 // the new max_tokens, the current number of tokens is reduced to max_tokens. 444 // This happens so the quota is immediately conformant to the new 445 // configuration. 446 // 447 // * A state transition from disabled to enabled causes the quota to be fully 448 // replenished. This happens so the re-enabled quota will enter in action in a 449 // known, predictable state. 450 // 451 // A "full replenish", also called "reset", may be forced via the reset_quota 452 // parameter, regardless of any other changes. For convenience, reset only 453 // requests (name and reset_quota = true) are allowed. 454 type UpdateConfigRequest struct { 455 // Name of the config to update. 456 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 457 // Config to update. Only the fields specified by update_mask need to be 458 // filled. 459 Config *Config `protobuf:"bytes,2,opt,name=config" json:"config,omitempty"` 460 // Fields modified by the update request. 461 // For example: "state" or "max_tokens". 462 UpdateMask *google_protobuf2.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"` 463 // If true the updated quota is reset, regardless of the update's contents. 464 // A reset quota is replenished to its maximum number of tokens. 465 ResetQuota bool `protobuf:"varint,4,opt,name=reset_quota,json=resetQuota" json:"reset_quota,omitempty"` 466 } 467 468 func (m *UpdateConfigRequest) Reset() { *m = UpdateConfigRequest{} } 469 func (m *UpdateConfigRequest) String() string { return proto.CompactTextString(m) } 470 func (*UpdateConfigRequest) ProtoMessage() {} 471 func (*UpdateConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } 472 473 func (m *UpdateConfigRequest) GetName() string { 474 if m != nil { 475 return m.Name 476 } 477 return "" 478 } 479 480 func (m *UpdateConfigRequest) GetConfig() *Config { 481 if m != nil { 482 return m.Config 483 } 484 return nil 485 } 486 487 func (m *UpdateConfigRequest) GetUpdateMask() *google_protobuf2.FieldMask { 488 if m != nil { 489 return m.UpdateMask 490 } 491 return nil 492 } 493 494 func (m *UpdateConfigRequest) GetResetQuota() bool { 495 if m != nil { 496 return m.ResetQuota 497 } 498 return false 499 } 500 501 func init() { 502 proto.RegisterType((*Config)(nil), "quotapb.Config") 503 proto.RegisterType((*SequencingBasedStrategy)(nil), "quotapb.SequencingBasedStrategy") 504 proto.RegisterType((*TimeBasedStrategy)(nil), "quotapb.TimeBasedStrategy") 505 proto.RegisterType((*CreateConfigRequest)(nil), "quotapb.CreateConfigRequest") 506 proto.RegisterType((*DeleteConfigRequest)(nil), "quotapb.DeleteConfigRequest") 507 proto.RegisterType((*GetConfigRequest)(nil), "quotapb.GetConfigRequest") 508 proto.RegisterType((*ListConfigsRequest)(nil), "quotapb.ListConfigsRequest") 509 proto.RegisterType((*ListConfigsResponse)(nil), "quotapb.ListConfigsResponse") 510 proto.RegisterType((*UpdateConfigRequest)(nil), "quotapb.UpdateConfigRequest") 511 proto.RegisterEnum("quotapb.Config_State", Config_State_name, Config_State_value) 512 proto.RegisterEnum("quotapb.ListConfigsRequest_ListView", ListConfigsRequest_ListView_name, ListConfigsRequest_ListView_value) 513 } 514 515 // Reference imports to suppress errors if they are not otherwise used. 516 var _ context.Context 517 var _ grpc.ClientConn 518 519 // This is a compile-time assertion to ensure that this generated file 520 // is compatible with the grpc package it is being compiled against. 521 const _ = grpc.SupportPackageIsVersion4 522 523 // Client API for Quota service 524 525 type QuotaClient interface { 526 // Creates a new quota. 527 CreateConfig(ctx context.Context, in *CreateConfigRequest, opts ...grpc.CallOption) (*Config, error) 528 // Deletes an existing quota. Non-existing quotas are considered infinite by 529 // the quota system. 530 DeleteConfig(ctx context.Context, in *DeleteConfigRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) 531 // Retrieves a quota by name. 532 GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*Config, error) 533 // Lists quotas according to the specified criteria. 534 ListConfigs(ctx context.Context, in *ListConfigsRequest, opts ...grpc.CallOption) (*ListConfigsResponse, error) 535 // Updates a quota. 536 UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*Config, error) 537 } 538 539 type quotaClient struct { 540 cc *grpc.ClientConn 541 } 542 543 func NewQuotaClient(cc *grpc.ClientConn) QuotaClient { 544 return "aClient{cc} 545 } 546 547 func (c *quotaClient) CreateConfig(ctx context.Context, in *CreateConfigRequest, opts ...grpc.CallOption) (*Config, error) { 548 out := new(Config) 549 err := grpc.Invoke(ctx, "/quotapb.Quota/CreateConfig", in, out, c.cc, opts...) 550 if err != nil { 551 return nil, err 552 } 553 return out, nil 554 } 555 556 func (c *quotaClient) DeleteConfig(ctx context.Context, in *DeleteConfigRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { 557 out := new(google_protobuf1.Empty) 558 err := grpc.Invoke(ctx, "/quotapb.Quota/DeleteConfig", in, out, c.cc, opts...) 559 if err != nil { 560 return nil, err 561 } 562 return out, nil 563 } 564 565 func (c *quotaClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*Config, error) { 566 out := new(Config) 567 err := grpc.Invoke(ctx, "/quotapb.Quota/GetConfig", in, out, c.cc, opts...) 568 if err != nil { 569 return nil, err 570 } 571 return out, nil 572 } 573 574 func (c *quotaClient) ListConfigs(ctx context.Context, in *ListConfigsRequest, opts ...grpc.CallOption) (*ListConfigsResponse, error) { 575 out := new(ListConfigsResponse) 576 err := grpc.Invoke(ctx, "/quotapb.Quota/ListConfigs", in, out, c.cc, opts...) 577 if err != nil { 578 return nil, err 579 } 580 return out, nil 581 } 582 583 func (c *quotaClient) UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*Config, error) { 584 out := new(Config) 585 err := grpc.Invoke(ctx, "/quotapb.Quota/UpdateConfig", in, out, c.cc, opts...) 586 if err != nil { 587 return nil, err 588 } 589 return out, nil 590 } 591 592 // Server API for Quota service 593 594 type QuotaServer interface { 595 // Creates a new quota. 596 CreateConfig(context.Context, *CreateConfigRequest) (*Config, error) 597 // Deletes an existing quota. Non-existing quotas are considered infinite by 598 // the quota system. 599 DeleteConfig(context.Context, *DeleteConfigRequest) (*google_protobuf1.Empty, error) 600 // Retrieves a quota by name. 601 GetConfig(context.Context, *GetConfigRequest) (*Config, error) 602 // Lists quotas according to the specified criteria. 603 ListConfigs(context.Context, *ListConfigsRequest) (*ListConfigsResponse, error) 604 // Updates a quota. 605 UpdateConfig(context.Context, *UpdateConfigRequest) (*Config, error) 606 } 607 608 func RegisterQuotaServer(s *grpc.Server, srv QuotaServer) { 609 s.RegisterService(&_Quota_serviceDesc, srv) 610 } 611 612 func _Quota_CreateConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 613 in := new(CreateConfigRequest) 614 if err := dec(in); err != nil { 615 return nil, err 616 } 617 if interceptor == nil { 618 return srv.(QuotaServer).CreateConfig(ctx, in) 619 } 620 info := &grpc.UnaryServerInfo{ 621 Server: srv, 622 FullMethod: "/quotapb.Quota/CreateConfig", 623 } 624 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 625 return srv.(QuotaServer).CreateConfig(ctx, req.(*CreateConfigRequest)) 626 } 627 return interceptor(ctx, in, info, handler) 628 } 629 630 func _Quota_DeleteConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 631 in := new(DeleteConfigRequest) 632 if err := dec(in); err != nil { 633 return nil, err 634 } 635 if interceptor == nil { 636 return srv.(QuotaServer).DeleteConfig(ctx, in) 637 } 638 info := &grpc.UnaryServerInfo{ 639 Server: srv, 640 FullMethod: "/quotapb.Quota/DeleteConfig", 641 } 642 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 643 return srv.(QuotaServer).DeleteConfig(ctx, req.(*DeleteConfigRequest)) 644 } 645 return interceptor(ctx, in, info, handler) 646 } 647 648 func _Quota_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 649 in := new(GetConfigRequest) 650 if err := dec(in); err != nil { 651 return nil, err 652 } 653 if interceptor == nil { 654 return srv.(QuotaServer).GetConfig(ctx, in) 655 } 656 info := &grpc.UnaryServerInfo{ 657 Server: srv, 658 FullMethod: "/quotapb.Quota/GetConfig", 659 } 660 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 661 return srv.(QuotaServer).GetConfig(ctx, req.(*GetConfigRequest)) 662 } 663 return interceptor(ctx, in, info, handler) 664 } 665 666 func _Quota_ListConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 667 in := new(ListConfigsRequest) 668 if err := dec(in); err != nil { 669 return nil, err 670 } 671 if interceptor == nil { 672 return srv.(QuotaServer).ListConfigs(ctx, in) 673 } 674 info := &grpc.UnaryServerInfo{ 675 Server: srv, 676 FullMethod: "/quotapb.Quota/ListConfigs", 677 } 678 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 679 return srv.(QuotaServer).ListConfigs(ctx, req.(*ListConfigsRequest)) 680 } 681 return interceptor(ctx, in, info, handler) 682 } 683 684 func _Quota_UpdateConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 685 in := new(UpdateConfigRequest) 686 if err := dec(in); err != nil { 687 return nil, err 688 } 689 if interceptor == nil { 690 return srv.(QuotaServer).UpdateConfig(ctx, in) 691 } 692 info := &grpc.UnaryServerInfo{ 693 Server: srv, 694 FullMethod: "/quotapb.Quota/UpdateConfig", 695 } 696 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 697 return srv.(QuotaServer).UpdateConfig(ctx, req.(*UpdateConfigRequest)) 698 } 699 return interceptor(ctx, in, info, handler) 700 } 701 702 var _Quota_serviceDesc = grpc.ServiceDesc{ 703 ServiceName: "quotapb.Quota", 704 HandlerType: (*QuotaServer)(nil), 705 Methods: []grpc.MethodDesc{ 706 { 707 MethodName: "CreateConfig", 708 Handler: _Quota_CreateConfig_Handler, 709 }, 710 { 711 MethodName: "DeleteConfig", 712 Handler: _Quota_DeleteConfig_Handler, 713 }, 714 { 715 MethodName: "GetConfig", 716 Handler: _Quota_GetConfig_Handler, 717 }, 718 { 719 MethodName: "ListConfigs", 720 Handler: _Quota_ListConfigs_Handler, 721 }, 722 { 723 MethodName: "UpdateConfig", 724 Handler: _Quota_UpdateConfig_Handler, 725 }, 726 }, 727 Streams: []grpc.StreamDesc{}, 728 Metadata: "quotapb.proto", 729 } 730 731 func init() { proto.RegisterFile("quotapb.proto", fileDescriptor0) } 732 733 var fileDescriptor0 = []byte{ 734 // 759 bytes of a gzipped FileDescriptorProto 735 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xdd, 0x4e, 0x13, 0x41, 736 0x18, 0x65, 0xfb, 0x47, 0xfb, 0x95, 0x9f, 0x32, 0x45, 0x58, 0x0a, 0x86, 0xcd, 0x46, 0xb4, 0x94, 737 0xa4, 0x0d, 0xf5, 0xc6, 0x08, 0x26, 0xd2, 0x52, 0xb0, 0xb1, 0x94, 0xb8, 0x2d, 0x7a, 0xb9, 0x99, 738 0xb6, 0x43, 0x5d, 0xe9, 0xee, 0x96, 0x9d, 0x29, 0x3f, 0x31, 0x5e, 0x68, 0xe2, 0x13, 0x18, 0xdf, 739 0xc3, 0x77, 0xf1, 0x15, 0x7c, 0x03, 0x5f, 0xc0, 0xec, 0xcc, 0xee, 0x5a, 0xda, 0x22, 0x5c, 0x78, 740 0xb7, 0xf3, 0x9d, 0xb3, 0xe7, 0x3b, 0xdf, 0xcc, 0x99, 0x81, 0xd9, 0xf3, 0x81, 0xcd, 0x70, 0xbf, 741 0x95, 0xef, 0x3b, 0x36, 0xb3, 0xd1, 0xb4, 0xb7, 0xcc, 0xac, 0x75, 0x6d, 0xbb, 0xdb, 0x23, 0x05, 742 0xdc, 0x37, 0x0a, 0xd8, 0xb2, 0x6c, 0x86, 0x99, 0x61, 0x5b, 0x54, 0xd0, 0x32, 0xab, 0x1e, 0xca, 743 0x57, 0xad, 0xc1, 0x69, 0x81, 0x98, 0x7d, 0x76, 0xed, 0x81, 0xca, 0x28, 0x78, 0x6a, 0x90, 0x5e, 744 0x47, 0x37, 0x31, 0x3d, 0x13, 0x0c, 0xf5, 0x77, 0x08, 0x62, 0x65, 0xdb, 0x3a, 0x35, 0xba, 0x08, 745 0x41, 0xc4, 0xc2, 0x26, 0x91, 0x25, 0x45, 0xca, 0x26, 0x34, 0xfe, 0x8d, 0xb6, 0x20, 0x4a, 0x19, 746 0x66, 0x44, 0x0e, 0x29, 0x52, 0x76, 0xae, 0xf8, 0x20, 0xef, 0x7b, 0x14, 0xff, 0xe4, 0x1b, 0x2e, 747 0xa8, 0x09, 0x0e, 0x7a, 0x08, 0x60, 0xe2, 0x2b, 0x9d, 0xd9, 0x67, 0xc4, 0xa2, 0x72, 0x58, 0x91, 748 0xb2, 0x61, 0x2d, 0x61, 0xe2, 0xab, 0x26, 0x2f, 0xa0, 0x23, 0x48, 0x51, 0x72, 0x3e, 0x20, 0x56, 749 0xdb, 0xb0, 0xba, 0x7a, 0x0b, 0x53, 0xd2, 0x91, 0x23, 0x8a, 0x94, 0x4d, 0x16, 0x95, 0x40, 0xb6, 750 0x11, 0x10, 0x4a, 0x2e, 0xde, 0x60, 0x0e, 0x66, 0xa4, 0x7b, 0xfd, 0x6a, 0x4a, 0x9b, 0xa7, 0x37, 751 0x21, 0xb4, 0x03, 0xc0, 0x0c, 0x93, 0x78, 0x42, 0x51, 0x2e, 0x94, 0x09, 0x84, 0x9a, 0x86, 0x49, 752 0x46, 0x25, 0x12, 0xcc, 0x2f, 0xa2, 0x0d, 0x98, 0x6b, 0x0f, 0x1c, 0x87, 0x58, 0xcc, 0xb7, 0x1b, 753 0xe3, 0x76, 0x67, 0xbd, 0xaa, 0xb0, 0xac, 0xee, 0x42, 0x94, 0x4f, 0x88, 0x64, 0x58, 0x3c, 0xa9, 754 0xbf, 0xae, 0x1f, 0xbf, 0xab, 0xeb, 0xe5, 0xe3, 0xfa, 0x41, 0xf5, 0x50, 0x6f, 0x34, 0xf7, 0x9a, 755 0x95, 0xd4, 0x14, 0x4a, 0xc2, 0x74, 0xa5, 0xbe, 0x57, 0xaa, 0x55, 0xf6, 0x53, 0x12, 0x9a, 0x81, 756 0xf8, 0x7e, 0xb5, 0x21, 0x56, 0xa1, 0x92, 0x0c, 0x4b, 0x0e, 0xe9, 0xf7, 0x88, 0x65, 0xd0, 0xf7, 757 0xa6, 0xdb, 0x8a, 0x7a, 0x5e, 0xd4, 0x15, 0x58, 0xbe, 0x65, 0x52, 0xf5, 0xb3, 0x04, 0x0b, 0x63, 758 0xe6, 0x51, 0x1e, 0xd2, 0xc2, 0xa7, 0xce, 0x6c, 0x3d, 0x10, 0xe5, 0x47, 0x15, 0xd6, 0x16, 0x04, 759 0xd4, 0xb4, 0x35, 0x1f, 0x40, 0xbb, 0x90, 0x09, 0x58, 0xba, 0x61, 0x31, 0xe2, 0x5c, 0xe0, 0x9e, 760 0x4e, 0x49, 0xdb, 0xb6, 0x3a, 0x94, 0x1f, 0x66, 0x58, 0x93, 0x03, 0x46, 0xd5, 0x23, 0x34, 0x04, 761 0xae, 0x6a, 0x90, 0x2e, 0x3b, 0x04, 0x33, 0x22, 0x4e, 0x59, 0x73, 0xad, 0x52, 0x36, 0x31, 0x20, 762 0x4f, 0x20, 0xd6, 0xe6, 0x24, 0x2e, 0x9a, 0x2c, 0xce, 0x8f, 0x24, 0x44, 0xf3, 0x60, 0x75, 0x13, 763 0xd2, 0xfb, 0xa4, 0x47, 0xee, 0xa1, 0xa9, 0x3e, 0x86, 0xd4, 0x21, 0x61, 0x77, 0xf3, 0xbe, 0x4a, 764 0x80, 0x6a, 0x06, 0xf5, 0x98, 0xd4, 0xa7, 0x2e, 0x42, 0xd4, 0x85, 0xa9, 0x2c, 0x29, 0xe1, 0x6c, 765 0x42, 0x13, 0x0b, 0xf4, 0x0c, 0x22, 0x17, 0x06, 0xb9, 0xf4, 0x82, 0xfc, 0x28, 0xb0, 0x39, 0x2e, 766 0xc0, 0x4b, 0x6f, 0x0d, 0x72, 0xa9, 0xf1, 0x3f, 0xd4, 0x75, 0x88, 0xfb, 0x15, 0x94, 0x80, 0x68, 767 0x69, 0xaf, 0x51, 0x2d, 0xa7, 0xa6, 0x50, 0x1c, 0x22, 0x07, 0x27, 0xb5, 0x5a, 0x4a, 0x52, 0x5f, 768 0x42, 0xfa, 0x86, 0x0a, 0xed, 0xdb, 0x16, 0x25, 0x68, 0x13, 0xa6, 0xc5, 0xec, 0xc2, 0xc9, 0x84, 769 0xbd, 0xf1, 0x71, 0xf5, 0x87, 0x04, 0xe9, 0x93, 0x7e, 0xe7, 0xbf, 0xee, 0x38, 0xda, 0x81, 0xe4, 770 0x80, 0x6b, 0xf2, 0xfb, 0xce, 0xef, 0xa3, 0x7b, 0x43, 0xc4, 0x93, 0x90, 0xf7, 0x9f, 0x84, 0xfc, 771 0x81, 0xfb, 0x24, 0x1c, 0x61, 0x7a, 0xa6, 0x81, 0xa0, 0xbb, 0xdf, 0x68, 0x1d, 0x92, 0x0e, 0xa1, 772 0x84, 0xe9, 0x5c, 0x9c, 0xdf, 0xd3, 0xb8, 0x06, 0xbc, 0xf4, 0xc6, 0xad, 0x14, 0xbf, 0x47, 0x20, 773 0xca, 0xbf, 0xd0, 0x07, 0x98, 0x19, 0x4e, 0x0b, 0x5a, 0xfb, 0x6b, 0x68, 0x3c, 0x44, 0x99, 0x51, 774 0xbb, 0xea, 0xd6, 0x97, 0x9f, 0xbf, 0xbe, 0x85, 0x36, 0x54, 0xa5, 0x70, 0xb1, 0xdd, 0x22, 0x0c, 775 0x6f, 0x17, 0x3e, 0xba, 0x73, 0xbe, 0xe0, 0x34, 0x5a, 0xc8, 0xe5, 0x0a, 0x62, 0x9e, 0x4f, 0xcf, 776 0xa5, 0x1c, 0xb2, 0x60, 0x66, 0x38, 0x45, 0x43, 0xbd, 0x26, 0x84, 0x2b, 0xb3, 0x34, 0x36, 0x6c, 777 0xc5, 0x7d, 0x1c, 0xd5, 0x2c, 0x6f, 0xa9, 0xe6, 0xee, 0x6c, 0x89, 0x30, 0x24, 0x82, 0x28, 0xa2, 778 0x95, 0xa0, 0xd9, 0x68, 0x3c, 0xc7, 0xa7, 0xf2, 0x5a, 0xa0, 0xfb, 0xb4, 0x48, 0x0e, 0xa5, 0x07, 779 0xad, 0xfe, 0x23, 0x99, 0x99, 0xb5, 0xc9, 0xa0, 0x08, 0x9c, 0xba, 0xcc, 0x7b, 0x2e, 0xa0, 0xf9, 780 0xa0, 0xa7, 0xe8, 0xe6, 0x9e, 0xd0, 0x70, 0xba, 0x86, 0x76, 0x6d, 0x42, 0xe8, 0x6e, 0x3d, 0xa1, 781 0xe2, 0x7d, 0x4e, 0xa8, 0x15, 0xe3, 0x7b, 0xfd, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa0, 782 0x60, 0xf5, 0x62, 0xce, 0x06, 0x00, 0x00, 783 }