File: generate.md

package info (click to toggle)
gh 2.46.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,548 kB
  • sloc: sh: 227; makefile: 117
file content (17 lines) | stat: -rw-r--r-- 703 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Protocol Buffers for Codespaces

Instructions for generating and adding gRPC protocol buffers.

## Generate Protocol Buffers

1. [Download `protoc`](https://grpc.io/docs/protoc-installation/)
2. [Download protocol compiler plugins for Go](https://grpc.io/docs/languages/go/quickstart/)
3. Install moq: `go install github.com/matryer/moq@latest`
4. Run `./generate.sh` from the `internal/codespaces/rpc` directory

## Add New Protocol Buffers

1. Download a `.proto` contract from the service repo
2. Create a new directory and copy the `.proto` to it
3. Update `generate.sh` to include the include the new `.proto`
4. Follow the instructions to [Generate Protocol Buffers](#generate-protocol-buffers)