This repository was archived by the owner on Mar 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhwsc_file_transaction_svc_pb2_grpc.py
97 lines (84 loc) · 4.07 KB
/
hwsc_file_transaction_svc_pb2_grpc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import hwsc_file_transaction_svc_pb2 as hwsc__file__transaction__svc__pb2
class FileTransactionServiceStub(object):
"""The file transaction service definition
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetStatus = channel.unary_unary(
'/file.FileTransactionService/GetStatus',
request_serializer=hwsc__file__transaction__svc__pb2.FileTransactionRequest.SerializeToString,
response_deserializer=hwsc__file__transaction__svc__pb2.FileTransactionResponse.FromString,
)
self.UploadFile = channel.stream_unary(
'/file.FileTransactionService/UploadFile',
request_serializer=hwsc__file__transaction__svc__pb2.Chunk.SerializeToString,
response_deserializer=hwsc__file__transaction__svc__pb2.FileTransactionResponse.FromString,
)
self.DownloadZippedFiles = channel.unary_stream(
'/file.FileTransactionService/DownloadZippedFiles',
request_serializer=hwsc__file__transaction__svc__pb2.FileTransactionRequest.SerializeToString,
response_deserializer=hwsc__file__transaction__svc__pb2.Chunk.FromString,
)
self.CreateUserFolder = channel.unary_unary(
'/file.FileTransactionService/CreateUserFolder',
request_serializer=hwsc__file__transaction__svc__pb2.FileTransactionRequest.SerializeToString,
response_deserializer=hwsc__file__transaction__svc__pb2.FileTransactionResponse.FromString,
)
class FileTransactionServiceServicer(object):
"""The file transaction service definition
"""
def GetStatus(self, request, context):
"""Gets status for user
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UploadFile(self, request_iterator, context):
"""Upload files to the storage
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DownloadZippedFiles(self, request, context):
"""Download files from the storage
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def CreateUserFolder(self, request, context):
"""Create user folder in the sorage
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_FileTransactionServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetStatus': grpc.unary_unary_rpc_method_handler(
servicer.GetStatus,
request_deserializer=hwsc__file__transaction__svc__pb2.FileTransactionRequest.FromString,
response_serializer=hwsc__file__transaction__svc__pb2.FileTransactionResponse.SerializeToString,
),
'UploadFile': grpc.stream_unary_rpc_method_handler(
servicer.UploadFile,
request_deserializer=hwsc__file__transaction__svc__pb2.Chunk.FromString,
response_serializer=hwsc__file__transaction__svc__pb2.FileTransactionResponse.SerializeToString,
),
'DownloadZippedFiles': grpc.unary_stream_rpc_method_handler(
servicer.DownloadZippedFiles,
request_deserializer=hwsc__file__transaction__svc__pb2.FileTransactionRequest.FromString,
response_serializer=hwsc__file__transaction__svc__pb2.Chunk.SerializeToString,
),
'CreateUserFolder': grpc.unary_unary_rpc_method_handler(
servicer.CreateUserFolder,
request_deserializer=hwsc__file__transaction__svc__pb2.FileTransactionRequest.FromString,
response_serializer=hwsc__file__transaction__svc__pb2.FileTransactionResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'file.FileTransactionService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))