Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ProjectPath string `yaml:"project_path"` ModuleName ModuleName `yaml:"module_name"` Model string `yaml:"model"` Table string `yaml:"table"` TableComment string `yaml:"table_comment"` Layers []string `yaml:"layers"` Fields Fields `yaml:"fields"` TimeType TimeEnum `yaml:"time_type"` IDType IDEnum `yaml:"id_type"` Architecture string }
Config model to map configuration from a yaml file
func (*Config) AddDefaultInitLayers ¶
func (c *Config) AddDefaultInitLayers()
func (Config) HasValidIDType ¶ added in v1.3.0
func (Config) HasValidTimeType ¶ added in v1.3.0
func (Config) IsProjectPathEmpty ¶
func (Config) IsStorageLayerRequired ¶ added in v1.5.0
func (*Config) SetInitPath ¶
func (c *Config) SetInitPath(moduleName ModuleName) error
type Field ¶
type Field struct { Name string `yaml:"name"` Type string `yaml:"type"` IsNull bool `yaml:"is_null"` FieldSize int `yaml:"field_size"` NumericPrecision uint `yaml:"numeric_precision"` NumericScale int `yaml:"numeric_scale"` }
Field model for every Field of a struct and table that want to be generated
type Layer ¶
type Layer struct { Model string Table string TableComment string Fields Fields // ProjectPath indicates the root location of the project ProjectPath string // ModuleName is used to build the imports ModuleName ModuleName TimeType TimeEnum `yaml:"time_type"` IDType IDEnum `yaml:"id_type"` // IsStorageLayerGenerated we need this to know if we'll pass this dependency to the domain // in the routes layer IsStorageLayerGenerated bool `yaml:"is_storage_layer_generated"` }
type ModuleName ¶
type ModuleName string
func (ModuleName) GetProjectName ¶
func (m ModuleName) GetProjectName() string
type Template ¶
Template is used to pass the data to create a template
func (*Template) SetLayerData ¶
func (*Template) SetPathPrefix ¶
Click to show internal directories.
Click to hide internal directories.