github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/service/auth/v2alpha/external_auth.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/service/auth/v2alpha/external_auth.proto
     6  
     7  package envoy_service_auth_v2alpha
     8  
     9  import (
    10  	context "context"
    11  	v2 "github.com/hxx258456/ccgo/go-control-plane/envoy/service/auth/v2"
    12  	proto "github.com/golang/protobuf/proto"
    13  	grpc "github.com/hxx258456/ccgo/grpc"
    14  	codes "github.com/hxx258456/ccgo/grpc/codes"
    15  	status "github.com/hxx258456/ccgo/grpc/status"
    16  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    17  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    18  	reflect "reflect"
    19  )
    20  
    21  const (
    22  	// Verify that this generated code is sufficiently up-to-date.
    23  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    24  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    25  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    26  )
    27  
    28  // This is a compile-time assertion that a sufficiently up-to-date version
    29  // of the legacy proto package is being used.
    30  const _ = proto.ProtoPackageIsVersion4
    31  
    32  var File_envoy_service_auth_v2alpha_external_auth_proto protoreflect.FileDescriptor
    33  
    34  var file_envoy_service_auth_v2alpha_external_auth_proto_rawDesc = []byte{
    35  	0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
    36  	0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74,
    37  	0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
    38  	0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
    39  	0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x29, 0x65, 0x6e,
    40  	0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x74, 0x68,
    41  	0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74,
    42  	0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x63, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f,
    43  	0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63,
    44  	0x6b, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
    45  	0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
    46  	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73,
    47  	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43,
    48  	0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3b, 0x0a, 0x28,
    49  	0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e,
    50  	0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68,
    51  	0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x43, 0x65, 0x72, 0x74, 0x73, 0x50,
    52  	0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
    53  	0x33,
    54  }
    55  
    56  var file_envoy_service_auth_v2alpha_external_auth_proto_goTypes = []interface{}{
    57  	(*v2.CheckRequest)(nil),  // 0: envoy.service.auth.v2.CheckRequest
    58  	(*v2.CheckResponse)(nil), // 1: envoy.service.auth.v2.CheckResponse
    59  }
    60  var file_envoy_service_auth_v2alpha_external_auth_proto_depIdxs = []int32{
    61  	0, // 0: envoy.service.auth.v2alpha.Authorization.Check:input_type -> envoy.service.auth.v2.CheckRequest
    62  	1, // 1: envoy.service.auth.v2alpha.Authorization.Check:output_type -> envoy.service.auth.v2.CheckResponse
    63  	1, // [1:2] is the sub-list for method output_type
    64  	0, // [0:1] is the sub-list for method input_type
    65  	0, // [0:0] is the sub-list for extension type_name
    66  	0, // [0:0] is the sub-list for extension extendee
    67  	0, // [0:0] is the sub-list for field type_name
    68  }
    69  
    70  func init() { file_envoy_service_auth_v2alpha_external_auth_proto_init() }
    71  func file_envoy_service_auth_v2alpha_external_auth_proto_init() {
    72  	if File_envoy_service_auth_v2alpha_external_auth_proto != nil {
    73  		return
    74  	}
    75  	type x struct{}
    76  	out := protoimpl.TypeBuilder{
    77  		File: protoimpl.DescBuilder{
    78  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
    79  			RawDescriptor: file_envoy_service_auth_v2alpha_external_auth_proto_rawDesc,
    80  			NumEnums:      0,
    81  			NumMessages:   0,
    82  			NumExtensions: 0,
    83  			NumServices:   1,
    84  		},
    85  		GoTypes:           file_envoy_service_auth_v2alpha_external_auth_proto_goTypes,
    86  		DependencyIndexes: file_envoy_service_auth_v2alpha_external_auth_proto_depIdxs,
    87  	}.Build()
    88  	File_envoy_service_auth_v2alpha_external_auth_proto = out.File
    89  	file_envoy_service_auth_v2alpha_external_auth_proto_rawDesc = nil
    90  	file_envoy_service_auth_v2alpha_external_auth_proto_goTypes = nil
    91  	file_envoy_service_auth_v2alpha_external_auth_proto_depIdxs = nil
    92  }
    93  
    94  // Reference imports to suppress errors if they are not otherwise used.
    95  var _ context.Context
    96  var _ grpc.ClientConnInterface
    97  
    98  // This is a compile-time assertion to ensure that this generated file
    99  // is compatible with the grpc package it is being compiled against.
   100  const _ = grpc.SupportPackageIsVersion6
   101  
   102  // AuthorizationClient is the client API for Authorization service.
   103  //
   104  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   105  type AuthorizationClient interface {
   106  	// Performs authorization check based on the attributes associated with the
   107  	// incoming request, and returns status `OK` or not `OK`.
   108  	Check(ctx context.Context, in *v2.CheckRequest, opts ...grpc.CallOption) (*v2.CheckResponse, error)
   109  }
   110  
   111  type authorizationClient struct {
   112  	cc grpc.ClientConnInterface
   113  }
   114  
   115  func NewAuthorizationClient(cc grpc.ClientConnInterface) AuthorizationClient {
   116  	return &authorizationClient{cc}
   117  }
   118  
   119  func (c *authorizationClient) Check(ctx context.Context, in *v2.CheckRequest, opts ...grpc.CallOption) (*v2.CheckResponse, error) {
   120  	out := new(v2.CheckResponse)
   121  	err := c.cc.Invoke(ctx, "/envoy.service.auth.v2alpha.Authorization/Check", in, out, opts...)
   122  	if err != nil {
   123  		return nil, err
   124  	}
   125  	return out, nil
   126  }
   127  
   128  // AuthorizationServer is the server API for Authorization service.
   129  type AuthorizationServer interface {
   130  	// Performs authorization check based on the attributes associated with the
   131  	// incoming request, and returns status `OK` or not `OK`.
   132  	Check(context.Context, *v2.CheckRequest) (*v2.CheckResponse, error)
   133  }
   134  
   135  // UnimplementedAuthorizationServer can be embedded to have forward compatible implementations.
   136  type UnimplementedAuthorizationServer struct {
   137  }
   138  
   139  func (*UnimplementedAuthorizationServer) Check(context.Context, *v2.CheckRequest) (*v2.CheckResponse, error) {
   140  	return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
   141  }
   142  
   143  func RegisterAuthorizationServer(s *grpc.Server, srv AuthorizationServer) {
   144  	s.RegisterService(&_Authorization_serviceDesc, srv)
   145  }
   146  
   147  func _Authorization_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   148  	in := new(v2.CheckRequest)
   149  	if err := dec(in); err != nil {
   150  		return nil, err
   151  	}
   152  	if interceptor == nil {
   153  		return srv.(AuthorizationServer).Check(ctx, in)
   154  	}
   155  	info := &grpc.UnaryServerInfo{
   156  		Server:     srv,
   157  		FullMethod: "/envoy.service.auth.v2alpha.Authorization/Check",
   158  	}
   159  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   160  		return srv.(AuthorizationServer).Check(ctx, req.(*v2.CheckRequest))
   161  	}
   162  	return interceptor(ctx, in, info, handler)
   163  }
   164  
   165  var _Authorization_serviceDesc = grpc.ServiceDesc{
   166  	ServiceName: "envoy.service.auth.v2alpha.Authorization",
   167  	HandlerType: (*AuthorizationServer)(nil),
   168  	Methods: []grpc.MethodDesc{
   169  		{
   170  			MethodName: "Check",
   171  			Handler:    _Authorization_Check_Handler,
   172  		},
   173  	},
   174  	Streams:  []grpc.StreamDesc{},
   175  	Metadata: "envoy/service/auth/v2alpha/external_auth.proto",
   176  }