AL-11185 ucs protocol update, updated py and C# generated code
Alexey authored
44e91129
Name Last commit Last update
ansible AL-7904 pypi server watchdog
proto AL-11185 ucs protocol update, updated py and C# generated code
.gitignore add ext to media proc request
.gitlab-ci.yml fix ci
README.md AL-11185 ucs protocol change wip
Vagrantfile AL-7904 pypi server watchdog

backend-protocol

Protobuf back-end protocol.

Prerequisites

You do not need any software to change protocols. But for validation, you need protobuf stub. To compile python wrappers - protobuf stub for python. Go to /proto dir and install:

pip install -r requirements

Install go-protoc modules:

./install_go.sh

Generating

Execute in dir /proto

./compile_py.sh
./compile_c#.sh
./compile_go.sh
./compile_js.sh

The proto files are located at proto/avvyprotocol/*.proto, check proto/examples for usage examples.

Install from internal repository

To install

sudo python3.9 -m pip install avvyprotocol -i http://pipadmin:PafuUftCC2gBmQ6B@37.139.4.178:8888 --trusted-host 37.139.4.178

Or write two separate requirements.txt and requirements_internal.txt

requirements.txt :

protobuf

requirements_internal.txt :

--index-url https://avvy-reader:8uuZ6-xFD_uKovx23ERh@gitlab.domi.do/api/v4/projects/123/packages/pypi/simple
avvyprotocol

and then install requiremnets:

sudo python3.9 -m pip install requirements.txt
sudo python3.9 -m pip install requirements_internal.txt

comipling for other langs

C#

/home/alexey/Code/protoc/bin/protoc -I=. --csharp_out=./proto/ ./proto/ucsmodel.proto --grpc_out=./proto/ --plugin=protoc-gen-grpc=/home/alexey/Code/protoc/bin/grpc_csharp_plugin

JavaScript+TypeScript- messages only (browser client can't call grpc)

sudo protoc --plugin="protoc-gen-ts=./node_modules/.bin/protoc-gen-ts" --js_out="import_style=commonjs,binary:./" --ts_out="service=grpc-web:./" ./static/proto/ucsmodel.proto
/home/alexey/Code/protoc/bin/protoc --plugin="protoc-gen-ts=./node_modules/.bin/protoc-gen-ts" --js_out="import_style=commonjs,binary:./" --ts_out="service=grpc-web:./" ./static/proto/ucsmodel.proto