Documentation ¶
Index ¶
- type Config
- func (c *Config) GetAllModels() (s []*Model)
- func (c *Config) GetAllTables() (s []*Table)
- func (c *Config) GetDrivers() (s []string)
- func (c *Config) GetModel(name string) *Model
- func (c *Config) GetModels() (s []*Model)
- func (c *Config) GetPackage(name string) (p *Package)
- func (c *Config) GetPivotModels() (s []*Model)
- func (c *Config) GetPivotTables() (s []*Table)
- func (c *Config) GetPrimaryKeys() (s []*PrimaryKey)
- func (c *Config) GetSchemas() (s []*Schema)
- func (c *Config) GetTables() (s []*Table)
- type Database
- func (d *Database) GetAllModels() (s []*Model)
- func (d *Database) GetAllTables() (s []*Table)
- func (d *Database) GetModels() (s []*Model)
- func (d *Database) GetPivotModels() (s []*Model)
- func (d *Database) GetPivotTables() (s []*Table)
- func (d *Database) GetPrimaryKeys() (s []*PrimaryKey)
- func (d *Database) GetSchemas() (s []*Schema)
- func (d *Database) GetTables() (s []*Table)
- type Field
- type List
- type Model
- type Package
- type PrimaryKey
- type Relation
- type Schema
- type SuperModel
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Path string Version string GoratorVersion string Packages map[string]*Package Databases []*Database EncodingJSON bool EncodingJSONOmitEmpty bool EncodingJSONUseStdLib bool EncodingXML bool EncodingXMLOmitEmpty bool EncodingXMLUseStdLib bool }
func (*Config) GetAllModels ¶
func (*Config) GetAllTables ¶
func (*Config) GetDrivers ¶
func (*Config) GetPackage ¶
func (*Config) GetPivotModels ¶
func (*Config) GetPivotTables ¶
func (*Config) GetPrimaryKeys ¶
func (c *Config) GetPrimaryKeys() (s []*PrimaryKey)
func (*Config) GetSchemas ¶
type Database ¶
type Database struct { Config *Config Name string DriverName string Driver driver.Driver Models []*Model Tables []*Table }
func (*Database) GetAllModels ¶
func (*Database) GetAllTables ¶
func (*Database) GetPivotModels ¶
func (*Database) GetPivotTables ¶
func (*Database) GetPrimaryKeys ¶
func (d *Database) GetPrimaryKeys() (s []*PrimaryKey)
func (*Database) GetSchemas ¶
type Field ¶
type Field struct { Model *Model Name string NameInDB string Type string TypeInDB string NameInEncoding string Default interface{} Validations []string Callbacks []string Array bool Null bool Unique bool Numeric bool Incrementing bool InDB bool Exported bool InEncoding bool Primitive bool Where bool OrderBy bool GroupBy bool Having bool }
type Model ¶
type Model struct { Database *Database SuperModel *SuperModel Name string Table *Table Fields []*Field Relations []*Relation PrimaryKey *PrimaryKey CreatedAt bool UpdatedAt bool DeletedAt bool CreatedBy bool UpdatedBy bool DeletedBy bool Callbacks []string HoldOriginal bool SoftDelete bool AllowExtra bool Uuid int Listed bool List *List IsPivot bool EncodingJSON bool EncodingJSONOmitEmpty bool EncodingJSONUseStdLib bool EncodingXML bool EncodingXMLOmitEmpty bool EncodingXMLUseStdLib bool }
type PrimaryKey ¶
func (*PrimaryKey) GetFields ¶
func (p *PrimaryKey) GetFields() []*Field
type Relation ¶
type Relation struct { Model *Model Name string NameInEncoding string OtherModelName string OtherModel *Model Type string ForeignKey string LocalKey string OtherKey string PivotName string Query map[string]interface{} // following is for belongsToMany relations // OtherForeignKey []string // Key []string Pivot *Model }
type SuperModel ¶
Click to show internal directories.
Click to hide internal directories.