-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathendpoints_pb2_grpc.py
97 lines (84 loc) · 3.5 KB
/
endpoints_pb2_grpc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import endpoints_pb2 as endpoints__pb2
class UsersStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetUsers = channel.unary_unary(
'/endpoints.Users/GetUsers',
request_serializer=endpoints__pb2.EmptyMessage.SerializeToString,
response_deserializer=endpoints__pb2.UserList.FromString,
)
self.getUser = channel.unary_unary(
'/endpoints.Users/getUser',
request_serializer=endpoints__pb2.User.SerializeToString,
response_deserializer=endpoints__pb2.UserReturned.FromString,
)
self.addUser = channel.unary_unary(
'/endpoints.Users/addUser',
request_serializer=endpoints__pb2.User.SerializeToString,
response_deserializer=endpoints__pb2.StatusResponse.FromString,
)
self.deleteUser = channel.unary_unary(
'/endpoints.Users/deleteUser',
request_serializer=endpoints__pb2.User.SerializeToString,
response_deserializer=endpoints__pb2.StatusResponse.FromString,
)
class UsersServicer(object):
# missing associated documentation comment in .proto file
pass
def GetUsers(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def getUser(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def addUser(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def deleteUser(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_UsersServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetUsers': grpc.unary_unary_rpc_method_handler(
servicer.GetUsers,
request_deserializer=endpoints__pb2.EmptyMessage.FromString,
response_serializer=endpoints__pb2.UserList.SerializeToString,
),
'getUser': grpc.unary_unary_rpc_method_handler(
servicer.getUser,
request_deserializer=endpoints__pb2.User.FromString,
response_serializer=endpoints__pb2.UserReturned.SerializeToString,
),
'addUser': grpc.unary_unary_rpc_method_handler(
servicer.addUser,
request_deserializer=endpoints__pb2.User.FromString,
response_serializer=endpoints__pb2.StatusResponse.SerializeToString,
),
'deleteUser': grpc.unary_unary_rpc_method_handler(
servicer.deleteUser,
request_deserializer=endpoints__pb2.User.FromString,
response_serializer=endpoints__pb2.StatusResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'endpoints.Users', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))