Forráskód Böngészése

LDS grpc 接口实现

ChenHaolong 1 éve
szülő
commit
5a5326015f
3 módosított fájl, 243 hozzáadás és 0 törlés
  1. 39 0
      src/llnwLDS_pb2.py
  2. 72 0
      src/llnwLDS_pb2.pyi
  3. 132 0
      src/llnwLDS_pb2_grpc.py

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 39 - 0
src/llnwLDS_pb2.py


+ 72 - 0
src/llnwLDS_pb2.pyi

@@ -0,0 +1,72 @@
+from google.protobuf.internal import containers as _containers
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class Base(_message.Message):
+    __slots__ = ["key", "username"]
+    KEY_FIELD_NUMBER: _ClassVar[int]
+    USERNAME_FIELD_NUMBER: _ClassVar[int]
+    key: str
+    username: str
+    def __init__(self, username: _Optional[str] = ..., key: _Optional[str] = ...) -> None: ...
+
+class CreateLDSRequest(_message.Message):
+    __slots__ = ["accessKey", "base", "bucketName", "location", "name", "path", "region", "secretKey", "shortName"]
+    ACCESSKEY_FIELD_NUMBER: _ClassVar[int]
+    BASE_FIELD_NUMBER: _ClassVar[int]
+    BUCKETNAME_FIELD_NUMBER: _ClassVar[int]
+    LOCATION_FIELD_NUMBER: _ClassVar[int]
+    NAME_FIELD_NUMBER: _ClassVar[int]
+    PATH_FIELD_NUMBER: _ClassVar[int]
+    REGION_FIELD_NUMBER: _ClassVar[int]
+    SECRETKEY_FIELD_NUMBER: _ClassVar[int]
+    SHORTNAME_FIELD_NUMBER: _ClassVar[int]
+    accessKey: str
+    base: Base
+    bucketName: str
+    location: str
+    name: str
+    path: str
+    region: str
+    secretKey: str
+    shortName: str
+    def __init__(self, base: _Optional[_Union[Base, _Mapping]] = ..., shortName: _Optional[str] = ..., accessKey: _Optional[str] = ..., bucketName: _Optional[str] = ..., location: _Optional[str] = ..., path: _Optional[str] = ..., region: _Optional[str] = ..., secretKey: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
+
+class CreateLDSResponse(_message.Message):
+    __slots__ = ["isSuccess"]
+    ISSUCCESS_FIELD_NUMBER: _ClassVar[int]
+    isSuccess: bool
+    def __init__(self, isSuccess: bool = ...) -> None: ...
+
+class DeleteLDSRequest(_message.Message):
+    __slots__ = ["base", "shortName", "uuid"]
+    BASE_FIELD_NUMBER: _ClassVar[int]
+    SHORTNAME_FIELD_NUMBER: _ClassVar[int]
+    UUID_FIELD_NUMBER: _ClassVar[int]
+    base: Base
+    shortName: str
+    uuid: str
+    def __init__(self, base: _Optional[_Union[Base, _Mapping]] = ..., shortName: _Optional[str] = ..., uuid: _Optional[str] = ...) -> None: ...
+
+class DeleteLDSResponse(_message.Message):
+    __slots__ = ["isSuccess"]
+    ISSUCCESS_FIELD_NUMBER: _ClassVar[int]
+    isSuccess: bool
+    def __init__(self, isSuccess: bool = ...) -> None: ...
+
+class ListLDSRequest(_message.Message):
+    __slots__ = ["base", "shortName"]
+    BASE_FIELD_NUMBER: _ClassVar[int]
+    SHORTNAME_FIELD_NUMBER: _ClassVar[int]
+    base: Base
+    shortName: str
+    def __init__(self, base: _Optional[_Union[Base, _Mapping]] = ..., shortName: _Optional[str] = ...) -> None: ...
+
+class ListLDSResponse(_message.Message):
+    __slots__ = ["uuids"]
+    UUIDS_FIELD_NUMBER: _ClassVar[int]
+    uuids: _containers.RepeatedScalarFieldContainer[str]
+    def __init__(self, uuids: _Optional[_Iterable[str]] = ...) -> None: ...

+ 132 - 0
src/llnwLDS_pb2_grpc.py

@@ -0,0 +1,132 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+
+import llnwLDS_pb2 as llnwLDS__pb2
+
+
+class LogDeliveryServiceStub(object):
+    """Missing associated documentation comment in .proto file."""
+
+    def __init__(self, channel):
+        """Constructor.
+
+        Args:
+            channel: A grpc.Channel.
+        """
+        self.CreateLDS = channel.unary_unary(
+                '/llnwApi.Delivery.LDS.LogDeliveryService/CreateLDS',
+                request_serializer=llnwLDS__pb2.CreateLDSRequest.SerializeToString,
+                response_deserializer=llnwLDS__pb2.CreateLDSResponse.FromString,
+                )
+        self.DeleteLDS = channel.unary_unary(
+                '/llnwApi.Delivery.LDS.LogDeliveryService/DeleteLDS',
+                request_serializer=llnwLDS__pb2.DeleteLDSRequest.SerializeToString,
+                response_deserializer=llnwLDS__pb2.DeleteLDSResponse.FromString,
+                )
+        self.ListLDS = channel.unary_unary(
+                '/llnwApi.Delivery.LDS.LogDeliveryService/ListLDS',
+                request_serializer=llnwLDS__pb2.ListLDSRequest.SerializeToString,
+                response_deserializer=llnwLDS__pb2.ListLDSResponse.FromString,
+                )
+
+
+class LogDeliveryServiceServicer(object):
+    """Missing associated documentation comment in .proto file."""
+
+    def CreateLDS(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 DeleteLDS(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 ListLDS(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_LogDeliveryServiceServicer_to_server(servicer, server):
+    rpc_method_handlers = {
+            'CreateLDS': grpc.unary_unary_rpc_method_handler(
+                    servicer.CreateLDS,
+                    request_deserializer=llnwLDS__pb2.CreateLDSRequest.FromString,
+                    response_serializer=llnwLDS__pb2.CreateLDSResponse.SerializeToString,
+            ),
+            'DeleteLDS': grpc.unary_unary_rpc_method_handler(
+                    servicer.DeleteLDS,
+                    request_deserializer=llnwLDS__pb2.DeleteLDSRequest.FromString,
+                    response_serializer=llnwLDS__pb2.DeleteLDSResponse.SerializeToString,
+            ),
+            'ListLDS': grpc.unary_unary_rpc_method_handler(
+                    servicer.ListLDS,
+                    request_deserializer=llnwLDS__pb2.ListLDSRequest.FromString,
+                    response_serializer=llnwLDS__pb2.ListLDSResponse.SerializeToString,
+            ),
+    }
+    generic_handler = grpc.method_handlers_generic_handler(
+            'llnwApi.Delivery.LDS.LogDeliveryService', rpc_method_handlers)
+    server.add_generic_rpc_handlers((generic_handler,))
+
+
+ # This class is part of an EXPERIMENTAL API.
+class LogDeliveryService(object):
+    """Missing associated documentation comment in .proto file."""
+
+    @staticmethod
+    def CreateLDS(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, '/llnwApi.Delivery.LDS.LogDeliveryService/CreateLDS',
+            llnwLDS__pb2.CreateLDSRequest.SerializeToString,
+            llnwLDS__pb2.CreateLDSResponse.FromString,
+            options, channel_credentials,
+            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
+
+    @staticmethod
+    def DeleteLDS(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, '/llnwApi.Delivery.LDS.LogDeliveryService/DeleteLDS',
+            llnwLDS__pb2.DeleteLDSRequest.SerializeToString,
+            llnwLDS__pb2.DeleteLDSResponse.FromString,
+            options, channel_credentials,
+            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
+
+    @staticmethod
+    def ListLDS(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, '/llnwApi.Delivery.LDS.LogDeliveryService/ListLDS',
+            llnwLDS__pb2.ListLDSRequest.SerializeToString,
+            llnwLDS__pb2.ListLDSResponse.FromString,
+            options, channel_credentials,
+            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)