1
2
3
4
5
6
7 package proto
8
9 import (
10 context "context"
11 proto1 "github.com/letsencrypt/boulder/ca/proto"
12 proto "github.com/letsencrypt/boulder/core/proto"
13 grpc "google.golang.org/grpc"
14 codes "google.golang.org/grpc/codes"
15 status "google.golang.org/grpc/status"
16 emptypb "google.golang.org/protobuf/types/known/emptypb"
17 )
18
19
20
21
22 const _ = grpc.SupportPackageIsVersion7
23
24
25
26
27 type RegistrationAuthorityClient interface {
28 NewRegistration(ctx context.Context, in *proto.Registration, opts ...grpc.CallOption) (*proto.Registration, error)
29 UpdateRegistration(ctx context.Context, in *UpdateRegistrationRequest, opts ...grpc.CallOption) (*proto.Registration, error)
30 PerformValidation(ctx context.Context, in *PerformValidationRequest, opts ...grpc.CallOption) (*proto.Authorization, error)
31 DeactivateRegistration(ctx context.Context, in *proto.Registration, opts ...grpc.CallOption) (*emptypb.Empty, error)
32 DeactivateAuthorization(ctx context.Context, in *proto.Authorization, opts ...grpc.CallOption) (*emptypb.Empty, error)
33 RevokeCertByApplicant(ctx context.Context, in *RevokeCertByApplicantRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
34 RevokeCertByKey(ctx context.Context, in *RevokeCertByKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
35 AdministrativelyRevokeCertificate(ctx context.Context, in *AdministrativelyRevokeCertificateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
36 NewOrder(ctx context.Context, in *NewOrderRequest, opts ...grpc.CallOption) (*proto.Order, error)
37 FinalizeOrder(ctx context.Context, in *FinalizeOrderRequest, opts ...grpc.CallOption) (*proto.Order, error)
38
39 GenerateOCSP(ctx context.Context, in *GenerateOCSPRequest, opts ...grpc.CallOption) (*proto1.OCSPResponse, error)
40 }
41
42 type registrationAuthorityClient struct {
43 cc grpc.ClientConnInterface
44 }
45
46 func NewRegistrationAuthorityClient(cc grpc.ClientConnInterface) RegistrationAuthorityClient {
47 return ®istrationAuthorityClient{cc}
48 }
49
50 func (c *registrationAuthorityClient) NewRegistration(ctx context.Context, in *proto.Registration, opts ...grpc.CallOption) (*proto.Registration, error) {
51 out := new(proto.Registration)
52 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/NewRegistration", in, out, opts...)
53 if err != nil {
54 return nil, err
55 }
56 return out, nil
57 }
58
59 func (c *registrationAuthorityClient) UpdateRegistration(ctx context.Context, in *UpdateRegistrationRequest, opts ...grpc.CallOption) (*proto.Registration, error) {
60 out := new(proto.Registration)
61 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/UpdateRegistration", in, out, opts...)
62 if err != nil {
63 return nil, err
64 }
65 return out, nil
66 }
67
68 func (c *registrationAuthorityClient) PerformValidation(ctx context.Context, in *PerformValidationRequest, opts ...grpc.CallOption) (*proto.Authorization, error) {
69 out := new(proto.Authorization)
70 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/PerformValidation", in, out, opts...)
71 if err != nil {
72 return nil, err
73 }
74 return out, nil
75 }
76
77 func (c *registrationAuthorityClient) DeactivateRegistration(ctx context.Context, in *proto.Registration, opts ...grpc.CallOption) (*emptypb.Empty, error) {
78 out := new(emptypb.Empty)
79 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/DeactivateRegistration", in, out, opts...)
80 if err != nil {
81 return nil, err
82 }
83 return out, nil
84 }
85
86 func (c *registrationAuthorityClient) DeactivateAuthorization(ctx context.Context, in *proto.Authorization, opts ...grpc.CallOption) (*emptypb.Empty, error) {
87 out := new(emptypb.Empty)
88 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/DeactivateAuthorization", in, out, opts...)
89 if err != nil {
90 return nil, err
91 }
92 return out, nil
93 }
94
95 func (c *registrationAuthorityClient) RevokeCertByApplicant(ctx context.Context, in *RevokeCertByApplicantRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
96 out := new(emptypb.Empty)
97 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/RevokeCertByApplicant", in, out, opts...)
98 if err != nil {
99 return nil, err
100 }
101 return out, nil
102 }
103
104 func (c *registrationAuthorityClient) RevokeCertByKey(ctx context.Context, in *RevokeCertByKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
105 out := new(emptypb.Empty)
106 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/RevokeCertByKey", in, out, opts...)
107 if err != nil {
108 return nil, err
109 }
110 return out, nil
111 }
112
113 func (c *registrationAuthorityClient) AdministrativelyRevokeCertificate(ctx context.Context, in *AdministrativelyRevokeCertificateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
114 out := new(emptypb.Empty)
115 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/AdministrativelyRevokeCertificate", in, out, opts...)
116 if err != nil {
117 return nil, err
118 }
119 return out, nil
120 }
121
122 func (c *registrationAuthorityClient) NewOrder(ctx context.Context, in *NewOrderRequest, opts ...grpc.CallOption) (*proto.Order, error) {
123 out := new(proto.Order)
124 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/NewOrder", in, out, opts...)
125 if err != nil {
126 return nil, err
127 }
128 return out, nil
129 }
130
131 func (c *registrationAuthorityClient) FinalizeOrder(ctx context.Context, in *FinalizeOrderRequest, opts ...grpc.CallOption) (*proto.Order, error) {
132 out := new(proto.Order)
133 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/FinalizeOrder", in, out, opts...)
134 if err != nil {
135 return nil, err
136 }
137 return out, nil
138 }
139
140 func (c *registrationAuthorityClient) GenerateOCSP(ctx context.Context, in *GenerateOCSPRequest, opts ...grpc.CallOption) (*proto1.OCSPResponse, error) {
141 out := new(proto1.OCSPResponse)
142 err := c.cc.Invoke(ctx, "/ra.RegistrationAuthority/GenerateOCSP", in, out, opts...)
143 if err != nil {
144 return nil, err
145 }
146 return out, nil
147 }
148
149
150
151
152 type RegistrationAuthorityServer interface {
153 NewRegistration(context.Context, *proto.Registration) (*proto.Registration, error)
154 UpdateRegistration(context.Context, *UpdateRegistrationRequest) (*proto.Registration, error)
155 PerformValidation(context.Context, *PerformValidationRequest) (*proto.Authorization, error)
156 DeactivateRegistration(context.Context, *proto.Registration) (*emptypb.Empty, error)
157 DeactivateAuthorization(context.Context, *proto.Authorization) (*emptypb.Empty, error)
158 RevokeCertByApplicant(context.Context, *RevokeCertByApplicantRequest) (*emptypb.Empty, error)
159 RevokeCertByKey(context.Context, *RevokeCertByKeyRequest) (*emptypb.Empty, error)
160 AdministrativelyRevokeCertificate(context.Context, *AdministrativelyRevokeCertificateRequest) (*emptypb.Empty, error)
161 NewOrder(context.Context, *NewOrderRequest) (*proto.Order, error)
162 FinalizeOrder(context.Context, *FinalizeOrderRequest) (*proto.Order, error)
163
164 GenerateOCSP(context.Context, *GenerateOCSPRequest) (*proto1.OCSPResponse, error)
165 mustEmbedUnimplementedRegistrationAuthorityServer()
166 }
167
168
169 type UnimplementedRegistrationAuthorityServer struct {
170 }
171
172 func (UnimplementedRegistrationAuthorityServer) NewRegistration(context.Context, *proto.Registration) (*proto.Registration, error) {
173 return nil, status.Errorf(codes.Unimplemented, "method NewRegistration not implemented")
174 }
175 func (UnimplementedRegistrationAuthorityServer) UpdateRegistration(context.Context, *UpdateRegistrationRequest) (*proto.Registration, error) {
176 return nil, status.Errorf(codes.Unimplemented, "method UpdateRegistration not implemented")
177 }
178 func (UnimplementedRegistrationAuthorityServer) PerformValidation(context.Context, *PerformValidationRequest) (*proto.Authorization, error) {
179 return nil, status.Errorf(codes.Unimplemented, "method PerformValidation not implemented")
180 }
181 func (UnimplementedRegistrationAuthorityServer) DeactivateRegistration(context.Context, *proto.Registration) (*emptypb.Empty, error) {
182 return nil, status.Errorf(codes.Unimplemented, "method DeactivateRegistration not implemented")
183 }
184 func (UnimplementedRegistrationAuthorityServer) DeactivateAuthorization(context.Context, *proto.Authorization) (*emptypb.Empty, error) {
185 return nil, status.Errorf(codes.Unimplemented, "method DeactivateAuthorization not implemented")
186 }
187 func (UnimplementedRegistrationAuthorityServer) RevokeCertByApplicant(context.Context, *RevokeCertByApplicantRequest) (*emptypb.Empty, error) {
188 return nil, status.Errorf(codes.Unimplemented, "method RevokeCertByApplicant not implemented")
189 }
190 func (UnimplementedRegistrationAuthorityServer) RevokeCertByKey(context.Context, *RevokeCertByKeyRequest) (*emptypb.Empty, error) {
191 return nil, status.Errorf(codes.Unimplemented, "method RevokeCertByKey not implemented")
192 }
193 func (UnimplementedRegistrationAuthorityServer) AdministrativelyRevokeCertificate(context.Context, *AdministrativelyRevokeCertificateRequest) (*emptypb.Empty, error) {
194 return nil, status.Errorf(codes.Unimplemented, "method AdministrativelyRevokeCertificate not implemented")
195 }
196 func (UnimplementedRegistrationAuthorityServer) NewOrder(context.Context, *NewOrderRequest) (*proto.Order, error) {
197 return nil, status.Errorf(codes.Unimplemented, "method NewOrder not implemented")
198 }
199 func (UnimplementedRegistrationAuthorityServer) FinalizeOrder(context.Context, *FinalizeOrderRequest) (*proto.Order, error) {
200 return nil, status.Errorf(codes.Unimplemented, "method FinalizeOrder not implemented")
201 }
202 func (UnimplementedRegistrationAuthorityServer) GenerateOCSP(context.Context, *GenerateOCSPRequest) (*proto1.OCSPResponse, error) {
203 return nil, status.Errorf(codes.Unimplemented, "method GenerateOCSP not implemented")
204 }
205 func (UnimplementedRegistrationAuthorityServer) mustEmbedUnimplementedRegistrationAuthorityServer() {}
206
207
208
209
210 type UnsafeRegistrationAuthorityServer interface {
211 mustEmbedUnimplementedRegistrationAuthorityServer()
212 }
213
214 func RegisterRegistrationAuthorityServer(s grpc.ServiceRegistrar, srv RegistrationAuthorityServer) {
215 s.RegisterService(&RegistrationAuthority_ServiceDesc, srv)
216 }
217
218 func _RegistrationAuthority_NewRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
219 in := new(proto.Registration)
220 if err := dec(in); err != nil {
221 return nil, err
222 }
223 if interceptor == nil {
224 return srv.(RegistrationAuthorityServer).NewRegistration(ctx, in)
225 }
226 info := &grpc.UnaryServerInfo{
227 Server: srv,
228 FullMethod: "/ra.RegistrationAuthority/NewRegistration",
229 }
230 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
231 return srv.(RegistrationAuthorityServer).NewRegistration(ctx, req.(*proto.Registration))
232 }
233 return interceptor(ctx, in, info, handler)
234 }
235
236 func _RegistrationAuthority_UpdateRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
237 in := new(UpdateRegistrationRequest)
238 if err := dec(in); err != nil {
239 return nil, err
240 }
241 if interceptor == nil {
242 return srv.(RegistrationAuthorityServer).UpdateRegistration(ctx, in)
243 }
244 info := &grpc.UnaryServerInfo{
245 Server: srv,
246 FullMethod: "/ra.RegistrationAuthority/UpdateRegistration",
247 }
248 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
249 return srv.(RegistrationAuthorityServer).UpdateRegistration(ctx, req.(*UpdateRegistrationRequest))
250 }
251 return interceptor(ctx, in, info, handler)
252 }
253
254 func _RegistrationAuthority_PerformValidation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
255 in := new(PerformValidationRequest)
256 if err := dec(in); err != nil {
257 return nil, err
258 }
259 if interceptor == nil {
260 return srv.(RegistrationAuthorityServer).PerformValidation(ctx, in)
261 }
262 info := &grpc.UnaryServerInfo{
263 Server: srv,
264 FullMethod: "/ra.RegistrationAuthority/PerformValidation",
265 }
266 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
267 return srv.(RegistrationAuthorityServer).PerformValidation(ctx, req.(*PerformValidationRequest))
268 }
269 return interceptor(ctx, in, info, handler)
270 }
271
272 func _RegistrationAuthority_DeactivateRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
273 in := new(proto.Registration)
274 if err := dec(in); err != nil {
275 return nil, err
276 }
277 if interceptor == nil {
278 return srv.(RegistrationAuthorityServer).DeactivateRegistration(ctx, in)
279 }
280 info := &grpc.UnaryServerInfo{
281 Server: srv,
282 FullMethod: "/ra.RegistrationAuthority/DeactivateRegistration",
283 }
284 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
285 return srv.(RegistrationAuthorityServer).DeactivateRegistration(ctx, req.(*proto.Registration))
286 }
287 return interceptor(ctx, in, info, handler)
288 }
289
290 func _RegistrationAuthority_DeactivateAuthorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
291 in := new(proto.Authorization)
292 if err := dec(in); err != nil {
293 return nil, err
294 }
295 if interceptor == nil {
296 return srv.(RegistrationAuthorityServer).DeactivateAuthorization(ctx, in)
297 }
298 info := &grpc.UnaryServerInfo{
299 Server: srv,
300 FullMethod: "/ra.RegistrationAuthority/DeactivateAuthorization",
301 }
302 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
303 return srv.(RegistrationAuthorityServer).DeactivateAuthorization(ctx, req.(*proto.Authorization))
304 }
305 return interceptor(ctx, in, info, handler)
306 }
307
308 func _RegistrationAuthority_RevokeCertByApplicant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
309 in := new(RevokeCertByApplicantRequest)
310 if err := dec(in); err != nil {
311 return nil, err
312 }
313 if interceptor == nil {
314 return srv.(RegistrationAuthorityServer).RevokeCertByApplicant(ctx, in)
315 }
316 info := &grpc.UnaryServerInfo{
317 Server: srv,
318 FullMethod: "/ra.RegistrationAuthority/RevokeCertByApplicant",
319 }
320 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
321 return srv.(RegistrationAuthorityServer).RevokeCertByApplicant(ctx, req.(*RevokeCertByApplicantRequest))
322 }
323 return interceptor(ctx, in, info, handler)
324 }
325
326 func _RegistrationAuthority_RevokeCertByKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
327 in := new(RevokeCertByKeyRequest)
328 if err := dec(in); err != nil {
329 return nil, err
330 }
331 if interceptor == nil {
332 return srv.(RegistrationAuthorityServer).RevokeCertByKey(ctx, in)
333 }
334 info := &grpc.UnaryServerInfo{
335 Server: srv,
336 FullMethod: "/ra.RegistrationAuthority/RevokeCertByKey",
337 }
338 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
339 return srv.(RegistrationAuthorityServer).RevokeCertByKey(ctx, req.(*RevokeCertByKeyRequest))
340 }
341 return interceptor(ctx, in, info, handler)
342 }
343
344 func _RegistrationAuthority_AdministrativelyRevokeCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
345 in := new(AdministrativelyRevokeCertificateRequest)
346 if err := dec(in); err != nil {
347 return nil, err
348 }
349 if interceptor == nil {
350 return srv.(RegistrationAuthorityServer).AdministrativelyRevokeCertificate(ctx, in)
351 }
352 info := &grpc.UnaryServerInfo{
353 Server: srv,
354 FullMethod: "/ra.RegistrationAuthority/AdministrativelyRevokeCertificate",
355 }
356 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
357 return srv.(RegistrationAuthorityServer).AdministrativelyRevokeCertificate(ctx, req.(*AdministrativelyRevokeCertificateRequest))
358 }
359 return interceptor(ctx, in, info, handler)
360 }
361
362 func _RegistrationAuthority_NewOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
363 in := new(NewOrderRequest)
364 if err := dec(in); err != nil {
365 return nil, err
366 }
367 if interceptor == nil {
368 return srv.(RegistrationAuthorityServer).NewOrder(ctx, in)
369 }
370 info := &grpc.UnaryServerInfo{
371 Server: srv,
372 FullMethod: "/ra.RegistrationAuthority/NewOrder",
373 }
374 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
375 return srv.(RegistrationAuthorityServer).NewOrder(ctx, req.(*NewOrderRequest))
376 }
377 return interceptor(ctx, in, info, handler)
378 }
379
380 func _RegistrationAuthority_FinalizeOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
381 in := new(FinalizeOrderRequest)
382 if err := dec(in); err != nil {
383 return nil, err
384 }
385 if interceptor == nil {
386 return srv.(RegistrationAuthorityServer).FinalizeOrder(ctx, in)
387 }
388 info := &grpc.UnaryServerInfo{
389 Server: srv,
390 FullMethod: "/ra.RegistrationAuthority/FinalizeOrder",
391 }
392 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
393 return srv.(RegistrationAuthorityServer).FinalizeOrder(ctx, req.(*FinalizeOrderRequest))
394 }
395 return interceptor(ctx, in, info, handler)
396 }
397
398 func _RegistrationAuthority_GenerateOCSP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
399 in := new(GenerateOCSPRequest)
400 if err := dec(in); err != nil {
401 return nil, err
402 }
403 if interceptor == nil {
404 return srv.(RegistrationAuthorityServer).GenerateOCSP(ctx, in)
405 }
406 info := &grpc.UnaryServerInfo{
407 Server: srv,
408 FullMethod: "/ra.RegistrationAuthority/GenerateOCSP",
409 }
410 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
411 return srv.(RegistrationAuthorityServer).GenerateOCSP(ctx, req.(*GenerateOCSPRequest))
412 }
413 return interceptor(ctx, in, info, handler)
414 }
415
416
417
418
419 var RegistrationAuthority_ServiceDesc = grpc.ServiceDesc{
420 ServiceName: "ra.RegistrationAuthority",
421 HandlerType: (*RegistrationAuthorityServer)(nil),
422 Methods: []grpc.MethodDesc{
423 {
424 MethodName: "NewRegistration",
425 Handler: _RegistrationAuthority_NewRegistration_Handler,
426 },
427 {
428 MethodName: "UpdateRegistration",
429 Handler: _RegistrationAuthority_UpdateRegistration_Handler,
430 },
431 {
432 MethodName: "PerformValidation",
433 Handler: _RegistrationAuthority_PerformValidation_Handler,
434 },
435 {
436 MethodName: "DeactivateRegistration",
437 Handler: _RegistrationAuthority_DeactivateRegistration_Handler,
438 },
439 {
440 MethodName: "DeactivateAuthorization",
441 Handler: _RegistrationAuthority_DeactivateAuthorization_Handler,
442 },
443 {
444 MethodName: "RevokeCertByApplicant",
445 Handler: _RegistrationAuthority_RevokeCertByApplicant_Handler,
446 },
447 {
448 MethodName: "RevokeCertByKey",
449 Handler: _RegistrationAuthority_RevokeCertByKey_Handler,
450 },
451 {
452 MethodName: "AdministrativelyRevokeCertificate",
453 Handler: _RegistrationAuthority_AdministrativelyRevokeCertificate_Handler,
454 },
455 {
456 MethodName: "NewOrder",
457 Handler: _RegistrationAuthority_NewOrder_Handler,
458 },
459 {
460 MethodName: "FinalizeOrder",
461 Handler: _RegistrationAuthority_FinalizeOrder_Handler,
462 },
463 {
464 MethodName: "GenerateOCSP",
465 Handler: _RegistrationAuthority_GenerateOCSP_Handler,
466 },
467 },
468 Streams: []grpc.StreamDesc{},
469 Metadata: "ra.proto",
470 }
471
View as plain text