Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto eol=lf

# Mark generated protobuf bindings so GitHub collapses diffs and excludes
# them from language statistics.
gen/** linguist-generated=true
*.pb.go linguist-generated=true
29 changes: 29 additions & 0 deletions .github/.release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "go",
"include-v-in-tag": true,
"include-component-in-tag": false,
"signoff": "Straw Hat Team Bot <61149376+sht-bot@users.noreply.github.com>",
"changelog-sections": [
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
}
],
"packages": {
".": {
"component": "trogonproto"
}
},
"plugins": [
{
"type": "sentence-case"
}
]
}
3 changes: 3 additions & 0 deletions .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.1"
}
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: "monthly"
open-pull-requests-limit: 3

- package-ecosystem: github-actions
directory: /
schedule:
interval: "monthly"
open-pull-requests-limit: 3
2 changes: 2 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
titleOnly: true
allowRevertCommits: true
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read
pull-requests: read

jobs:
generated-code-up-to-date:
name: Generated Code Up-To-Date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- uses: bufbuild/buf-setup-action@v1.50.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Regenerate Go bindings
run: buf generate
- name: Verify clean working tree
run: |
if ! git diff --quiet --exit-code; then
echo "Generated code is out of date. Run 'buf generate' and commit the result."
git diff
exit 1
fi

quality-assurance:
name: Quality Assurance
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.26.x]

steps:
- uses: actions/checkout@v5.0.0
- uses: actions/setup-go@v6.0.0
with:
go-version: ${{ matrix.go-version }}
- uses: golangci/golangci-lint-action@v8.0.0
with:
version: latest
- run: go test -race -v ./...
- run: go vet ./...
- run: golangci-lint run
24 changes: 24 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Release Please

on:
push:
branches:
- main

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Release Please
id: release
uses: googleapis/release-please-action@v4.3.0
with:
token: ${{ secrets.GH_PAT_RELEASE_PLEASE_ACTION }}
config-file: .github/.release-please-config.json
manifest-file: .github/.release-please-manifest.json
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# trogonproto
# trogonproto

**trogonproto is the Go bindings module for the [trogon-proto](https://github.com/TrogonStack/trogon-proto) contract.**

**trogonproto exposes the generated Go types for every schema defined in `trogon-proto` — errors, env vars, UUIDs, consistency, streams, relay pagination, and more.** It tracks each release of the upstream proto module and ships pre-compiled `.pb.go` files under a stable import prefix so consumers never need to run `protoc` or `buf` themselves. Importing a contract is the same as importing any other Go package.

**trogonproto removes the toolchain burden that usually comes with adopting a shared protobuf contract in Go.** Without it, every service has to install `buf`, wire up codegen into its build, and keep generated output in sync with the proto repo on every bump — work that has nothing to do with the service itself and that drifts the moment one team forgets to regenerate.

**trogonproto is useful for any Go service, library, or tool that consumes the TrogonStack contracts.** Service teams pick up new fields by `go get`-bumping a single dependency. Library authors (e.g. `trogonerror`) can rely on stable Go types for the contract without taking a transitive dependency on the protobuf toolchain. Platform teams get a single place to publish, version, and audit the Go-facing surface of every TrogonStack proto.
19 changes: 19 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: v2

managed:
enabled: true
override:
- file_option: go_package_prefix
value: github.com/TrogonStack/trogonproto/gen
- file_option: go_package
path: elixirpb.proto
value: buf.build/gen/go/elixir-protobuf/protobuf/protocolbuffers/go

plugins:
- remote: buf.build/protocolbuffers/go:v1.36.5
out: gen
opt:
- paths=source_relative

inputs:
- module: buf.build/trogonstack/trogon-proto
Loading
Loading