-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update protocol buffers, generate using buf, added quotes, claims and…
… new endpoint on enrich
- Loading branch information
Showing
16 changed files
with
559 additions
and
93 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 |
---|---|---|
@@ -1,5 +1,18 @@ | ||
protocols: | ||
protoc -I/usr/local/include -I. -I${GOPATH}/src --go_out=:. --go-grpc_out=:. plagiarism/grpc_plagiarism.proto | ||
protoc -I/usr/local/include -I. -I${GOPATH}/src --go_out=:. --go-grpc_out=:. scrape/grpc_scrape.proto | ||
protoc -I/usr/local/include -I. -I${GOPATH}/src --go_out=:. --go-grpc_out=:. compare/grpc_compare.proto | ||
protoc -I/usr/local/include -I. -I${GOPATH}/src --go_out=:. --go-grpc_out=:. enrich/grpc_enrich.proto | ||
BUF_VERSION=1.1.0 | ||
|
||
help: ## Print Help | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
||
buf-install: ## Install buf | ||
curl -sSL \ | ||
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-$(shell uname -s)-$(shell uname -m)" \ | ||
-o "$(shell go env GOPATH)/bin/buf" && \ | ||
chmod +x "$(shell go env GOPATH)/bin/buf" | ||
|
||
proto-build: ## Generate protocol buffers | ||
buf generate | ||
|
||
proto: proto-build ## Build protocol buffers | ||
|
||
.DEFAULT_GOAL := help | ||
.PHONY: help buf-install proto proto-build |
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,7 +1,10 @@ | ||
# svc-proto | ||
plagiari.sm Proto Buffers. Make sure you use protoc 3.14.0. | ||
MediaWatch protocol buffers. | ||
|
||
## Build the proto files | ||
```bash | ||
$ make build | ||
# install buf (v1.1.0) | ||
make buf-install | ||
# build proto | ||
make 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: v1 | ||
managed: | ||
enabled: true | ||
go_package_prefix: | ||
default: github.com/plagiari-sm/svc-proto | ||
plugins: | ||
- name: go | ||
out: . | ||
opt: paths=source_relative | ||
- name: go-grpc | ||
out: . | ||
opt: | ||
- paths=source_relative | ||
- require_unimplemented_servers=false |
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,2 @@ | ||
# Generated by buf. DO NOT EDIT. | ||
version: v1 |
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,16 @@ | ||
version: v1 | ||
lint: | ||
use: | ||
- BASIC | ||
rpc_allow_same_request_response: true | ||
except: | ||
- PACKAGE_VERSION_SUFFIX | ||
- SERVICE_SUFFIX | ||
- PACKAGE_DIRECTORY_MATCH | ||
- RPC_REQUEST_RESPONSE_UNIQUE | ||
- RPC_REQUEST_STANDARD_NAME | ||
- RPC_RESPONSE_STANDARD_NAME | ||
- FIELD_LOWER_SNAKE_CASE | ||
breaking: | ||
use: | ||
- FILE |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.