package
0.0.0-20190716100821-95cfd762600a
Repository: https://github.com/go-stuff/grpc.git
Documentation: pkg.go.dev

# README

api

Install protoc

This will compile a protobuf(.proto) file into a go (.pb.go) file.

go get -u github.com/golang/protobuf/proto
go get -u github.com/golang/protobuf/protoc-gen-go

Install protoc-go-inject-tag

This will inject custom tags like bson or json into the already generated go files.

go get github.com/favadi/protoc-go-inject-tag

Example of how to Compile Protobuf into Go with Custom Tags

This examples shows how to compile the proto file then how to inject the custom tags. First cd into the directory that contains the .proto files, the first command will generate a .pb.go file the second will inject tags from comments in the .proto file with the following format // @inject_tag: bson:"_id".

The -XXX_skip=bson flag will add the bson:"-" tag to any XXX_* fields in the generated file. This will keep the XXX_* fields from being added to the database.

cd api

protoc -I . --go_out=plugins=grpc:. ./session.proto
protoc-go-inject-tag -input="./session.pb.go" -XXX_skip=bson

protoc -I . --go_out=plugins=grpc:. ./user.proto
protoc-go-inject-tag -input="./user.pb.go" -XXX_skip=bson

protoc -I . --go_out=plugins=grpc:. ./role.proto
protoc-go-inject-tag -input="./role.pb.go" -XXX_skip=bson

protoc -I . --go_out=plugins=grpc:. ./route.proto
protoc-go-inject-tag -input="./route.pb.go" -XXX_skip=bson

protoc -I . --go_out=plugins=grpc:. ./audit.proto
protoc-go-inject-tag -input="./audit.pb.go" -XXX_skip=bson
 

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

AuditServiceClient is the client API for AuditService service.
AuditServiceServer is the server API for AuditService service.
RoleServiceClient is the client API for RoleService service.
RoleServiceServer is the server API for RoleService service.
RouteServiceClient is the client API for RouteService service.
RouteServiceServer is the server API for RouteService service.
SessionServiceClient is the client API for SessionService service.
SessionServiceServer is the server API for SessionService service.
UserServiceClient is the client API for UserService service.
UserServiceServer is the server API for UserService service.