Autogenerated update for 05f8a3b57e...a8135fd45c
This commit is contained in:
31
strafesnet/moderation_pb2.py
Normal file
31
strafesnet/moderation_pb2.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: moderation.proto
|
||||
# Protobuf Python Version: 5.26.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
|
||||
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')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_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
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
102
strafesnet/moderation_pb2_grpc.py
Normal file
102
strafesnet/moderation_pb2_grpc.py
Normal file
@@ -0,0 +1,102 @@
|
||||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
||||
"""Client and server classes corresponding to protobuf-defined services."""
|
||||
import grpc
|
||||
import warnings
|
||||
|
||||
from . import moderation_pb2 as moderation__pb2
|
||||
|
||||
GRPC_GENERATED_VERSION = '1.64.1'
|
||||
GRPC_VERSION = grpc.__version__
|
||||
EXPECTED_ERROR_RELEASE = '1.65.0'
|
||||
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
|
||||
_version_not_supported = False
|
||||
|
||||
try:
|
||||
from grpc._utilities import first_version_is_lower
|
||||
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
||||
except ImportError:
|
||||
_version_not_supported = True
|
||||
|
||||
if _version_not_supported:
|
||||
warnings.warn(
|
||||
f'The grpc package installed is at version {GRPC_VERSION},'
|
||||
+ f' but the generated code in moderation_pb2_grpc.py depends on'
|
||||
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
||||
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
||||
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
||||
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
|
||||
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
|
||||
RuntimeWarning
|
||||
)
|
||||
|
||||
|
||||
class ModerationServiceStub(object):
|
||||
"""Missing associated documentation comment in .proto file."""
|
||||
|
||||
def __init__(self, channel):
|
||||
"""Constructor.
|
||||
|
||||
Args:
|
||||
channel: A grpc.Channel.
|
||||
"""
|
||||
self.SetState = channel.unary_unary(
|
||||
'/moderation.ModerationService/SetState',
|
||||
request_serializer=moderation__pb2.SetStateRequest.SerializeToString,
|
||||
response_deserializer=moderation__pb2.Null.FromString,
|
||||
_registered_method=True)
|
||||
|
||||
|
||||
class ModerationServiceServicer(object):
|
||||
"""Missing associated documentation comment in .proto file."""
|
||||
|
||||
def SetState(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 = {
|
||||
'SetState': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.SetState,
|
||||
request_deserializer=moderation__pb2.SetStateRequest.FromString,
|
||||
response_serializer=moderation__pb2.Null.SerializeToString,
|
||||
),
|
||||
}
|
||||
generic_handler = grpc.method_handlers_generic_handler(
|
||||
'moderation.ModerationService', rpc_method_handlers)
|
||||
server.add_generic_rpc_handlers((generic_handler,))
|
||||
server.add_registered_method_handlers('moderation.ModerationService', rpc_method_handlers)
|
||||
|
||||
|
||||
# This class is part of an EXPERIMENTAL API.
|
||||
class ModerationService(object):
|
||||
"""Missing associated documentation comment in .proto file."""
|
||||
|
||||
@staticmethod
|
||||
def SetState(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/SetState',
|
||||
moderation__pb2.SetStateRequest.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