mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-16 13:01:04 +02:00
Organize proto files (#77)
* Organize proto files into top-level proto folder * Use the new proto folder in test docker container * Remove old proto files
This commit is contained in:
parent
a5776a6e9b
commit
41de02983f
12 changed files with 33 additions and 33 deletions
|
|
@ -19,7 +19,7 @@ RUN pip3 install -r requirements.txt
|
|||
# Copy the source code.
|
||||
COPY . /app
|
||||
|
||||
# Copy the source code.
|
||||
# Copy the downloaded rpc files.
|
||||
RUN cp -r googleapis /app
|
||||
RUN cp rpc.proto /app
|
||||
|
||||
|
|
|
|||
|
|
@ -15,17 +15,19 @@ COPY requirements-itest.txt /
|
|||
RUN pip3 install --upgrade pip
|
||||
RUN pip3 install -r requirements-itest.txt
|
||||
|
||||
Run mkdir /app
|
||||
COPY ./squeakserver/common/rpc/squeak_server.proto /app
|
||||
COPY ./squeakserver/admin/rpc/squeak_admin.proto /app
|
||||
# Copy the source code.
|
||||
COPY . /app
|
||||
|
||||
# Copy the downloaded rpc files.
|
||||
RUN cp -r googleapis /app
|
||||
RUN cp rpc.proto /app/lnd.proto
|
||||
RUN cp rpc.proto /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN python3 -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. lnd.proto
|
||||
RUN python3 -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. squeak_server.proto
|
||||
RUN python3 -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. squeak_admin.proto
|
||||
# Install the gRPC files.
|
||||
COPY "install-rpc.sh" .
|
||||
RUN chmod +x install-rpc.sh
|
||||
RUN ./install-rpc.sh
|
||||
|
||||
# Copy the lighting client
|
||||
COPY "squeakserver/common/lnd_lightning_client.py" .
|
||||
|
|
|
|||
|
|
@ -9,14 +9,10 @@ if [ ! -f "rpc.proto" ]; then
|
|||
fi
|
||||
|
||||
# Move this to squeakserver/common/lnd/rpc.proto instead.
|
||||
cp rpc.proto squeakserver/common/rpc/lnd.proto
|
||||
cp rpc.proto proto/lnd.proto
|
||||
|
||||
echo "Installing RPC protocol files"
|
||||
# install lnd protocol
|
||||
python3 -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. squeakserver/common/rpc/lnd.proto
|
||||
|
||||
# install squeak server protocol
|
||||
python3 -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. squeakserver/common/rpc/squeak_server.proto
|
||||
|
||||
# install squeak admin server protocol
|
||||
python3 -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. squeakserver/admin/rpc/squeak_admin.proto
|
||||
python3 -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. \
|
||||
proto/lnd.proto \
|
||||
proto/squeak_server.proto \
|
||||
proto/squeak_admin.proto
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import logging
|
|||
import random
|
||||
import time
|
||||
|
||||
import grpc
|
||||
|
||||
from bitcoin.core import lx, x
|
||||
from squeak.params import SelectParams
|
||||
from squeak.core import CSqueak
|
||||
|
|
@ -15,14 +17,12 @@ from squeak.core.encryption import generate_data_key
|
|||
from squeak.core.signing import CSigningKey
|
||||
from squeak.core.signing import CSqueakAddress
|
||||
|
||||
import lnd_pb2 as ln
|
||||
import lnd_pb2_grpc as lnrpc
|
||||
|
||||
import grpc
|
||||
import squeak_server_pb2
|
||||
import squeak_server_pb2_grpc
|
||||
import squeak_admin_pb2
|
||||
import squeak_admin_pb2_grpc
|
||||
from proto import lnd_pb2 as ln
|
||||
from proto import lnd_pb2_grpc as lnrpc
|
||||
from proto import squeak_server_pb2
|
||||
from proto import squeak_server_pb2_grpc
|
||||
from proto import squeak_admin_pb2
|
||||
from proto import squeak_admin_pb2_grpc
|
||||
|
||||
from lnd_lightning_client import LNDLightningClient
|
||||
|
||||
|
|
|
|||
0
proto/__init__.py
Normal file
0
proto/__init__.py
Normal file
|
|
@ -7,6 +7,8 @@ option objc_class_prefix = "SQK";
|
|||
|
||||
package squeakserver;
|
||||
|
||||
// import "lnd.proto";
|
||||
|
||||
// Interface exported by the server.
|
||||
service SqueakAdmin {
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
__version__ = '0.1.0'
|
||||
|
|
@ -5,8 +5,9 @@ import grpc
|
|||
|
||||
from squeak.core import CSqueak
|
||||
|
||||
from squeakserver.admin.rpc import squeak_admin_pb2
|
||||
from squeakserver.admin.rpc import squeak_admin_pb2_grpc
|
||||
from proto import squeak_admin_pb2
|
||||
from proto import squeak_admin_pb2_grpc
|
||||
|
||||
from squeakserver.server.util import get_hash
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
__version__ = '0.1.0'
|
||||
|
|
@ -11,8 +11,8 @@ from configparser import ConfigParser
|
|||
from squeak.params import SelectParams
|
||||
from squeak.core.signing import CSigningKey
|
||||
|
||||
import squeakserver.common.rpc.lnd_pb2 as ln
|
||||
import squeakserver.common.rpc.lnd_pb2_grpc as lnrpc
|
||||
import proto.lnd_pb2 as ln
|
||||
import proto.lnd_pb2_grpc as lnrpc
|
||||
|
||||
from squeakserver.admin.squeak_admin_server_servicer import SqueakAdminServerServicer
|
||||
from squeakserver.admin.squeak_admin_server_handler import SqueakAdminServerHandler
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@ import grpc
|
|||
|
||||
from squeak.core import CSqueak
|
||||
|
||||
from squeakserver.common.rpc import squeak_server_pb2
|
||||
from squeakserver.common.rpc import squeak_server_pb2_grpc
|
||||
from proto import squeak_server_pb2
|
||||
from proto import squeak_server_pb2_grpc
|
||||
|
||||
from squeakserver.server.util import get_hash
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue