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.
 
 
 
 
kratos/examples/blog
另维64 089cf9d0cb
doc: update readme (#837)
4 years ago
..
api/blog/v1 fix example (#755) 4 years ago
cmd/blog adjust trace middleware and fix blog's trace middleware use case (#791) 4 years ago
configs examples (#748) 4 years ago
internal adjust trace middleware and fix blog's trace middleware use case (#791) 4 years ago
.gitignore examples (#748) 4 years ago
LICENSE examples (#748) 4 years ago
Makefile fix example (#755) 4 years ago
README.md doc: update readme (#837) 4 years ago
generate.go fix example (#755) 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 project template
kratos new blog

cd helloworld
# download modules
go mod download

# generate Proto template
kratos proto add api/blog/blog.proto
# generate Proto source code
kratos proto client api/blog/blog.proto
# generate server template
kratos proto server api/blog/blog.proto -t internal/service、

# generate all proto source code, wire, etc.
go generate ./...