morus_pb2_grpc.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
  2. """Client and server classes corresponding to protobuf-defined services."""
  3. import grpc
  4. import morus_pb2 as morus__pb2
  5. class MarkdownStub(object):
  6. """----------------------------------------------------------------------------
  7. """
  8. def __init__(self, channel):
  9. """Constructor.
  10. Args:
  11. channel: A grpc.Channel.
  12. """
  13. self.ToHtml = channel.unary_unary(
  14. '/mint.morus.v1.Markdown/ToHtml',
  15. request_serializer=morus__pb2.MarkdownToHtmlRequest.SerializeToString,
  16. response_deserializer=morus__pb2.MarkdownToHtmlResponse.FromString,
  17. )
  18. class MarkdownServicer(object):
  19. """----------------------------------------------------------------------------
  20. """
  21. def ToHtml(self, request, context):
  22. """Missing associated documentation comment in .proto file."""
  23. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  24. context.set_details('Method not implemented!')
  25. raise NotImplementedError('Method not implemented!')
  26. def add_MarkdownServicer_to_server(servicer, server):
  27. rpc_method_handlers = {
  28. 'ToHtml': grpc.unary_unary_rpc_method_handler(
  29. servicer.ToHtml,
  30. request_deserializer=morus__pb2.MarkdownToHtmlRequest.FromString,
  31. response_serializer=morus__pb2.MarkdownToHtmlResponse.SerializeToString,
  32. ),
  33. }
  34. generic_handler = grpc.method_handlers_generic_handler(
  35. 'mint.morus.v1.Markdown', rpc_method_handlers)
  36. server.add_generic_rpc_handlers((generic_handler,))
  37. # This class is part of an EXPERIMENTAL API.
  38. class Markdown(object):
  39. """----------------------------------------------------------------------------
  40. """
  41. @staticmethod
  42. def ToHtml(request,
  43. target,
  44. options=(),
  45. channel_credentials=None,
  46. call_credentials=None,
  47. insecure=False,
  48. compression=None,
  49. wait_for_ready=None,
  50. timeout=None,
  51. metadata=None):
  52. return grpc.experimental.unary_unary(request, target, '/mint.morus.v1.Markdown/ToHtml',
  53. morus__pb2.MarkdownToHtmlRequest.SerializeToString,
  54. morus__pb2.MarkdownToHtmlResponse.FromString,
  55. options, channel_credentials,
  56. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)