Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProtoCmd = &cli.Command{ Name: "proto", Description: "Generate proto file", Flags: []cli.Flag{ &cli.StringFlag{Name: "methods", Aliases: []string{"m"}, Usage: "service method name, like \"User,Login\" (,)separated"}, &cli.StringFlag{Name: "service", Aliases: []string{"s"}, DefaultText: "service", Value: "service", Usage: "service name, like backend"}, &cli.StringFlag{Name: "api-key", Aliases: []string{"k"}, DefaultText: "api_key", Value: "api_key", Usage: "http auth key name"}, &cli.StringFlag{Name: "path", Aliases: []string{"p"}, DefaultText: "./", Usage: "generate proto file path"}, &cli.StringFlag{Name: "version", Aliases: []string{"v"}, DefaultText: "v1", Value: "v1"}, &cli.BoolFlag{Name: "auth", Aliases: []string{"a"}, Usage: "generate api auth security option"}, &cli.BoolFlag{Name: "gen-ent", Aliases: []string{"e"}, Usage: "generate ent option"}, }, Action: protoRun, }
View Source
var ServiceCmd = &cli.Command{ Name: "service", Flags: []cli.Flag{ &cli.StringFlag{Name: "proto", Aliases: []string{"p"}, Usage: "proto file", Required: true}, &cli.StringFlag{Name: "target_dir", Aliases: []string{"t"}, DefaultText: "internal/service", Value: "internal/service"}, }, Action: serviceRun, }
Functions ¶
This section is empty.
Types ¶
type Method ¶
type Method struct { Service string Name string Request string Reply string Uri string // type: unary or stream Type MethodType }
Method is a proto method.
type MethodType ¶
type MethodType uint8
Click to show internal directories.
Click to hide internal directories.