forked from turbonomic/demoapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser_service_pb2_grpc.py
114 lines (100 loc) · 4.61 KB
/
user_service_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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import user_service_pb2 as user__service__pb2
class TwitterUserStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetUser = channel.unary_unary(
'/twitteruser.TwitterUser/GetUser',
request_serializer=user__service__pb2.GetUserRequest.SerializeToString,
response_deserializer=user__service__pb2.GetUserResponse.FromString,
)
self.GetUsers = channel.unary_unary(
'/twitteruser.TwitterUser/GetUsers',
request_serializer=user__service__pb2.GetUsersRequest.SerializeToString,
response_deserializer=user__service__pb2.GetUsersResponse.FromString,
)
self.CheckPassword = channel.unary_unary(
'/twitteruser.TwitterUser/CheckPassword',
request_serializer=user__service__pb2.CheckPasswordRequest.SerializeToString,
response_deserializer=user__service__pb2.CheckPasswordResponse.FromString,
)
self.CheckSession = channel.unary_unary(
'/twitteruser.TwitterUser/CheckSession',
request_serializer=user__service__pb2.CheckSessionRequest.SerializeToString,
response_deserializer=user__service__pb2.CheckSessionResponse.FromString,
)
self.RemoveSession = channel.unary_unary(
'/twitteruser.TwitterUser/RemoveSession',
request_serializer=user__service__pb2.RemoveSessionRequest.SerializeToString,
response_deserializer=user__service__pb2.RemoveSessionResponse.FromString,
)
class TwitterUserServicer(object):
# missing associated documentation comment in .proto file
pass
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 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 CheckPassword(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 CheckSession(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 RemoveSession(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_TwitterUserServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetUser': grpc.unary_unary_rpc_method_handler(
servicer.GetUser,
request_deserializer=user__service__pb2.GetUserRequest.FromString,
response_serializer=user__service__pb2.GetUserResponse.SerializeToString,
),
'GetUsers': grpc.unary_unary_rpc_method_handler(
servicer.GetUsers,
request_deserializer=user__service__pb2.GetUsersRequest.FromString,
response_serializer=user__service__pb2.GetUsersResponse.SerializeToString,
),
'CheckPassword': grpc.unary_unary_rpc_method_handler(
servicer.CheckPassword,
request_deserializer=user__service__pb2.CheckPasswordRequest.FromString,
response_serializer=user__service__pb2.CheckPasswordResponse.SerializeToString,
),
'CheckSession': grpc.unary_unary_rpc_method_handler(
servicer.CheckSession,
request_deserializer=user__service__pb2.CheckSessionRequest.FromString,
response_serializer=user__service__pb2.CheckSessionResponse.SerializeToString,
),
'RemoveSession': grpc.unary_unary_rpc_method_handler(
servicer.RemoveSession,
request_deserializer=user__service__pb2.RemoveSessionRequest.FromString,
response_serializer=user__service__pb2.RemoveSessionResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'twitteruser.TwitterUser', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))