Documentation
¶
Index ¶
- func FormatByGoFmt(b *bytes.Buffer) (*bytes.Buffer, error)
- func FormatByGoFmtInto(b *bytes.Buffer) error
- func GenerateAll(config *Config, generators []Generator) error
- func GenerateUsingRegistered(config *Config) error
- func RegisterGenerator(gen Generator)
- func SaveFileAsGo(evenIfError bool, directory string, filename string, buffer *bytes.Buffer) error
- type Config
- func (f *Config) AddImport(name ...string)
- func (c *Config) AddMassValue(value interface{}, keys []string)
- func (c *Config) AddValue(key string, value interface{})
- func (f *Config) Enums() []model.Enum
- func (f *Config) FileNames() []string
- func (f *Config) Get(name string) *bytes.Buffer
- func (f Config) GetImports() []string
- func (f *Config) Interfaces() []model.Interface
- func (c Config) IsSetValue(name string) bool
- func (f *Config) Operations() []model.Operation
- func (f *Config) OutputDir() string
- func (f *Config) PackageName() string
- func (f *Config) ParsedSources() *model.ParsedSources
- func (f *Config) Registry() annotations.AnnotationRegister
- func (f *Config) Save(evenIfError bool, filenames ...string) error
- func (f *Config) SaveAll(evenIfError bool) error
- func (f *Config) Structs() []model.Struct
- func (f *Config) Typedefs() []model.Typedef
- type Generator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatByGoFmtInto ¶
func GenerateAll ¶
func GenerateUsingRegistered ¶
func RegisterGenerator ¶
func RegisterGenerator(gen Generator)
Types ¶
type Config ¶
type Config struct {
// Do wew. użytku dla generatorów aby mogły się ze sobą komunikować
Values map[string]interface{}
// contains filtered or unexported fields
}
func NewConfig ¶
func NewConfig(packageName, outputdir string, parsedSources *model.ParsedSources) *Config
func NewConfigUsingRegistry ¶
func NewConfigUsingRegistry(packageName, outputdir string, parsedSources *model.ParsedSources, register annotations.AnnotationRegister) *Config
func (*Config) AddMassValue ¶
AddStrValue("true", []string{"klucz1","klucz2","klucz3"...})
func (Config) GetImports ¶
func (*Config) Interfaces ¶
func (Config) IsSetValue ¶
func (*Config) PackageName ¶
func (*Config) ParsedSources ¶
func (f *Config) ParsedSources() *model.ParsedSources
func (*Config) Registry ¶
func (f *Config) Registry() annotations.AnnotationRegister
type Generator ¶
type Generator interface {
Name() string
GetAnnotations() []annotations.AnnotationDescriptor
Generate(config *Config) error
}
Click to show internal directories.
Click to hide internal directories.