Skip to content
/ ginny Public

Ginny base on gRPC + gRPC-Gateway, more components to improve development efficiency.

License

Notifications You must be signed in to change notification settings

goriller/ginny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ginny base on gRPC + gRPC-Gateway, more components to improve development efficiency.

Installation

cd $GOPATH && go get github.com/goriller/ginny-cli/ginny

Dependencies tools

  • protoc

https://github.com/protocolbuffers/protobuf/releases

  • protoc-gen-go:
cd $GOPATH && go install github.com/golang/protobuf/protoc-gen-go@latest
  • go wire:
cd $GOPATH && go get github.com/google/wire/cmd/wire
  • protoc-gen-validate:
cd $GOPATH && go install github.com/envoyproxy/protoc-gen-validate@latest
  • goimports:
cd $GOPATH && go get golang.org/x/tools/cmd/goimports
  • mockgen:
cd $GOPATH && go install github.com/golang/mock/[email protected]
  • make:

Mac OS and Linux systems already have the make command,

windows: How to run "make" command in gitbash in windows?

Quick Start

1.Create Project

ginny new hellodemo

2.modify .proto and generate pb code

make protoc

4. Make

// wire
make wire

How to debug

if you use vscode , edit the .vscode/launch.json , like this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch GoPackage",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}/cmd",
            "env": {
            // ...
            },
            "args": [
                "-conf","../configs/dev.yml"
                // "-remote", "etcd://127.0.0.1:1233/test",
            ]
        }
    ]
}

Select Launch GoPackage to debug run. Try to call http://localhost:8080/ or grpc://127.0.0.1:9000/ .

Example

Check out the quick start example.