Skip to content

Commit 3f14ac4

Browse files
authored
Merge pull request #95 from uw-labs/proto-v2
Regenerate protos using the v2 api and buf.
2 parents 73be4b4 + 0179f92 commit 3f14ac4

File tree

11 files changed

+1185
-481
lines changed

11 files changed

+1185
-481
lines changed

.circleci/config.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ version: 2
22

33
jobs:
44
test:
5-
working_directory: /go/src/github.com/uw-labs/proximo
65
docker:
7-
- image: circleci/golang:1.13
8-
environment:
9-
GO111MODULE: "on"
6+
- image: circleci/golang:1
107
steps:
118
- checkout
9+
- run: make protos && git add --all && git diff --staged --exit-code
1210
- run: go test -v -race -cover ./...
1311
- run: go build -o ./bin/server ./cmd/proximo-server
1412
- run: go build -o ./bin/client ./cmd/proximo-client

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
install-tools:
3+
go install \
4+
google.golang.org/protobuf/cmd/protoc-gen-go \
5+
google.golang.org/grpc/cmd/protoc-gen-go-grpc \
6+
github.com/bufbuild/buf/cmd/buf
7+
8+
protos: install-tools
9+
rm -rf gen && buf generate --config buf.yaml --template buf.gen.yaml
10+
go mod tidy

buf.gen.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: v1beta1
2+
plugins:
3+
- name: go
4+
out: proto
5+
opt: paths=source_relative
6+
- name: go-grpc
7+
out: proto
8+
opt:
9+
- paths=source_relative
10+
- require_unimplemented_servers=false

buf.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: v1beta1
2+
name: buf.build/uw-labs/proximo
3+
build:
4+
roots:
5+
- proto
6+
breaking:
7+
use:
8+
- FILE

go.mod

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ module github.com/uw-labs/proximo
33
go 1.12
44

55
require (
6-
github.com/golang/protobuf v1.3.2
6+
github.com/bufbuild/buf v0.44.0
77
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0
88
github.com/jawher/mow.cli v1.1.0
99
github.com/nats-io/stan.go v0.5.0
1010
github.com/pkg/errors v0.9.1
11-
github.com/stretchr/testify v1.4.0
11+
github.com/stretchr/testify v1.7.0
1212
github.com/urfave/cli v1.22.2
1313
github.com/uw-labs/substrate v0.0.0-20200423155849-5805738940ec
1414
github.com/uw-labs/sync v0.0.0-20190307114256-1bb306bf6e71
15-
golang.org/x/crypto v0.0.0-20200210222208-86ce3cb69678
16-
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
17-
google.golang.org/grpc v1.27.0
18-
gopkg.in/yaml.v2 v2.2.8
15+
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
16+
google.golang.org/grpc v1.40.0-dev.0.20210623211556-d9eb12feed7a
17+
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0
18+
google.golang.org/protobuf v1.27.1
19+
gopkg.in/yaml.v2 v2.4.0
1920
)

go.sum

+436-44
Large diffs are not rendered by default.

proto/gen.sh

-3
This file was deleted.

0 commit comments

Comments
 (0)