gitscope
← marzneshin / v0.1.0 / app/marznode/marznode_pb2_grpc.py
https://dev.kronoz.win/r/marzneshin.git
app/marznode/marznode_pb2_grpc.py · Python
Blame Raw
  1# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
  2"""Client and server classes corresponding to protobuf-defined services."""
  3import grpc
  4
  5from app.marznode import marznode_pb2 as app_dot_marznode_dot_marznode__pb2
  6
  7
  8class MarzServiceStub(object):
  9    """Missing associated documentation comment in .proto file."""
 10
 11    def __init__(self, channel):
 12        """Constructor.
 13
 14        Args:
 15            channel: A grpc.Channel.
 16        """
 17        self.SyncUsers = channel.stream_unary(
 18                '/marznode.MarzService/SyncUsers',
 19                request_serializer=app_dot_marznode_dot_marznode__pb2.UserData.SerializeToString,
 20                response_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
 21                )
 22        self.RepopulateUsers = channel.unary_unary(
 23                '/marznode.MarzService/RepopulateUsers',
 24                request_serializer=app_dot_marznode_dot_marznode__pb2.UsersData.SerializeToString,
 25                response_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
 26                )
 27        self.FetchInbounds = channel.unary_unary(
 28                '/marznode.MarzService/FetchInbounds',
 29                request_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
 30                response_deserializer=app_dot_marznode_dot_marznode__pb2.InboundsResponse.FromString,
 31                )
 32        self.FetchUsersStats = channel.unary_unary(
 33                '/marznode.MarzService/FetchUsersStats',
 34                request_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
 35                response_deserializer=app_dot_marznode_dot_marznode__pb2.UsersStats.FromString,
 36                )
 37
 38
 39class MarzServiceServicer(object):
 40    """Missing associated documentation comment in .proto file."""
 41
 42    def SyncUsers(self, request_iterator, context):
 43        """Missing associated documentation comment in .proto file."""
 44        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
 45        context.set_details('Method not implemented!')
 46        raise NotImplementedError('Method not implemented!')
 47
 48    def RepopulateUsers(self, request, context):
 49        """Missing associated documentation comment in .proto file."""
 50        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
 51        context.set_details('Method not implemented!')
 52        raise NotImplementedError('Method not implemented!')
 53
 54    def FetchInbounds(self, request, context):
 55        """Missing associated documentation comment in .proto file."""
 56        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
 57        context.set_details('Method not implemented!')
 58        raise NotImplementedError('Method not implemented!')
 59
 60    def FetchUsersStats(self, request, context):
 61        """Missing associated documentation comment in .proto file."""
 62        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
 63        context.set_details('Method not implemented!')
 64        raise NotImplementedError('Method not implemented!')
 65
 66
 67def add_MarzServiceServicer_to_server(servicer, server):
 68    rpc_method_handlers = {
 69            'SyncUsers': grpc.stream_unary_rpc_method_handler(
 70                    servicer.SyncUsers,
 71                    request_deserializer=app_dot_marznode_dot_marznode__pb2.UserData.FromString,
 72                    response_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
 73            ),
 74            'RepopulateUsers': grpc.unary_unary_rpc_method_handler(
 75                    servicer.RepopulateUsers,
 76                    request_deserializer=app_dot_marznode_dot_marznode__pb2.UsersData.FromString,
 77                    response_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
 78            ),
 79            'FetchInbounds': grpc.unary_unary_rpc_method_handler(
 80                    servicer.FetchInbounds,
 81                    request_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
 82                    response_serializer=app_dot_marznode_dot_marznode__pb2.InboundsResponse.SerializeToString,
 83            ),
 84            'FetchUsersStats': grpc.unary_unary_rpc_method_handler(
 85                    servicer.FetchUsersStats,
 86                    request_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
 87                    response_serializer=app_dot_marznode_dot_marznode__pb2.UsersStats.SerializeToString,
 88            ),
 89    }
 90    generic_handler = grpc.method_handlers_generic_handler(
 91            'marznode.MarzService', rpc_method_handlers)
 92    server.add_generic_rpc_handlers((generic_handler,))
 93
 94
 95 # This class is part of an EXPERIMENTAL API.
 96class MarzService(object):
 97    """Missing associated documentation comment in .proto file."""
 98
 99    @staticmethod
100    def SyncUsers(request_iterator,
101            target,
102            options=(),
103            channel_credentials=None,
104            call_credentials=None,
105            insecure=False,
106            compression=None,
107            wait_for_ready=None,
108            timeout=None,
109            metadata=None):
110        return grpc.experimental.stream_unary(request_iterator, target, '/marznode.MarzService/SyncUsers',
111            app_dot_marznode_dot_marznode__pb2.UserData.SerializeToString,
112            app_dot_marznode_dot_marznode__pb2.Empty.FromString,
113            options, channel_credentials,
114            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
115
116    @staticmethod
117    def RepopulateUsers(request,
118            target,
119            options=(),
120            channel_credentials=None,
121            call_credentials=None,
122            insecure=False,
123            compression=None,
124            wait_for_ready=None,
125            timeout=None,
126            metadata=None):
127        return grpc.experimental.unary_unary(request, target, '/marznode.MarzService/RepopulateUsers',
128            app_dot_marznode_dot_marznode__pb2.UsersData.SerializeToString,
129            app_dot_marznode_dot_marznode__pb2.Empty.FromString,
130            options, channel_credentials,
131            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
132
133    @staticmethod
134    def FetchInbounds(request,
135            target,
136            options=(),
137            channel_credentials=None,
138            call_credentials=None,
139            insecure=False,
140            compression=None,
141            wait_for_ready=None,
142            timeout=None,
143            metadata=None):
144        return grpc.experimental.unary_unary(request, target, '/marznode.MarzService/FetchInbounds',
145            app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
146            app_dot_marznode_dot_marznode__pb2.InboundsResponse.FromString,
147            options, channel_credentials,
148            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
149
150    @staticmethod
151    def FetchUsersStats(request,
152            target,
153            options=(),
154            channel_credentials=None,
155            call_credentials=None,
156            insecure=False,
157            compression=None,
158            wait_for_ready=None,
159            timeout=None,
160            metadata=None):
161        return grpc.experimental.unary_unary(request, target, '/marznode.MarzService/FetchUsersStats',
162            app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
163            app_dot_marznode_dot_marznode__pb2.UsersStats.FromString,
164            options, channel_credentials,
165            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)