Skip to content

Commit 15106fd

Browse files
authored
Merge pull request #16 from jzelinskie/legacy-registration
v0: add legacy registration
2 parents 47a8c1a + 42b2f39 commit 15106fd

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
package v0
2+
3+
import "google.golang.org/grpc"
4+
5+
// RegisterACLServiceServer registers an ACLService under its legacy
6+
// package-less descriptor.
7+
func RegisterLegacyACLServiceServer(s grpc.ServiceRegistrar, srv ACLServiceServer) {
8+
s.RegisterService(&Legacy_ACLService_ServiceDesc, srv)
9+
}
10+
11+
// Legacy_ACLService_ServiceDesc is an grpc.ServiceDesc for the original
12+
// ACLService service that had no Protobuf package.
13+
//
14+
// It's only intended for direct use with grpc.RegisterService,
15+
// and not to be introspected or modified (even as a copy)
16+
var Legacy_ACLService_ServiceDesc = grpc.ServiceDesc{
17+
ServiceName: "ACLService",
18+
HandlerType: (*ACLServiceServer)(nil),
19+
Methods: []grpc.MethodDesc{
20+
{
21+
MethodName: "Read",
22+
Handler: _ACLService_Read_Handler,
23+
},
24+
{
25+
MethodName: "Write",
26+
Handler: _ACLService_Write_Handler,
27+
},
28+
{
29+
MethodName: "Check",
30+
Handler: _ACLService_Check_Handler,
31+
},
32+
{
33+
MethodName: "ContentChangeCheck",
34+
Handler: _ACLService_ContentChangeCheck_Handler,
35+
},
36+
{
37+
MethodName: "Expand",
38+
Handler: _ACLService_Expand_Handler,
39+
},
40+
{
41+
MethodName: "Lookup",
42+
Handler: _ACLService_Lookup_Handler,
43+
},
44+
},
45+
Streams: []grpc.StreamDesc{},
46+
Metadata: "authzed/api/v0/acl_service.proto",
47+
}
48+
49+
// RegisterLegacyNamespaceServiceServer registers a NamespaceService under
50+
// its legacy package-less descriptor.
51+
func RegisterLegacyNamespaceServiceServer(s grpc.ServiceRegistrar, srv NamespaceServiceServer) {
52+
s.RegisterService(&Legacy_NamespaceService_ServiceDesc, srv)
53+
}
54+
55+
// Legacy_NamespaceService_ServiceDesc is an grpc.ServiceDesc for the original
56+
// NamespaceService service that had no Protobuf package.
57+
//
58+
// It's only intended for direct use with grpc.RegisterService,
59+
// and not to be introspected or modified (even as a copy)
60+
var Legacy_NamespaceService_ServiceDesc = grpc.ServiceDesc{
61+
ServiceName: "NamespaceService",
62+
HandlerType: (*NamespaceServiceServer)(nil),
63+
Methods: []grpc.MethodDesc{
64+
{
65+
MethodName: "ReadConfig",
66+
Handler: _NamespaceService_ReadConfig_Handler,
67+
},
68+
{
69+
MethodName: "WriteConfig",
70+
Handler: _NamespaceService_WriteConfig_Handler,
71+
},
72+
},
73+
Streams: []grpc.StreamDesc{},
74+
Metadata: "authzed/api/v0/namespace_service.proto",
75+
}

0 commit comments

Comments
 (0)