Skip to content

tnt2706/go-grpc-gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-grpc-gateway

Overview

gRPC-Gateway helps you to provide your APIs in both gRPC and RESTful style at the same time.

alt text

Document

Generate

  • Use default
protoc --go_out=pkg/proto --go_opt=paths=source_relative \
--go-grpc_out=pkg/proto --go-grpc_opt=paths=source_relative \
internal/proto/calculator_service.proto

alt text

  • Use custom
option go_package = "./pb";

protoc --go_out=pkg/generate --go_opt=Mprotos/*.proto=pb \
--go-grpc_out=pkg/generate --go-grpc_opt=Mprotos/*.proto=pb \
internal/proto/*.proto

alt text

  • Generate

        pbjs -t static-module \
            -w commonjs \
            -o $(APP_HOME)/server/pkg/presentation/all_in_one/ui/src/model.js \
            ec/v1/model/*.proto \
            ec/v1/if/*.proto 
        pbjs -t static-module \
            -w commonjs \
            -o $(APP_HOME)/server/external/ma/presentation/reservation/ui/src/model.js \
            ec/v1/model/*.proto \
            ec/v1/if/*.proto

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published