You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Windfarer
5546be9188
|
4 years ago | |
---|---|---|
.. | ||
api/blog/v1 | 4 years ago | |
cmd/blog | 4 years ago | |
configs | 4 years ago | |
internal | 4 years ago | |
pkg/middleware | 4 years ago | |
.gitignore | 4 years ago | |
LICENSE | 4 years ago | |
Makefile | 4 years ago | |
README.md | 4 years ago | |
generate.go | 4 years ago |
README.md
Kratos Layout
Install Kratos
go get github.com/go-kratos/kratos/cmd/kratos
go get github.com/go-kratos/kratos/cmd/protoc-gen-go-http
go get github.com/go-kratos/kratos/cmd/protoc-gen-go-errors
# from source
cd cmd/kratos && go install
cd cmd/protoc-gen-go-http && go install
cd cmd/protoc-gen-go-errors && go install
Create a service
# create a template project
kratos new helloworld
cd helloworld
# Add a proto template
kratos proto add api/helloworld/helloworld.proto
# Generate the source code of service by proto file
kratos proto service api/helloworld/helloworld.proto -t internal/service
make proto
make build
make test