...

Source file src/github.com/datawire/ambassador/v2/pkg/api/pb/lyft/ratelimit/rls.pb.go

Documentation: github.com/datawire/ambassador/v2/pkg/api/pb/lyft/ratelimit

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.25.0
     4  // 	protoc        v3.14.0
     5  // source: pb/lyft/ratelimit/rls.proto
     6  
     7  package pb_lyft_ratelimit
     8  
     9  import (
    10  	context "context"
    11  	_ "github.com/cncf/udpa/go/udpa/annotations"
    12  	v2 "github.com/datawire/ambassador/v2/pkg/api/envoy/service/ratelimit/v2"
    13  	proto "github.com/golang/protobuf/proto"
    14  	grpc "google.golang.org/grpc"
    15  	codes "google.golang.org/grpc/codes"
    16  	status "google.golang.org/grpc/status"
    17  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    18  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    19  	reflect "reflect"
    20  )
    21  
    22  const (
    23  	// Verify that this generated code is sufficiently up-to-date.
    24  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    25  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    26  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    27  )
    28  
    29  // This is a compile-time assertion that a sufficiently up-to-date version
    30  // of the legacy proto package is being used.
    31  const _ = proto.ProtoPackageIsVersion4
    32  
    33  var File_pb_lyft_ratelimit_rls_proto protoreflect.FileDescriptor
    34  
    35  var file_pb_lyft_ratelimit_rls_proto_rawDesc = []byte{
    36  	0x0a, 0x1b, 0x70, 0x62, 0x2f, 0x6c, 0x79, 0x66, 0x74, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69,
    37  	0x6d, 0x69, 0x74, 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x70,
    38  	0x62, 0x2e, 0x6c, 0x79, 0x66, 0x74, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74,
    39  	0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
    40  	0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x6c, 0x73,
    41  	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e,
    42  	0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
    43  	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e,
    44  	0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
    45  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x84, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69,
    46  	0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x68,
    47  	0x6f, 0x75, 0x6c, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x2e,
    48  	0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61,
    49  	0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c,
    50  	0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e,
    51  	0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65,
    52  	0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d,
    53  	0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x5a, 0x0a, 0x1f,
    54  	0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x62,
    55  	0x2e, 0x6c, 0x79, 0x66, 0x74, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42,
    56  	0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xf2, 0x98,
    57  	0xfe, 0x8f, 0x05, 0x1c, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76,
    58  	0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33,
    59  	0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
    60  }
    61  
    62  var file_pb_lyft_ratelimit_rls_proto_goTypes = []interface{}{
    63  	(*v2.RateLimitRequest)(nil),  // 0: envoy.service.ratelimit.v2.RateLimitRequest
    64  	(*v2.RateLimitResponse)(nil), // 1: envoy.service.ratelimit.v2.RateLimitResponse
    65  }
    66  var file_pb_lyft_ratelimit_rls_proto_depIdxs = []int32{
    67  	0, // 0: pb.lyft.ratelimit.RateLimitService.ShouldRateLimit:input_type -> envoy.service.ratelimit.v2.RateLimitRequest
    68  	1, // 1: pb.lyft.ratelimit.RateLimitService.ShouldRateLimit:output_type -> envoy.service.ratelimit.v2.RateLimitResponse
    69  	1, // [1:2] is the sub-list for method output_type
    70  	0, // [0:1] is the sub-list for method input_type
    71  	0, // [0:0] is the sub-list for extension type_name
    72  	0, // [0:0] is the sub-list for extension extendee
    73  	0, // [0:0] is the sub-list for field type_name
    74  }
    75  
    76  func init() { file_pb_lyft_ratelimit_rls_proto_init() }
    77  func file_pb_lyft_ratelimit_rls_proto_init() {
    78  	if File_pb_lyft_ratelimit_rls_proto != nil {
    79  		return
    80  	}
    81  	type x struct{}
    82  	out := protoimpl.TypeBuilder{
    83  		File: protoimpl.DescBuilder{
    84  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
    85  			RawDescriptor: file_pb_lyft_ratelimit_rls_proto_rawDesc,
    86  			NumEnums:      0,
    87  			NumMessages:   0,
    88  			NumExtensions: 0,
    89  			NumServices:   1,
    90  		},
    91  		GoTypes:           file_pb_lyft_ratelimit_rls_proto_goTypes,
    92  		DependencyIndexes: file_pb_lyft_ratelimit_rls_proto_depIdxs,
    93  	}.Build()
    94  	File_pb_lyft_ratelimit_rls_proto = out.File
    95  	file_pb_lyft_ratelimit_rls_proto_rawDesc = nil
    96  	file_pb_lyft_ratelimit_rls_proto_goTypes = nil
    97  	file_pb_lyft_ratelimit_rls_proto_depIdxs = nil
    98  }
    99  
   100  // Reference imports to suppress errors if they are not otherwise used.
   101  var _ context.Context
   102  var _ grpc.ClientConnInterface
   103  
   104  // This is a compile-time assertion to ensure that this generated file
   105  // is compatible with the grpc package it is being compiled against.
   106  const _ = grpc.SupportPackageIsVersion6
   107  
   108  // RateLimitServiceClient is the client API for RateLimitService service.
   109  //
   110  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   111  type RateLimitServiceClient interface {
   112  	ShouldRateLimit(ctx context.Context, in *v2.RateLimitRequest, opts ...grpc.CallOption) (*v2.RateLimitResponse, error)
   113  }
   114  
   115  type rateLimitServiceClient struct {
   116  	cc grpc.ClientConnInterface
   117  }
   118  
   119  func NewRateLimitServiceClient(cc grpc.ClientConnInterface) RateLimitServiceClient {
   120  	return &rateLimitServiceClient{cc}
   121  }
   122  
   123  func (c *rateLimitServiceClient) ShouldRateLimit(ctx context.Context, in *v2.RateLimitRequest, opts ...grpc.CallOption) (*v2.RateLimitResponse, error) {
   124  	out := new(v2.RateLimitResponse)
   125  	err := c.cc.Invoke(ctx, "/pb.lyft.ratelimit.RateLimitService/ShouldRateLimit", in, out, opts...)
   126  	if err != nil {
   127  		return nil, err
   128  	}
   129  	return out, nil
   130  }
   131  
   132  // RateLimitServiceServer is the server API for RateLimitService service.
   133  type RateLimitServiceServer interface {
   134  	ShouldRateLimit(context.Context, *v2.RateLimitRequest) (*v2.RateLimitResponse, error)
   135  }
   136  
   137  // UnimplementedRateLimitServiceServer can be embedded to have forward compatible implementations.
   138  type UnimplementedRateLimitServiceServer struct {
   139  }
   140  
   141  func (*UnimplementedRateLimitServiceServer) ShouldRateLimit(context.Context, *v2.RateLimitRequest) (*v2.RateLimitResponse, error) {
   142  	return nil, status.Errorf(codes.Unimplemented, "method ShouldRateLimit not implemented")
   143  }
   144  
   145  func RegisterRateLimitServiceServer(s *grpc.Server, srv RateLimitServiceServer) {
   146  	s.RegisterService(&_RateLimitService_serviceDesc, srv)
   147  }
   148  
   149  func _RateLimitService_ShouldRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   150  	in := new(v2.RateLimitRequest)
   151  	if err := dec(in); err != nil {
   152  		return nil, err
   153  	}
   154  	if interceptor == nil {
   155  		return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, in)
   156  	}
   157  	info := &grpc.UnaryServerInfo{
   158  		Server:     srv,
   159  		FullMethod: "/pb.lyft.ratelimit.RateLimitService/ShouldRateLimit",
   160  	}
   161  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   162  		return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, req.(*v2.RateLimitRequest))
   163  	}
   164  	return interceptor(ctx, in, info, handler)
   165  }
   166  
   167  var _RateLimitService_serviceDesc = grpc.ServiceDesc{
   168  	ServiceName: "pb.lyft.ratelimit.RateLimitService",
   169  	HandlerType: (*RateLimitServiceServer)(nil),
   170  	Methods: []grpc.MethodDesc{
   171  		{
   172  			MethodName: "ShouldRateLimit",
   173  			Handler:    _RateLimitService_ShouldRateLimit_Handler,
   174  		},
   175  	},
   176  	Streams:  []grpc.StreamDesc{},
   177  	Metadata: "pb/lyft/ratelimit/rls.proto",
   178  }
   179  

View as plain text