설명 없음

wfz 579e4d4f98 jwt 3 년 전
cmd 579e4d4f98 jwt 3 년 전
configs 2804938fdd init 3 년 전
internal 579e4d4f98 jwt 3 년 전
.gitignore 2804938fdd init 3 년 전
Dockerfile 4537c07fce remove docker 3 년 전
LICENSE 2804938fdd init 3 년 전
Makefile 2804938fdd init 3 년 전
README.md 2804938fdd init 3 년 전
build.sh 2804938fdd init 3 년 전
generate.go 2804938fdd init 3 년 전
go.mod 579e4d4f98 jwt 3 년 전
go.sum 579e4d4f98 jwt 3 년 전
start.sh 2804938fdd init 3 년 전

README.md

Kratos Project Template

Install Kratos

go get -u github.com/go-kratos/kratos/cmd/kratos/v2@latest

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 server api/helloworld/helloworld.proto -t internal/service

go generate ./...
go build -o ./bin/ ./...
./bin/helloworld -conf ./configs

Automated Initialization (wire)

# install wire
go get github.com/google/wire/cmd/wire

# generate wire
cd cmd/server
wire