| 1 |
12b255b |
Dawsh |
2y ago |
# Generated by the Protocol Buffers compiler. DO NOT EDIT! |
| 2 |
12b255b |
Dawsh |
2y ago |
# source: app/marznode/marznode.proto |
| 3 |
12b255b |
Dawsh |
2y ago |
# plugin: grpclib.plugin.main |
| 4 |
12b255b |
Dawsh |
2y ago |
import abc |
| 5 |
12b255b |
Dawsh |
2y ago |
import typing |
| 6 |
12b255b |
Dawsh |
2y ago |
|
| 7 |
12b255b |
Dawsh |
2y ago |
import grpclib.const |
| 8 |
12b255b |
Dawsh |
2y ago |
import grpclib.client |
| 9 |
12b255b |
Dawsh |
2y ago |
if typing.TYPE_CHECKING: |
| 10 |
12b255b |
Dawsh |
2y ago |
import grpclib.server |
| 11 |
12b255b |
Dawsh |
2y ago |
|
| 12 |
12b255b |
Dawsh |
2y ago |
import app.marznode.marznode_pb2 |
| 13 |
12b255b |
Dawsh |
2y ago |
|
| 14 |
12b255b |
Dawsh |
2y ago |
|
| 15 |
12b255b |
Dawsh |
2y ago |
class MarzServiceBase(abc.ABC): |
| 16 |
12b255b |
Dawsh |
2y ago |
|
| 17 |
12b255b |
Dawsh |
2y ago |
@abc.abstractmethod |
| 18 |
f6a32ea |
Dawsh |
2y ago |
async def SyncUsers(self, stream: 'grpclib.server.Stream[app.marznode.marznode_pb2.UserData, app.marznode.marznode_pb2.Empty]') -> None: |
| 19 |
12b255b |
Dawsh |
2y ago |
pass |
| 20 |
12b255b |
Dawsh |
2y ago |
|
| 21 |
12b255b |
Dawsh |
2y ago |
@abc.abstractmethod |
| 22 |
f6a32ea |
Dawsh |
2y ago |
async def RepopulateUsers(self, stream: 'grpclib.server.Stream[app.marznode.marznode_pb2.UsersData, app.marznode.marznode_pb2.Empty]') -> None: |
| 23 |
12b255b |
Dawsh |
2y ago |
pass |
| 24 |
12b255b |
Dawsh |
2y ago |
|
| 25 |
12b255b |
Dawsh |
2y ago |
@abc.abstractmethod |
| 26 |
12b255b |
Dawsh |
2y ago |
async def FetchInbounds(self, stream: 'grpclib.server.Stream[app.marznode.marznode_pb2.Empty, app.marznode.marznode_pb2.InboundsResponse]') -> None: |
| 27 |
12b255b |
Dawsh |
2y ago |
pass |
| 28 |
12b255b |
Dawsh |
2y ago |
|
| 29 |
12b255b |
Dawsh |
2y ago |
@abc.abstractmethod |
| 30 |
12b255b |
Dawsh |
2y ago |
async def FetchUsersStats(self, stream: 'grpclib.server.Stream[app.marznode.marznode_pb2.Empty, app.marznode.marznode_pb2.UsersStats]') -> None: |
| 31 |
12b255b |
Dawsh |
2y ago |
pass |
| 32 |
12b255b |
Dawsh |
2y ago |
|
| 33 |
12b255b |
Dawsh |
2y ago |
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]: |
| 34 |
12b255b |
Dawsh |
2y ago |
return { |
| 35 |
f6a32ea |
Dawsh |
2y ago |
'/marznode.MarzService/SyncUsers': grpclib.const.Handler( |
| 36 |
f6a32ea |
Dawsh |
2y ago |
self.SyncUsers, |
| 37 |
f6a32ea |
Dawsh |
2y ago |
grpclib.const.Cardinality.STREAM_UNARY, |
| 38 |
f6a32ea |
Dawsh |
2y ago |
app.marznode.marznode_pb2.UserData, |
| 39 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.Empty, |
| 40 |
12b255b |
Dawsh |
2y ago |
), |
| 41 |
12b255b |
Dawsh |
2y ago |
'/marznode.MarzService/RepopulateUsers': grpclib.const.Handler( |
| 42 |
12b255b |
Dawsh |
2y ago |
self.RepopulateUsers, |
| 43 |
12b255b |
Dawsh |
2y ago |
grpclib.const.Cardinality.UNARY_UNARY, |
| 44 |
f6a32ea |
Dawsh |
2y ago |
app.marznode.marznode_pb2.UsersData, |
| 45 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.Empty, |
| 46 |
12b255b |
Dawsh |
2y ago |
), |
| 47 |
12b255b |
Dawsh |
2y ago |
'/marznode.MarzService/FetchInbounds': grpclib.const.Handler( |
| 48 |
12b255b |
Dawsh |
2y ago |
self.FetchInbounds, |
| 49 |
12b255b |
Dawsh |
2y ago |
grpclib.const.Cardinality.UNARY_UNARY, |
| 50 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.Empty, |
| 51 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.InboundsResponse, |
| 52 |
12b255b |
Dawsh |
2y ago |
), |
| 53 |
12b255b |
Dawsh |
2y ago |
'/marznode.MarzService/FetchUsersStats': grpclib.const.Handler( |
| 54 |
12b255b |
Dawsh |
2y ago |
self.FetchUsersStats, |
| 55 |
12b255b |
Dawsh |
2y ago |
grpclib.const.Cardinality.UNARY_UNARY, |
| 56 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.Empty, |
| 57 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.UsersStats, |
| 58 |
12b255b |
Dawsh |
2y ago |
), |
| 59 |
12b255b |
Dawsh |
2y ago |
} |
| 60 |
12b255b |
Dawsh |
2y ago |
|
| 61 |
12b255b |
Dawsh |
2y ago |
|
| 62 |
12b255b |
Dawsh |
2y ago |
class MarzServiceStub: |
| 63 |
12b255b |
Dawsh |
2y ago |
|
| 64 |
12b255b |
Dawsh |
2y ago |
def __init__(self, channel: grpclib.client.Channel) -> None: |
| 65 |
f6a32ea |
Dawsh |
2y ago |
self.SyncUsers = grpclib.client.StreamUnaryMethod( |
| 66 |
12b255b |
Dawsh |
2y ago |
channel, |
| 67 |
f6a32ea |
Dawsh |
2y ago |
'/marznode.MarzService/SyncUsers', |
| 68 |
f6a32ea |
Dawsh |
2y ago |
app.marznode.marznode_pb2.UserData, |
| 69 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.Empty, |
| 70 |
12b255b |
Dawsh |
2y ago |
) |
| 71 |
12b255b |
Dawsh |
2y ago |
self.RepopulateUsers = grpclib.client.UnaryUnaryMethod( |
| 72 |
12b255b |
Dawsh |
2y ago |
channel, |
| 73 |
12b255b |
Dawsh |
2y ago |
'/marznode.MarzService/RepopulateUsers', |
| 74 |
f6a32ea |
Dawsh |
2y ago |
app.marznode.marznode_pb2.UsersData, |
| 75 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.Empty, |
| 76 |
12b255b |
Dawsh |
2y ago |
) |
| 77 |
12b255b |
Dawsh |
2y ago |
self.FetchInbounds = grpclib.client.UnaryUnaryMethod( |
| 78 |
12b255b |
Dawsh |
2y ago |
channel, |
| 79 |
12b255b |
Dawsh |
2y ago |
'/marznode.MarzService/FetchInbounds', |
| 80 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.Empty, |
| 81 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.InboundsResponse, |
| 82 |
12b255b |
Dawsh |
2y ago |
) |
| 83 |
12b255b |
Dawsh |
2y ago |
self.FetchUsersStats = grpclib.client.UnaryUnaryMethod( |
| 84 |
12b255b |
Dawsh |
2y ago |
channel, |
| 85 |
12b255b |
Dawsh |
2y ago |
'/marznode.MarzService/FetchUsersStats', |
| 86 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.Empty, |
| 87 |
12b255b |
Dawsh |
2y ago |
app.marznode.marznode_pb2.UsersStats, |
| 88 |
12b255b |
Dawsh |
2y ago |
) |