Autogenerated update for a8135fd45c...b5b8cc5413
This commit is contained in:
strafesnet
@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10moderation.proto\x12\nmoderation\"\x06\n\x04Null\"Y\n\x0fSetStateRequest\x12\x0e\n\x06UserID\x18\x01 \x01(\x03\x12\x13\n\x0bModeratorID\x18\x02 \x01(\x03\x12\x10\n\x08ReasonID\x18\x03 \x01(\x05\x12\x0f\n\x07StateID\x18\x04 \x01(\x05\x32N\n\x11ModerationService\x12\x39\n\x08SetState\x12\x1b.moderation.SetStateRequest\x1a\x10.moderation.NullB-Z+git.itzana.me/strafesnet/go-grpc/moderationb\x06proto3')
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10moderation.proto\x12\nmoderation\x1a\x1cgoogle/protobuf/struct.proto\"\x06\n\x04Null\"Y\n\x0fSetStateRequest\x12\x0e\n\x06UserID\x18\x01 \x01(\x03\x12\x13\n\x0bModeratorID\x18\x02 \x01(\x03\x12\x10\n\x08ReasonID\x18\x03 \x01(\x05\x12\x0f\n\x07StateID\x18\x04 \x01(\x05\"\xf1\x01\n\x0eSetMuteRequest\x12\x0e\n\x06UserID\x18\x01 \x01(\x03\x12\x13\n\x0bModeratorID\x18\x02 \x01(\x03\x12\r\n\x05Muted\x18\x03 \x01(\x08\x12\x15\n\x08\x44uration\x18\x04 \x01(\x03H\x00\x88\x01\x01\x12\x15\n\x08ReasonID\x18\x05 \x01(\x05H\x01\x88\x01\x01\x12\x17\n\nReasonText\x18\x06 \x01(\tH\x02\x88\x01\x01\x12.\n\x08Metadata\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructH\x03\x88\x01\x01\x42\x0b\n\t_DurationB\x0b\n\t_ReasonIDB\r\n\x0b_ReasonTextB\x0b\n\t_Metadata2\x88\x01\n\x11ModerationService\x12\x39\n\x08SetState\x12\x1b.moderation.SetStateRequest\x1a\x10.moderation.Null\x12\x38\n\x08SetMuted\x12\x1a.moderation.SetMuteRequest\x1a\x10.moderation.NullB-Z+git.itzana.me/strafesnet/go-grpc/moderationb\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
@ -22,10 +23,12 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'moderation_pb2', _globals)
|
||||
if not _descriptor._USE_C_DESCRIPTORS:
|
||||
_globals['DESCRIPTOR']._loaded_options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'Z+git.itzana.me/strafesnet/go-grpc/moderation'
|
||||
_globals['_NULL']._serialized_start=32
|
||||
_globals['_NULL']._serialized_end=38
|
||||
_globals['_SETSTATEREQUEST']._serialized_start=40
|
||||
_globals['_SETSTATEREQUEST']._serialized_end=129
|
||||
_globals['_MODERATIONSERVICE']._serialized_start=131
|
||||
_globals['_MODERATIONSERVICE']._serialized_end=209
|
||||
_globals['_NULL']._serialized_start=62
|
||||
_globals['_NULL']._serialized_end=68
|
||||
_globals['_SETSTATEREQUEST']._serialized_start=70
|
||||
_globals['_SETSTATEREQUEST']._serialized_end=159
|
||||
_globals['_SETMUTEREQUEST']._serialized_start=162
|
||||
_globals['_SETMUTEREQUEST']._serialized_end=403
|
||||
_globals['_MODERATIONSERVICE']._serialized_start=406
|
||||
_globals['_MODERATIONSERVICE']._serialized_end=542
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
|
@ -44,6 +44,11 @@ class ModerationServiceStub(object):
|
||||
request_serializer=moderation__pb2.SetStateRequest.SerializeToString,
|
||||
response_deserializer=moderation__pb2.Null.FromString,
|
||||
_registered_method=True)
|
||||
self.SetMuted = channel.unary_unary(
|
||||
'/moderation.ModerationService/SetMuted',
|
||||
request_serializer=moderation__pb2.SetMuteRequest.SerializeToString,
|
||||
response_deserializer=moderation__pb2.Null.FromString,
|
||||
_registered_method=True)
|
||||
|
||||
|
||||
class ModerationServiceServicer(object):
|
||||
@ -55,6 +60,12 @@ class ModerationServiceServicer(object):
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def SetMuted(self, request, context):
|
||||
"""Missing associated documentation comment in .proto file."""
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
|
||||
def add_ModerationServiceServicer_to_server(servicer, server):
|
||||
rpc_method_handlers = {
|
||||
@ -63,6 +74,11 @@ def add_ModerationServiceServicer_to_server(servicer, server):
|
||||
request_deserializer=moderation__pb2.SetStateRequest.FromString,
|
||||
response_serializer=moderation__pb2.Null.SerializeToString,
|
||||
),
|
||||
'SetMuted': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.SetMuted,
|
||||
request_deserializer=moderation__pb2.SetMuteRequest.FromString,
|
||||
response_serializer=moderation__pb2.Null.SerializeToString,
|
||||
),
|
||||
}
|
||||
generic_handler = grpc.method_handlers_generic_handler(
|
||||
'moderation.ModerationService', rpc_method_handlers)
|
||||
@ -100,3 +116,30 @@ class ModerationService(object):
|
||||
timeout,
|
||||
metadata,
|
||||
_registered_method=True)
|
||||
|
||||
@staticmethod
|
||||
def SetMuted(request,
|
||||
target,
|
||||
options=(),
|
||||
channel_credentials=None,
|
||||
call_credentials=None,
|
||||
insecure=False,
|
||||
compression=None,
|
||||
wait_for_ready=None,
|
||||
timeout=None,
|
||||
metadata=None):
|
||||
return grpc.experimental.unary_unary(
|
||||
request,
|
||||
target,
|
||||
'/moderation.ModerationService/SetMuted',
|
||||
moderation__pb2.SetMuteRequest.SerializeToString,
|
||||
moderation__pb2.Null.FromString,
|
||||
options,
|
||||
channel_credentials,
|
||||
insecure,
|
||||
call_credentials,
|
||||
compression,
|
||||
wait_for_ready,
|
||||
timeout,
|
||||
metadata,
|
||||
_registered_method=True)
|
||||
|
Reference in New Issue
Block a user