1
2
3
4
5
6
7 package v2alpha
8
9 import (
10 context "context"
11 v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/auth/v2"
12 grpc "google.golang.org/grpc"
13 codes "google.golang.org/grpc/codes"
14 status "google.golang.org/grpc/status"
15 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
16 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
17 reflect "reflect"
18 )
19
20 const (
21
22 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
23
24 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
25 )
26
27 var File_envoy_service_auth_v2alpha_external_auth_proto protoreflect.FileDescriptor
28
29 var file_envoy_service_auth_v2alpha_external_auth_proto_rawDesc = []byte{
30 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
31 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x65, 0x78, 0x74,
32 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
33 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
34 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x29, 0x65, 0x6e,
35 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x74, 0x68,
36 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74,
37 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x63, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f,
38 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63,
39 0x6b, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
40 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
41 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73,
42 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43,
43 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x7e, 0x0a, 0x28,
44 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e,
45 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68,
46 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0a, 0x43, 0x65, 0x72, 0x74, 0x73, 0x50,
47 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
48 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f,
49 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65,
50 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x74,
51 0x68, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72,
52 0x6f, 0x74, 0x6f, 0x33,
53 }
54
55 var file_envoy_service_auth_v2alpha_external_auth_proto_goTypes = []interface{}{
56 (*v2.CheckRequest)(nil),
57 (*v2.CheckResponse)(nil),
58 }
59 var file_envoy_service_auth_v2alpha_external_auth_proto_depIdxs = []int32{
60 0,
61 1,
62 1,
63 0,
64 0,
65 0,
66 0,
67 }
68
69 func init() { file_envoy_service_auth_v2alpha_external_auth_proto_init() }
70 func file_envoy_service_auth_v2alpha_external_auth_proto_init() {
71 if File_envoy_service_auth_v2alpha_external_auth_proto != nil {
72 return
73 }
74 type x struct{}
75 out := protoimpl.TypeBuilder{
76 File: protoimpl.DescBuilder{
77 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
78 RawDescriptor: file_envoy_service_auth_v2alpha_external_auth_proto_rawDesc,
79 NumEnums: 0,
80 NumMessages: 0,
81 NumExtensions: 0,
82 NumServices: 1,
83 },
84 GoTypes: file_envoy_service_auth_v2alpha_external_auth_proto_goTypes,
85 DependencyIndexes: file_envoy_service_auth_v2alpha_external_auth_proto_depIdxs,
86 }.Build()
87 File_envoy_service_auth_v2alpha_external_auth_proto = out.File
88 file_envoy_service_auth_v2alpha_external_auth_proto_rawDesc = nil
89 file_envoy_service_auth_v2alpha_external_auth_proto_goTypes = nil
90 file_envoy_service_auth_v2alpha_external_auth_proto_depIdxs = nil
91 }
92
93
94 var _ context.Context
95 var _ grpc.ClientConnInterface
96
97
98
99 const _ = grpc.SupportPackageIsVersion6
100
101
102
103
104 type AuthorizationClient interface {
105
106
107 Check(ctx context.Context, in *v2.CheckRequest, opts ...grpc.CallOption) (*v2.CheckResponse, error)
108 }
109
110 type authorizationClient struct {
111 cc grpc.ClientConnInterface
112 }
113
114 func NewAuthorizationClient(cc grpc.ClientConnInterface) AuthorizationClient {
115 return &authorizationClient{cc}
116 }
117
118 func (c *authorizationClient) Check(ctx context.Context, in *v2.CheckRequest, opts ...grpc.CallOption) (*v2.CheckResponse, error) {
119 out := new(v2.CheckResponse)
120 err := c.cc.Invoke(ctx, "/envoy.service.auth.v2alpha.Authorization/Check", in, out, opts...)
121 if err != nil {
122 return nil, err
123 }
124 return out, nil
125 }
126
127
128 type AuthorizationServer interface {
129
130
131 Check(context.Context, *v2.CheckRequest) (*v2.CheckResponse, error)
132 }
133
134
135 type UnimplementedAuthorizationServer struct {
136 }
137
138 func (*UnimplementedAuthorizationServer) Check(context.Context, *v2.CheckRequest) (*v2.CheckResponse, error) {
139 return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
140 }
141
142 func RegisterAuthorizationServer(s *grpc.Server, srv AuthorizationServer) {
143 s.RegisterService(&_Authorization_serviceDesc, srv)
144 }
145
146 func _Authorization_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
147 in := new(v2.CheckRequest)
148 if err := dec(in); err != nil {
149 return nil, err
150 }
151 if interceptor == nil {
152 return srv.(AuthorizationServer).Check(ctx, in)
153 }
154 info := &grpc.UnaryServerInfo{
155 Server: srv,
156 FullMethod: "/envoy.service.auth.v2alpha.Authorization/Check",
157 }
158 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
159 return srv.(AuthorizationServer).Check(ctx, req.(*v2.CheckRequest))
160 }
161 return interceptor(ctx, in, info, handler)
162 }
163
164 var _Authorization_serviceDesc = grpc.ServiceDesc{
165 ServiceName: "envoy.service.auth.v2alpha.Authorization",
166 HandlerType: (*AuthorizationServer)(nil),
167 Methods: []grpc.MethodDesc{
168 {
169 MethodName: "Check",
170 Handler: _Authorization_Check_Handler,
171 },
172 },
173 Streams: []grpc.StreamDesc{},
174 Metadata: "envoy/service/auth/v2alpha/external_auth.proto",
175 }
176
View as plain text