0.4.0 • Published 7 months ago
@ikoz/qwop-proto v0.4.0
QWOP Proto
Setup
Creating/Modifying new protos
To create a new .proto, follow the scope/service/version format. For versioning, any changes in tag numbers/ordering requires a version bump for the service. v1 is considered unstable right now and subject to rapidly change under development. v2 is considered stable and unlikely to change.
Building
Prerequisites
- Make
- Buf CLI
- Node
- Go
Install TypeScript dependencies
pnpm installClient Generations
Client generations are available under ./gen for both Go and TypeScript.
Go
Go client generations are available at ./gen/go.
To use them,
TODOTypeScript
TypeScript client generations are available at ./gen/ts or from npm.
- Install from npm
pnpm add @ikoz/qwop-protoDevelopment
grpcurl
This package doesn't contain an API server. Once you have one setup, you can use these commands to interact/test each method if the server does not have a reflection api (if it does, you don't need to use the .protoset file).
- List all services
grpcurl -protoset out.protoset list- Generate the compiled protoset
# gen outputs to out.protoset
make gen
# OR manually create it
find ./src -name "*.proto" | xargs protoc --proto_path=./src --descriptor_set_out=out.protoset --include_imports- Call a service/method
# Example: call the GetPing method on the PingService
grpcurl -plaintext -protoset out.protoset localhost:8080 qctxe.ping.v1.PingService/GetPing