-
Notifications
You must be signed in to change notification settings - Fork 189
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
Showing
36 changed files
with
1,980 additions
and
1,823 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
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,80 +1,21 @@ | ||
.PHONY: protoc-gen-openapiv2 | ||
protoc-gen-openapiv2: | ||
GO111MODULE=off go get -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-openapiv2 | ||
|
||
.PHONY: protoc-deps | ||
protoc-deps: $(BINGO) | ||
@# #TODO: bingo creates symlinks from the -l option in the current directory | ||
@# if no GOPATH and GOBIN is set, but they should reside inside .bingo | ||
@# for now we move them manually | ||
@cd .. && GOPATH="" GOBIN="" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go | ||
@cd .. && mv protoc-gen-go .bingo/ | ||
@cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v3 | ||
@cd .. && mv protoc-gen-micro .bingo/ | ||
@cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb | ||
@cd .. && mv protoc-gen-microweb .bingo/ | ||
@cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 | ||
@cd .. && mv protoc-gen-openapiv2 .bingo/ | ||
@cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc | ||
@cd .. && mv protoc-gen-doc .bingo/ | ||
|
||
.PHONY: buf-generate | ||
buf-generate: $(BUF) protoc-deps | ||
$(BUF) generate | ||
|
||
.PHONY: protocolbuffers-protobuf | ||
protocolbuffers-protobuf: | ||
GO111MODULE=off go get -v github.com/protocolbuffers/protobuf || true | ||
|
||
.PHONY: googleapis-protobuf | ||
googleapis-protobuf: | ||
GO111MODULE=off go get -v github.com/googleapis/googleapis || true | ||
|
||
.PHONY: gen-deps | ||
gen-deps: protoc-gen-openapiv2 protocolbuffers-protobuf googleapis-protobuf | ||
|
||
|
||
.PHONY: $(PROTO_SRC)/${NAME}.pb.go | ||
$(PROTO_SRC)/${NAME}.pb.go: $(BUF) gen-deps $(PROTOC_GEN_GO) | ||
@echo "$(NAME): generating $(PROTO_SRC)/${NAME}.pb.go" | ||
@$(BUF) protoc \ | ||
-I=$(PROTO_SRC)/ \ | ||
-I=$(GOPATH)/src/github.com/protocolbuffers/protobuf/src \ | ||
-I=$(GOPATH)/src/github.com/googleapis/googleapis \ | ||
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway \ | ||
--plugin protoc-gen-go=$(PROTOC_GEN_GO) \ | ||
--go_out=$(PROTO_SRC) \ | ||
--go_opt=paths=source_relative \ | ||
$(PROTO_SRC)/${NAME}.proto | ||
|
||
.PHONY: $(PROTO_SRC)/${NAME}.pb.micro.go | ||
$(PROTO_SRC)/${NAME}.pb.micro.go: $(BUF) gen-deps $(PROTOC_GEN_MICRO) | ||
@echo "$(NAME): generating $(PROTO_SRC)/${NAME}.pb.micro.go" | ||
@$(BUF) protoc \ | ||
-I=$(PROTO_SRC)/ \ | ||
-I=$(GOPATH)/src/github.com/protocolbuffers/protobuf/src \ | ||
-I=$(GOPATH)/src/github.com/googleapis/googleapis \ | ||
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway \ | ||
--plugin protoc-gen-micro=$(PROTOC_GEN_MICRO) \ | ||
--micro_out=logtostderr=true:$(PROTO_SRC) \ | ||
--micro_opt=paths=source_relative \ | ||
$(PROTO_SRC)/${NAME}.proto | ||
|
||
.PHONY: $(PROTO_SRC)/${NAME}.pb.web.go | ||
$(PROTO_SRC)/${NAME}.pb.web.go: $(BUF) gen-deps $(PROTOC_GEN_MICROWEB) | ||
@echo "$(NAME): generating $(PROTO_SRC)/${NAME}.pb.web.go" | ||
@$(BUF) protoc \ | ||
-I=$(PROTO_SRC)/ \ | ||
-I=$(GOPATH)/src/github.com/protocolbuffers/protobuf/src \ | ||
-I=$(GOPATH)/src/github.com/googleapis/googleapis \ | ||
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway \ | ||
--plugin protoc-gen-microweb=$(PROTOC_GEN_MICROWEB) \ | ||
--microweb_out=logtostderr=true:$(PROTO_SRC) \ | ||
--microweb_opt=paths=source_relative \ | ||
$(PROTO_SRC)/${NAME}.proto | ||
|
||
.PHONY: $(PROTO_SRC)/${NAME}.swagger.json | ||
$(PROTO_SRC)/${NAME}.swagger.json: $(BUF) gen-deps $(PROTOC_GEN_OPENAPIV2) | ||
@echo "$(NAME): generating $(PROTO_SRC)/${NAME}.swagger.json" | ||
@$(BUF) protoc \ | ||
-I=$(PROTO_SRC)/ \ | ||
-I=$(GOPATH)/src/github.com/protocolbuffers/protobuf/src \ | ||
-I=$(GOPATH)/src/github.com/googleapis/googleapis \ | ||
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway \ | ||
--plugin protoc-gen-openapiv2=$(PROTOC_GEN_OPENAPIV2) \ | ||
--openapiv2_out=logtostderr=true:$(PROTO_SRC)/ \ | ||
$(PROTO_SRC)/${NAME}.proto | ||
|
||
.PHONY: ../docs/extensions/${NAME}/grpc.md | ||
../docs/extensions/${NAME}/grpc.md: $(BUF) gen-deps $(PROTOC_GEN_DOC) | ||
@echo "$(NAME): generating ../docs/extensions/${NAME}/grpc.md" | ||
@$(BUF) protoc \ | ||
-I=$(PROTO_SRC)/ \ | ||
-I=$(GOPATH)/src/github.com/protocolbuffers/protobuf/src \ | ||
-I=$(GOPATH)/src/github.com/googleapis/googleapis \ | ||
-I=$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway \ | ||
--plugin protoc-gen-doc=$(PROTOC_GEN_DOC) \ | ||
--doc_opt=./templates/GRPC.tmpl,grpc.md \ | ||
--doc_out=../docs/extensions/${NAME} \ | ||
$(PROTO_SRC)/${NAME}.proto |
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
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,29 @@ | ||
version: v1 | ||
plugins: | ||
- name: go | ||
path: ../.bingo/protoc-gen-go | ||
out: pkg/ | ||
opt: | ||
- paths=source_relative | ||
|
||
- name: micro | ||
path: ../.bingo/protoc-gen-micro | ||
out: pkg/ | ||
opt: | ||
- paths=source_relative | ||
|
||
- name: microweb | ||
path: ../.bingo/protoc-gen-microweb | ||
out: pkg/ | ||
opt: | ||
- paths=source_relative | ||
|
||
- name: openapiv2 | ||
path: ../.bingo/protoc-gen-openapiv2 | ||
out: pkg/ | ||
|
||
- name: doc | ||
path: ../.bingo/protoc-gen-doc | ||
out: ../docs/extensions/accounts | ||
opt: | ||
- ./templates/GRPC.tmpl,grpc.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,17 @@ | ||
# Generated by buf. DO NOT EDIT. | ||
version: v1 | ||
deps: | ||
- remote: buf.build | ||
owner: googleapis | ||
repository: googleapis | ||
branch: main | ||
commit: ca45b9d9c51849e898845743a28b0eb0 | ||
digest: b1--B2JdvzLV2KI5pYMG9AHJHFGznqXfZKjKwcqBuXhGgw= | ||
create_time: 2021-10-14T15:09:30.598677Z | ||
- remote: buf.build | ||
owner: grpc-ecosystem | ||
repository: grpc-gateway | ||
branch: main | ||
commit: 462ede5f3dee45569df6317bda220b1b | ||
digest: b1-4FNKWjnS2yafyeOdqW8u-s7w1pJBHjz0Z6CbOL-Ipk0= | ||
create_time: 2021-10-14T01:55:03.476639Z |
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,10 @@ | ||
version: v1 | ||
lint: | ||
use: | ||
- DEFAULT | ||
deps: | ||
- buf.build/googleapis/googleapis | ||
- buf.build/grpc-ecosystem/grpc-gateway | ||
breaking: | ||
use: | ||
- FILE |
Oops, something went wrong.