Documentation
¶
Index ¶
- Variables
- func Action(c *cli.Context) error
- type CheckDesc
- type ConverterDesc
- type ConverterProc
- type Generator
- func (g *Generator) AddImport(name string, path string) string
- func (g *Generator) Bytes() []byte
- func (g *Generator) Format() ([]byte, error)
- func (g *Generator) Generate(yamlConf *YamlConfig) error
- func (g *Generator) PrepareFunctions(names map[string]string)
- func (g *Generator) PrepareImports(imports map[string]string)
- func (g *Generator) PrepareInterface(name string)
- func (g *Generator) PreparePackage(dir string, files []string)
- func (g *Generator) PrepareParser()
- func (g *Generator) PrepareReceiver(name string)
- func (g *Generator) PrepareService(name string)
- func (g *Generator) PrepareTaskes(taskes map[string]TaskDesc)
- func (g *Generator) Printf(format string, args ...interface{})
- func (g *Generator) Run()
- type ImportLine
- type ParamDesc
- type ProcDesc
- type RCallDesc
- type ServiceDesc
- type Task
- type TaskDesc
- type TaskProc
- type YamlConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var Description = "As default, it will read task defination from stdin, if --file was given, it would read from the file."
View Source
var Flags = []cli.Flag{ cli.StringFlag{ Name: "file,f", Usage: "read task defination from `FILE`", }, }
View Source
var Usage = "auto generate rpc methods"
Functions ¶
Types ¶
type ConverterDesc ¶
type ConverterProc ¶
type Generator ¶
type Generator struct { File *parser.File PackageName string Imports []ImportLine Receiver *parser.DeclNode ReceiverType parser.Type InterfaceType parser.Type Functions map[string]parser.Type ServiceReceiver *parser.DeclNode ServiceReceiverType string ServicePackage *parser.Package Taskes []*Task // contains filtered or unexported fields }
func NewGenerator ¶
func NewGenerator() *Generator
func (*Generator) Generate ¶
func (g *Generator) Generate(yamlConf *YamlConfig) error
func (*Generator) PrepareFunctions ¶
func (*Generator) PrepareImports ¶
func (*Generator) PrepareInterface ¶
func (*Generator) PreparePackage ¶
func (*Generator) PrepareParser ¶
func (g *Generator) PrepareParser()
func (*Generator) PrepareReceiver ¶
func (*Generator) PrepareService ¶
func (*Generator) PrepareTaskes ¶
type ImportLine ¶
func (ImportLine) String ¶
func (l ImportLine) String() string
type RCallDesc ¶
func NewRCallDsec ¶
type ServiceDesc ¶
type ServiceDesc struct {
Function string
}
Click to show internal directories.
Click to hide internal directories.