Skip to content

Commit

Permalink
moved sdk to cli repo
Browse files Browse the repository at this point in the history
  • Loading branch information
vforvalerio87 committed May 20, 2019
1 parent 8535f5c commit 1462707
Show file tree
Hide file tree
Showing 23 changed files with 1,142 additions and 852 deletions.
278 changes: 278 additions & 0 deletions snet_sdk/resources/proto/control_service_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 82 additions & 0 deletions snet_sdk/resources/proto/control_service_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

import control_service_pb2 as control__service__pb2


class ProviderControlServiceStub(object):
# missing associated documentation comment in .proto file
pass

def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetListUnclaimed = channel.unary_unary(
'/escrow.ProviderControlService/GetListUnclaimed',
request_serializer=control__service__pb2.GetPaymentsListRequest.SerializeToString,
response_deserializer=control__service__pb2.PaymentsListReply.FromString,
)
self.GetListInProgress = channel.unary_unary(
'/escrow.ProviderControlService/GetListInProgress',
request_serializer=control__service__pb2.GetPaymentsListRequest.SerializeToString,
response_deserializer=control__service__pb2.PaymentsListReply.FromString,
)
self.StartClaim = channel.unary_unary(
'/escrow.ProviderControlService/StartClaim',
request_serializer=control__service__pb2.StartClaimRequest.SerializeToString,
response_deserializer=control__service__pb2.PaymentReply.FromString,
)


class ProviderControlServiceServicer(object):
# missing associated documentation comment in .proto file
pass

def GetListUnclaimed(self, request, context):
"""get list of all unclaimed "payments".
in PaymentsSignatureReply signatures MUST be omited
if signature field is present then response should be considered as invalid
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def GetListInProgress(self, request, context):
"""get list of all payments in progress
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def StartClaim(self, request, context):
"""initilize claim for specific channel
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')


def add_ProviderControlServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetListUnclaimed': grpc.unary_unary_rpc_method_handler(
servicer.GetListUnclaimed,
request_deserializer=control__service__pb2.GetPaymentsListRequest.FromString,
response_serializer=control__service__pb2.PaymentsListReply.SerializeToString,
),
'GetListInProgress': grpc.unary_unary_rpc_method_handler(
servicer.GetListInProgress,
request_deserializer=control__service__pb2.GetPaymentsListRequest.FromString,
response_serializer=control__service__pb2.PaymentsListReply.SerializeToString,
),
'StartClaim': grpc.unary_unary_rpc_method_handler(
servicer.StartClaim,
request_deserializer=control__service__pb2.StartClaimRequest.FromString,
response_serializer=control__service__pb2.PaymentReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'escrow.ProviderControlService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
File renamed without changes.
Loading

0 comments on commit 1462707

Please sign in to comment.