Skip to content

exuan/kratos-blades

Repository files navigation

go-kratos scaffold

usage

# install
go install https://github.com/exuan/kratos-blades/cmd/kratos-blades
kratos-blades -h
NAME:
   kratos-blades - kratos scaffold

USAGE:
   kratos-blades [global options] command [command options] [arguments...]

COMMANDS:
   proto    
   service  
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help (default: false)

generate proto

kratos-blades proto -h
NAME:
   kratos-blades proto - 

USAGE:
   kratos-blades proto [command options] [arguments...]

DESCRIPTION:
   Generate proto file

OPTIONS:
   --api-key value, -k value  http auth key name (default: api_key)
   --auth, -a                 generate api auth security option (default: false)
   --gen-ent, -e              generate ent option (default: false)
   --methods value, -m value  service method name, like "User,Login" (,)separated
   --path value, -p value     generate proto file path (default: ./)
   --service value, -s value  service name, like backend (default: service)
   --version value, -v value  (default: v1)

generate proto with ent to see protoc-gen-ent

FAQ:

  1. go-swagger error with proto not found, you can copy this third_party/options/ent/opts.proto to your third_party
  2. generate edge with custom schema name, you can use fix-gen-edge-custom-schema-name

Acknowledgement

go-kratos

grpc-ecosystem

entgo

ent contrib

Releases

No releases published

Packages

No packages published

Languages