Documentation ¶
Index ¶
- func NewGenerator(options map[string]string) generator.LanguageGenerator
- type AsyncIOGenerator
- func (a *AsyncIOGenerator) GenerateScopeImports(file *os.File, s *parser.Scope) error
- func (a *AsyncIOGenerator) GenerateService(file *os.File, s *parser.Service) error
- func (a *AsyncIOGenerator) GenerateServiceImports(file *os.File, s *parser.Service) error
- func (a *AsyncIOGenerator) GenerateSubscriber(file *os.File, scope *parser.Scope) error
- type Generator
- func (g *Generator) DefaultOutputDir() string
- func (g *Generator) GenerateConstants(file *os.File, name string) error
- func (g *Generator) GenerateConstantsContents(constants []*parser.Constant) error
- func (g *Generator) GenerateDependencies(dir string) error
- func (g *Generator) GenerateDocStringComment(file *os.File) error
- func (g *Generator) GenerateEnum(enum *parser.Enum) error
- func (g *Generator) GenerateException(exception *parser.Struct) error
- func (g *Generator) GenerateFile(name, outputDir string, fileType generator.FileType) (*os.File, error)
- func (g *Generator) GeneratePublisher(file *os.File, scope *parser.Scope) error
- func (g *Generator) GenerateScopeImports(file *os.File, s *parser.Scope) error
- func (g *Generator) GenerateScopePackage(file *os.File, s *parser.Scope) error
- func (g *Generator) GenerateService(file *os.File, s *parser.Service) error
- func (g *Generator) GenerateServiceImports(file *os.File, s *parser.Service) error
- func (g *Generator) GenerateServicePackage(file *os.File, s *parser.Service) error
- func (g *Generator) GenerateStruct(s *parser.Struct) error
- func (g *Generator) GenerateSubscriber(file *os.File, scope *parser.Scope) error
- func (g *Generator) GenerateTypeDef(*parser.TypeDef) error
- func (g *Generator) GenerateTypesImports(file *os.File, isArgsOrResult bool) error
- func (g *Generator) GenerateUnion(union *parser.Struct) error
- func (g *Generator) GetOutputDir(dir string) string
- func (g *Generator) PostProcess(f *os.File) error
- func (g *Generator) SetupGenerator(outputDir string) error
- func (g *Generator) TeardownGenerator() error
- func (g *Generator) UseVendor() bool
- type TornadoGenerator
- func (t *TornadoGenerator) GenerateScopeImports(file *os.File, s *parser.Scope) error
- func (t *TornadoGenerator) GenerateService(file *os.File, s *parser.Service) error
- func (t *TornadoGenerator) GenerateServiceImports(file *os.File, s *parser.Service) error
- func (t *TornadoGenerator) GenerateSubscriber(file *os.File, scope *parser.Scope) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGenerator ¶
func NewGenerator(options map[string]string) generator.LanguageGenerator
NewGenerator creates a new Python LanguageGenerator.
Types ¶
type AsyncIOGenerator ¶
type AsyncIOGenerator struct {
*Generator
}
AsyncIOGenerator implements the LanguageGenerator interface for Python using AsyncIO.
func (*AsyncIOGenerator) GenerateScopeImports ¶
GenerateScopeImports generates necessary imports for the given scope.
func (*AsyncIOGenerator) GenerateService ¶
GenerateService generates the given service.
func (*AsyncIOGenerator) GenerateServiceImports ¶
GenerateServiceImports generates necessary imports for the given service.
func (*AsyncIOGenerator) GenerateSubscriber ¶
GenerateSubscriber generates the subscriber for the given scope.
type Generator ¶
type Generator struct { *generator.BaseGenerator // contains filtered or unexported fields }
Generator implements the LanguageGenerator interface for Python.
func (*Generator) DefaultOutputDir ¶
DefaultOutputDir returns the default output directory for generated files.
func (*Generator) GenerateConstants ¶
GenerateConstants generates any static constants.
func (*Generator) GenerateConstantsContents ¶
GenerateConstantsContents generates constants.
func (*Generator) GenerateDependencies ¶
GenerateDependencies is a no-op.
func (*Generator) GenerateDocStringComment ¶
GenerateDocStringComment generates the autogenerated notice.
func (*Generator) GenerateEnum ¶
GenerateEnum generates the given enum.
func (*Generator) GenerateException ¶
GenerateException generates the given exception.
func (*Generator) GenerateFile ¶
func (g *Generator) GenerateFile(name, outputDir string, fileType generator.FileType) (*os.File, error)
GenerateFile generates the given FileType.
func (*Generator) GeneratePublisher ¶
GeneratePublisher generates the publisher for the given scope.
func (*Generator) GenerateScopeImports ¶
GenerateScopeImports generates necessary imports for the given scope.
func (*Generator) GenerateScopePackage ¶
GenerateScopePackage is a no-op.
func (*Generator) GenerateService ¶
GenerateService generates the given service.
func (*Generator) GenerateServiceImports ¶
GenerateServiceImports generates necessary imports for the given service.
func (*Generator) GenerateServicePackage ¶
GenerateServicePackage is a no-op.
func (*Generator) GenerateStruct ¶
GenerateStruct generates the given struct.
func (*Generator) GenerateSubscriber ¶
GenerateSubscriber generates the subscriber for the given scope.
func (*Generator) GenerateTypeDef ¶
GenerateTypeDef generates the given typedef.
func (*Generator) GenerateTypesImports ¶
func (*Generator) GenerateUnion ¶
GenerateUnion generates the given union.
func (*Generator) GetOutputDir ¶
GetOutputDir returns the output directory for generated files.
func (*Generator) PostProcess ¶
PostProcess is called after generating each file.
func (*Generator) SetupGenerator ¶
SetupGenerator performs any setup logic before generation.
func (*Generator) TeardownGenerator ¶
TeardownGenerator is run after generation.
type TornadoGenerator ¶
type TornadoGenerator struct {
*Generator
}
TornadoGenerator implements the LanguageGenerator interface for Python using Tornado.
func (*TornadoGenerator) GenerateScopeImports ¶
GenerateScopeImports generates necessary imports for the given scope.
func (*TornadoGenerator) GenerateService ¶
GenerateService generates the given service.
func (*TornadoGenerator) GenerateServiceImports ¶
GenerateServiceImports generates necessary imports for the given service.
func (*TornadoGenerator) GenerateSubscriber ¶
GenerateSubscriber generates the subscriber for the given scope.