forked from juanpisani/geoService
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeoService_pb2_grpc.py
97 lines (84 loc) · 3.67 KB
/
geoService_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 geoService_pb2 as geoService__pb2
class GeoServiceStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetAllCountries = channel.unary_unary(
'/GeoService/GetAllCountries',
request_serializer=geoService__pb2.Empty.SerializeToString,
response_deserializer=geoService__pb2.GetAllCountriesReply.FromString,
)
self.GetSubCountries = channel.unary_unary(
'/GeoService/GetSubCountries',
request_serializer=geoService__pb2.Country.SerializeToString,
response_deserializer=geoService__pb2.GetSubCountriesReply.FromString,
)
self.GetCities = channel.unary_unary(
'/GeoService/GetCities',
request_serializer=geoService__pb2.SubCountry.SerializeToString,
response_deserializer=geoService__pb2.GetCitiesReply.FromString,
)
self.GetLocationOfIp = channel.unary_unary(
'/GeoService/GetLocationOfIp',
request_serializer=geoService__pb2.Ip.SerializeToString,
response_deserializer=geoService__pb2.GetLocationOfIpReply.FromString,
)
class GeoServiceServicer(object):
# missing associated documentation comment in .proto file
pass
def GetAllCountries(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 GetSubCountries(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 GetCities(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 GetLocationOfIp(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_GeoServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetAllCountries': grpc.unary_unary_rpc_method_handler(
servicer.GetAllCountries,
request_deserializer=geoService__pb2.Empty.FromString,
response_serializer=geoService__pb2.GetAllCountriesReply.SerializeToString,
),
'GetSubCountries': grpc.unary_unary_rpc_method_handler(
servicer.GetSubCountries,
request_deserializer=geoService__pb2.Country.FromString,
response_serializer=geoService__pb2.GetSubCountriesReply.SerializeToString,
),
'GetCities': grpc.unary_unary_rpc_method_handler(
servicer.GetCities,
request_deserializer=geoService__pb2.SubCountry.FromString,
response_serializer=geoService__pb2.GetCitiesReply.SerializeToString,
),
'GetLocationOfIp': grpc.unary_unary_rpc_method_handler(
servicer.GetLocationOfIp,
request_deserializer=geoService__pb2.Ip.FromString,
response_serializer=geoService__pb2.GetLocationOfIpReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'GeoService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))