Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OutputDirDepth ¶
OutputDirDepth returns depth of output directory
Types ¶
type Config ¶
type Config struct {
DBConfig *database.Config `json:"database" yaml:"database"`
Migrations string
//Models *Options `json:"models,omitempty" yaml:"models,omitempty"`
//Repository *Options `json:"repository,omitempty" yaml:"repository,omitempty"`
Tasks map[string]*Options `json:"tasks" yaml:"tasks"`
Debug bool `toml:"debug,omitempty" json:"debug,omitempty" yaml:"debug,omitempty"`
NoEditDisclaimer []byte
Verbose bool `json:"verbose" yaml:"verbose"`
Version string `toml:"-" json:"-" yaml:"-"`
Schema StringList `yaml:"schema,omitempty"`
}
type Field ¶
type Field struct {
IsRequired bool
IsRelation bool
SchemaField *DataField
TableField *DataField
ToTableField string
ToObjectField string
}
Object will exist if a model has both a matching table and schema
type Options ¶
type Options struct {
Name string `json:"name" yaml:"name"`
Debug bool `json:"debug,omitempty" yaml:"debug,omitempty"`
OutFolder string `json:"out_folder,omitempty" yaml:"output,omitempty"`
PkgName string `json:"pkgname,omitempty" yaml:"pkgname,omitempty"`
PluralFileNames bool `json:"plural_file_names" yaml:"plural_file_names"`
NoTests bool `json:"no_tests,omitempty" yaml:"no_tests,omitempty"`
Wipe bool `json:"wipe,omitempty" yaml:"wipe,omitempty"`
NoGeneratedHeader bool `json:"no_generated_header,omitempty" yaml:"no_generated_header,omitempty"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
TagIgnore []string `json:"tag_ignore" yaml:"tag_ignore"`
StructTagCasing string `json:"struct_tag_casing" yaml:"struct_tag_casing"`
TemplateDirs []string `json:"template_dirs" yaml:"template_dirs"`
Imports importers.Collection `json:"imports" yaml:"imports"`
Replacements []string `json:"replacements,omitempty" yaml:"replacements,omitempty"`
}
func (*Options) ConfigureImports ¶
func (o *Options) ConfigureImports(defaultImport func() importers.Collection) importers.Collection
type Simmer ¶
type Simmer struct {
Config *Config
Data *data.Data
Schema *schema.Schema
Model *Model
Options interface{}
// contains filtered or unexported fields
}
Simmer holds the global data needed by most pieces to run
type StringList ¶
type StringList []string
func (StringList) Has ¶
func (a StringList) Has(file string) bool
func (*StringList) UnmarshalYAML ¶
func (a *StringList) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.