-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f792fb2
commit 79db074
Showing
63 changed files
with
637 additions
and
7,493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Community Code of Conduct | ||
|
||
Thames Technology follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
patreon: thames |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
gofmt: | ||
name: Go Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- name: Run gofmt | ||
run: gofmt -l -s . | ||
|
||
golangci-lint: | ||
name: Go Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.58 | ||
|
||
test: | ||
name: Go Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- name: Run tests | ||
run: go test ./... -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
run: | ||
# Timeout for analysis, e.g. 30s, 5m. | ||
# Default: 1m | ||
timeout: 5m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,29 @@ | ||
# cloudstd | ||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/thames-technology/apigen/main/.github/assets/apigen-cover.png" alt="API Gen Logo" /> | ||
</p> | ||
|
||
Generate Protobuf service definitions conforming to popular design guides: | ||
<p align="right"> | ||
<i>If you use this repo, star it ✨</i> | ||
</p> | ||
|
||
- [Buf Style Guide](https://docs.buf.build/best-practices/style-guide) | ||
- [Uber Protobuf Style Guide V2](https://github.com/uber/prototool/blob/dev/style/README.md) | ||
- [Google Cloud API Design Guide](https://cloud.google.com/apis/design) | ||
--- | ||
|
||
## Installation | ||
<h2 align="center">Generate best-practice Protobuf APIs following design patterns</h2> | ||
|
||
```sh | ||
go install github.com/slavovojacek/cloudstd@latest | ||
``` | ||
|
||
## Usage | ||
<p align="center"> | ||
Inspired by <a href="https://www.oreilly.com/library/view/api-design-patterns/9781617295850/" target="_blank">API Design Patterns</a> | ||
</p> | ||
|
||
### Modern, simple style | ||
--- | ||
|
||
This style is based on [Buf Style Guide](https://docs.buf.build/best-practices/style-guide) and [Uber Protobuf Style Guide V2](https://github.com/uber/prototool/blob/dev/style/README.md). | ||
## Install | ||
|
||
```sh | ||
proto> cloudstd proto --package "acme.shelf.v1" --resource "shelf,shelves" | ||
proto> cloudstd proto --package "acme.book.v1" --resource "book" --parent "shelf,shelves" | ||
# TODO | ||
``` | ||
|
||
The generated code can be found [in the docs](docs/examples/proto/modern/README.md). | ||
|
||
### Google style | ||
|
||
This style is based on the [Google Cloud API Design Guide](https://cloud.google.com/apis/design). | ||
## Getting started | ||
|
||
```sh | ||
proto> cloudstd proto --package "acme.shelf.v1" --resource "shelf,shelves" --google | ||
proto> cloudstd proto --package "acme.book.v1" --resource "book" --parent "shelf,shelves" --google | ||
apigen proto -r book -pkg bookservice.v1alpha1 | ||
``` | ||
|
||
The generated code can be found [in the docs](docs/examples/proto/google/README.md). |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.