https://github.com/dhiguero/gpm-example
A repository with the reference layout for generating protos with GPM
https://github.com/dhiguero/gpm-example
grpc monorepo protobuf protocol-buffers
Last synced: 8 months ago
JSON representation
A repository with the reference layout for generating protos with GPM
- Host: GitHub
- URL: https://github.com/dhiguero/gpm-example
- Owner: dhiguero
- License: apache-2.0
- Created: 2020-10-29T19:47:48.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-10-29T20:19:05.000Z (over 5 years ago)
- Last Synced: 2025-01-31T23:47:36.138Z (about 1 year ago)
- Topics: grpc, monorepo, protobuf, protocol-buffers
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpm-example
A repository with the reference layout for generating protos with [GPM](https://github.com/dhiguero/grpc-proto-manager).
## Structure
The basic structure expected by the grpc-proto-manager is a simple set of directories from the project root, each of them containing a set of `.proto` files. Optionally, you may specify a `.protolangs` file with the target languages for the generation.
```
├── |
│ ├── [.protolangs]
│ └── myprotofile.proto
```
## GPM YAML
To specify how the generation should be done, GPM expects a `.gpm.yaml` at the root project level. The contents of this file are as follows:
```
tempPath: /tmp/gpm
repositoryProvider: github
repositoryOrganization: dhiguero
defaultLanguage: go
```
Where:
* **tempPath**: Specifies the path of a temporal directory used to create intermediate code.
* **repositoryProvider**: Selects the type of repository interface.
* **repositoryOrganization**: Selects the the target organization in the repository provider. In the example, it translates into the generated code being pushed to `github.com/dhiguero/grpc--`.
* **defaultLanguage**: Defines the target language if the `.protolangs` file is not found.
For further information check the YAML format on [GPM](https://github.com/dhiguero/grpc-proto-manager).