-
Notifications
You must be signed in to change notification settings - Fork 44
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
7bf35d8
commit 98611af
Showing
9 changed files
with
1,018 additions
and
1,709 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: v2 | ||
plugins: | ||
- local: protoc-gen-go | ||
out: peerswaprpc | ||
opt: | ||
- paths=source_relative | ||
|
||
- local: protoc-gen-go-grpc | ||
out: peerswaprpc | ||
opt: | ||
- paths=source_relative | ||
|
||
- local: protoc-gen-grpc-gateway | ||
out: peerswaprpc | ||
opt: | ||
- logtostderr=true | ||
- paths=source_relative | ||
- grpc_api_configuration=peerswaprpc/peerswap.yaml | ||
|
||
- local: protoc-gen-openapiv2 | ||
out: peerswaprpc | ||
opt: | ||
- logtostderr=true | ||
- grpc_api_configuration=peerswaprpc/peerswap.yaml |
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,11 @@ | ||
# For details on buf.yaml configuration, visit https://buf.build/docs/configuration/v2/buf-yaml | ||
version: v2 | ||
modules: | ||
- path: peerswaprpc | ||
|
||
# lint: | ||
# use: | ||
# - STANDARD | ||
# breaking: | ||
# use: | ||
# - FILE |
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 |
---|---|---|
|
@@ -25,4 +25,4 @@ RUN cd /tmp \ | |
|
||
WORKDIR /build | ||
|
||
CMD ["/bin/sh", "/build/peerswaprpc/gen_protos.sh"] | ||
CMD ["buf", "generate"] |
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,36 +1,17 @@ | ||
DIR=peerswaprpc | ||
|
||
PROTOC_OPTS= \ | ||
-I. \ | ||
--go_out=paths=source_relative:. \ | ||
--go-grpc_out=paths=source_relative:. \ | ||
--grpc-gateway_out=. \ | ||
--grpc-gateway_opt logtostderr=true \ | ||
--grpc-gateway_opt paths=source_relative \ | ||
--grpc-gateway_opt grpc_api_configuration=${DIR}/peerswap.yaml | ||
|
||
PROTOC_SWAGGER_OPTS= \ | ||
--openapiv2_out=. \ | ||
--openapiv2_opt logtostderr=true \ | ||
--openapiv2_opt grpc_api_configuration=${DIR}/peerswap.yaml | ||
|
||
STUBS= \ | ||
${DIR}/peerswaprpc_grpc.pb.go \ | ||
${DIR}/peerswaprpc.pb.go \ | ||
${DIR}/peerswaprpc.pb.gw.go | ||
${DIR}/peerswaprpc.pb.gw.go \ | ||
${DIR}/peerswaprpc.swagger.json | ||
|
||
all-rpc: ${STUBS} ${DIR}/peerswaprpc.swagger.json | ||
all-rpc: | ||
buf generate | ||
|
||
clean-rpc: | ||
rm -f ${STUBS} ${DIR}/peerswaprpc.swagger.json | ||
|
||
${DIR}/peerswaprpc.swagger.json: | ||
protoc ${PROTOC_SWAGGER_OPTS} ${DIR}/peerswaprpc.proto | ||
|
||
${DIR}/peerswaprpc_grpc.pb.go ${DIR}/peerswaprpc.pb.go ${DIR}/peerswaprpc.pb.gw.go: ${DIR}/peerswaprpc.proto | ||
protoc ${PROTOC_OPTS} ${DIR}/peerswaprpc.proto | ||
PHONY: | ||
rm -f ${STUBS} | ||
|
||
.PHONY: all-rpc-docker | ||
all-rpc-docker: | ||
./gen_protos_docker.sh | ||
${DIR}/gen_protos_docker.sh |
Oops, something went wrong.