add proto

This commit is contained in:
2024-11-09 14:29:47 +07:00
parent f7d170b9a0
commit c982fe6c76
7 changed files with 1292 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
LOCAL_BIN := $(CURDIR)/bin
local-go-init: export GOBIN := $(LOCAL_BIN)
local-go-init:
go install \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \
google.golang.org/protobuf/cmd/protoc-gen-go \
google.golang.org/grpc/cmd/protoc-gen-go-grpc
generate:
rm -rf proto
mkdir -p proto
protoc \
-I ./api \
-I ./third_party \
--go_out ./proto --go_opt paths=source_relative \
--go-grpc_out ./proto --go-grpc_opt paths=source_relative \
--grpc-gateway_out ./proto --grpc-gateway_opt paths=source_relative \
--openapiv2_out=./resources \
./api/smm_core.proto
run:
go run ./cmd/smm_core/main.go