github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/api/v2/ratelimit/ratelimit.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.25.0
     4  // 	protoc        v3.16.0
     5  // source: envoy/api/v2/ratelimit/ratelimit.proto
     6  
     7  package envoy_api_v2_ratelimit
     8  
     9  import (
    10  	_ "github.com/cncf/xds/go/udpa/annotations"
    11  	_ "github.com/envoyproxy/protoc-gen-validate/validate"
    12  	proto "github.com/golang/protobuf/proto"
    13  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    14  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    15  	reflect "reflect"
    16  	sync "sync"
    17  )
    18  
    19  const (
    20  	// Verify that this generated code is sufficiently up-to-date.
    21  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    22  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    23  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    24  )
    25  
    26  // This is a compile-time assertion that a sufficiently up-to-date version
    27  // of the legacy proto package is being used.
    28  const _ = proto.ProtoPackageIsVersion4
    29  
    30  // A RateLimitDescriptor is a list of hierarchical entries that are used by the service to
    31  // determine the final rate limit key and overall allowed limit. Here are some examples of how
    32  // they might be used for the domain "envoy".
    33  //
    34  // .. code-block:: cpp
    35  //
    36  //   ["authenticated": "false"], ["remote_address": "10.0.0.1"]
    37  //
    38  // What it does: Limits all unauthenticated traffic for the IP address 10.0.0.1. The
    39  // configuration supplies a default limit for the *remote_address* key. If there is a desire to
    40  // raise the limit for 10.0.0.1 or block it entirely it can be specified directly in the
    41  // configuration.
    42  //
    43  // .. code-block:: cpp
    44  //
    45  //   ["authenticated": "false"], ["path": "/foo/bar"]
    46  //
    47  // What it does: Limits all unauthenticated traffic globally for a specific path (or prefix if
    48  // configured that way in the service).
    49  //
    50  // .. code-block:: cpp
    51  //
    52  //   ["authenticated": "false"], ["path": "/foo/bar"], ["remote_address": "10.0.0.1"]
    53  //
    54  // What it does: Limits unauthenticated traffic to a specific path for a specific IP address.
    55  // Like (1) we can raise/block specific IP addresses if we want with an override configuration.
    56  //
    57  // .. code-block:: cpp
    58  //
    59  //   ["authenticated": "true"], ["client_id": "foo"]
    60  //
    61  // What it does: Limits all traffic for an authenticated client "foo"
    62  //
    63  // .. code-block:: cpp
    64  //
    65  //   ["authenticated": "true"], ["client_id": "foo"], ["path": "/foo/bar"]
    66  //
    67  // What it does: Limits traffic to a specific path for an authenticated client "foo"
    68  //
    69  // The idea behind the API is that (1)/(2)/(3) and (4)/(5) can be sent in 1 request if desired.
    70  // This enables building complex application scenarios with a generic backend.
    71  type RateLimitDescriptor struct {
    72  	state         protoimpl.MessageState
    73  	sizeCache     protoimpl.SizeCache
    74  	unknownFields protoimpl.UnknownFields
    75  
    76  	// Descriptor entries.
    77  	Entries []*RateLimitDescriptor_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
    78  }
    79  
    80  func (x *RateLimitDescriptor) Reset() {
    81  	*x = RateLimitDescriptor{}
    82  	if protoimpl.UnsafeEnabled {
    83  		mi := &file_envoy_api_v2_ratelimit_ratelimit_proto_msgTypes[0]
    84  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    85  		ms.StoreMessageInfo(mi)
    86  	}
    87  }
    88  
    89  func (x *RateLimitDescriptor) String() string {
    90  	return protoimpl.X.MessageStringOf(x)
    91  }
    92  
    93  func (*RateLimitDescriptor) ProtoMessage() {}
    94  
    95  func (x *RateLimitDescriptor) ProtoReflect() protoreflect.Message {
    96  	mi := &file_envoy_api_v2_ratelimit_ratelimit_proto_msgTypes[0]
    97  	if protoimpl.UnsafeEnabled && x != nil {
    98  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    99  		if ms.LoadMessageInfo() == nil {
   100  			ms.StoreMessageInfo(mi)
   101  		}
   102  		return ms
   103  	}
   104  	return mi.MessageOf(x)
   105  }
   106  
   107  // Deprecated: Use RateLimitDescriptor.ProtoReflect.Descriptor instead.
   108  func (*RateLimitDescriptor) Descriptor() ([]byte, []int) {
   109  	return file_envoy_api_v2_ratelimit_ratelimit_proto_rawDescGZIP(), []int{0}
   110  }
   111  
   112  func (x *RateLimitDescriptor) GetEntries() []*RateLimitDescriptor_Entry {
   113  	if x != nil {
   114  		return x.Entries
   115  	}
   116  	return nil
   117  }
   118  
   119  type RateLimitDescriptor_Entry struct {
   120  	state         protoimpl.MessageState
   121  	sizeCache     protoimpl.SizeCache
   122  	unknownFields protoimpl.UnknownFields
   123  
   124  	// Descriptor key.
   125  	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
   126  	// Descriptor value.
   127  	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
   128  }
   129  
   130  func (x *RateLimitDescriptor_Entry) Reset() {
   131  	*x = RateLimitDescriptor_Entry{}
   132  	if protoimpl.UnsafeEnabled {
   133  		mi := &file_envoy_api_v2_ratelimit_ratelimit_proto_msgTypes[1]
   134  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   135  		ms.StoreMessageInfo(mi)
   136  	}
   137  }
   138  
   139  func (x *RateLimitDescriptor_Entry) String() string {
   140  	return protoimpl.X.MessageStringOf(x)
   141  }
   142  
   143  func (*RateLimitDescriptor_Entry) ProtoMessage() {}
   144  
   145  func (x *RateLimitDescriptor_Entry) ProtoReflect() protoreflect.Message {
   146  	mi := &file_envoy_api_v2_ratelimit_ratelimit_proto_msgTypes[1]
   147  	if protoimpl.UnsafeEnabled && x != nil {
   148  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   149  		if ms.LoadMessageInfo() == nil {
   150  			ms.StoreMessageInfo(mi)
   151  		}
   152  		return ms
   153  	}
   154  	return mi.MessageOf(x)
   155  }
   156  
   157  // Deprecated: Use RateLimitDescriptor_Entry.ProtoReflect.Descriptor instead.
   158  func (*RateLimitDescriptor_Entry) Descriptor() ([]byte, []int) {
   159  	return file_envoy_api_v2_ratelimit_ratelimit_proto_rawDescGZIP(), []int{0, 0}
   160  }
   161  
   162  func (x *RateLimitDescriptor_Entry) GetKey() string {
   163  	if x != nil {
   164  		return x.Key
   165  	}
   166  	return ""
   167  }
   168  
   169  func (x *RateLimitDescriptor_Entry) GetValue() string {
   170  	if x != nil {
   171  		return x.Value
   172  	}
   173  	return ""
   174  }
   175  
   176  var File_envoy_api_v2_ratelimit_ratelimit_proto protoreflect.FileDescriptor
   177  
   178  var file_envoy_api_v2_ratelimit_ratelimit_proto_rawDesc = []byte{
   179  	0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72,
   180  	0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d,
   181  	0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
   182  	0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74,
   183  	0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
   184  	0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   185  	0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
   186  	0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
   187  	0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
   188  	0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x13, 0x52, 0x61, 0x74,
   189  	0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72,
   190  	0x12, 0x55, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
   191  	0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
   192  	0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c,
   193  	0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x45,
   194  	0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07,
   195  	0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x41, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79,
   196  	0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
   197  	0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76,
   198  	0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
   199  	0x02, 0x20, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x6c, 0x0a, 0x24, 0x69, 0x6f,
   200  	0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
   201  	0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d,
   202  	0x69, 0x74, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f,
   203  	0x74, 0x6f, 0x50, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x26, 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f,
   204  	0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
   205  	0x6d, 0x6f, 0x6e, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33,
   206  	0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   207  }
   208  
   209  var (
   210  	file_envoy_api_v2_ratelimit_ratelimit_proto_rawDescOnce sync.Once
   211  	file_envoy_api_v2_ratelimit_ratelimit_proto_rawDescData = file_envoy_api_v2_ratelimit_ratelimit_proto_rawDesc
   212  )
   213  
   214  func file_envoy_api_v2_ratelimit_ratelimit_proto_rawDescGZIP() []byte {
   215  	file_envoy_api_v2_ratelimit_ratelimit_proto_rawDescOnce.Do(func() {
   216  		file_envoy_api_v2_ratelimit_ratelimit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_ratelimit_ratelimit_proto_rawDescData)
   217  	})
   218  	return file_envoy_api_v2_ratelimit_ratelimit_proto_rawDescData
   219  }
   220  
   221  var file_envoy_api_v2_ratelimit_ratelimit_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   222  var file_envoy_api_v2_ratelimit_ratelimit_proto_goTypes = []interface{}{
   223  	(*RateLimitDescriptor)(nil),       // 0: envoy.api.v2.ratelimit.RateLimitDescriptor
   224  	(*RateLimitDescriptor_Entry)(nil), // 1: envoy.api.v2.ratelimit.RateLimitDescriptor.Entry
   225  }
   226  var file_envoy_api_v2_ratelimit_ratelimit_proto_depIdxs = []int32{
   227  	1, // 0: envoy.api.v2.ratelimit.RateLimitDescriptor.entries:type_name -> envoy.api.v2.ratelimit.RateLimitDescriptor.Entry
   228  	1, // [1:1] is the sub-list for method output_type
   229  	1, // [1:1] is the sub-list for method input_type
   230  	1, // [1:1] is the sub-list for extension type_name
   231  	1, // [1:1] is the sub-list for extension extendee
   232  	0, // [0:1] is the sub-list for field type_name
   233  }
   234  
   235  func init() { file_envoy_api_v2_ratelimit_ratelimit_proto_init() }
   236  func file_envoy_api_v2_ratelimit_ratelimit_proto_init() {
   237  	if File_envoy_api_v2_ratelimit_ratelimit_proto != nil {
   238  		return
   239  	}
   240  	if !protoimpl.UnsafeEnabled {
   241  		file_envoy_api_v2_ratelimit_ratelimit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   242  			switch v := v.(*RateLimitDescriptor); i {
   243  			case 0:
   244  				return &v.state
   245  			case 1:
   246  				return &v.sizeCache
   247  			case 2:
   248  				return &v.unknownFields
   249  			default:
   250  				return nil
   251  			}
   252  		}
   253  		file_envoy_api_v2_ratelimit_ratelimit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   254  			switch v := v.(*RateLimitDescriptor_Entry); i {
   255  			case 0:
   256  				return &v.state
   257  			case 1:
   258  				return &v.sizeCache
   259  			case 2:
   260  				return &v.unknownFields
   261  			default:
   262  				return nil
   263  			}
   264  		}
   265  	}
   266  	type x struct{}
   267  	out := protoimpl.TypeBuilder{
   268  		File: protoimpl.DescBuilder{
   269  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   270  			RawDescriptor: file_envoy_api_v2_ratelimit_ratelimit_proto_rawDesc,
   271  			NumEnums:      0,
   272  			NumMessages:   2,
   273  			NumExtensions: 0,
   274  			NumServices:   0,
   275  		},
   276  		GoTypes:           file_envoy_api_v2_ratelimit_ratelimit_proto_goTypes,
   277  		DependencyIndexes: file_envoy_api_v2_ratelimit_ratelimit_proto_depIdxs,
   278  		MessageInfos:      file_envoy_api_v2_ratelimit_ratelimit_proto_msgTypes,
   279  	}.Build()
   280  	File_envoy_api_v2_ratelimit_ratelimit_proto = out.File
   281  	file_envoy_api_v2_ratelimit_ratelimit_proto_rawDesc = nil
   282  	file_envoy_api_v2_ratelimit_ratelimit_proto_goTypes = nil
   283  	file_envoy_api_v2_ratelimit_ratelimit_proto_depIdxs = nil
   284  }