Documentation
¶
Index ¶
- type Column
- type ColumnAnswer
- type Diagram
- type Options
- func (o *Options) GetColumnNameCase() *cli.StringFlag
- func (o *Options) GetCommonFields() *cli.StringSliceFlag
- func (o *Options) GetDirectoryFlag() *cli.StringFlag
- func (o *Options) GetExtraTablesDefinition() *cli.StringFlag
- func (o *Options) GetExtraTablesSurvey() *cli.BoolFlag
- func (o *Options) GetFileList() *cli.StringSliceFlag
- func (o *Options) GetIDField() *cli.StringFlag
- func (o *Options) GetOutputFilename() *cli.StringFlag
- func (o *Options) GetOutputPath() *cli.StringFlag
- func (o *Options) GetTableNameCase() *cli.StringFlag
- func (o *Options) GetTableNamePlural() *cli.BoolFlag
- func (o *Options) GetTag() *cli.StringFlag
- func (o *Options) GetTitle() *cli.StringFlag
- func (o *Options) Validate() error
- type Reference
- type Table
- type TableAnswer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶ added in v0.5.0
type Column struct {
Name string `json:"name"`
Type string `json:"type"`
IsPrimaryKey bool `json:"is_primary_key"`
IsForeignKey bool `json:"is_foreign_key"`
IsExtraField bool `json:"is_extra_field"`
}
Column describes the details of a column.
type ColumnAnswer ¶ added in v0.6.0
type ColumnAnswer struct {
Name string `survey:"column_name"`
Type string `survey:"column_type"`
IsPrimaryKey bool `survey:"is_primary_key"`
IsForeignKey bool `survey:"is_foreign_key"`
AddMore string `survey:"add_more"`
}
ColumnAnswer captures the answers for the column related questions.
type Options ¶
type Options struct {
CommonFields cli.StringSlice
Directory string
ExtraTablesDefinition string
FileList cli.StringSlice
IDField string
OutputFilename string
OutputPath string
Tag string
Title string
ColumnNameCase string
TableNameCase string
TableNamePlural bool
// ExtraTablesSurvey guides the user through a wizard to provide more tables that
// are not included in the respective files.
ExtraTablesSurvey bool
Config config.Config
}
Options describe the allowed options of the cli tool.
func NewOptions ¶
NewOptions creates and returns a new options structure.
func (*Options) GetColumnNameCase ¶
func (o *Options) GetColumnNameCase() *cli.StringFlag
GetColumnNameCase returns the definition for column_name_case flag.
func (*Options) GetCommonFields ¶
func (o *Options) GetCommonFields() *cli.StringSliceFlag
GetCommonFields returns the definition for common_field flag.
func (*Options) GetDirectoryFlag ¶
func (o *Options) GetDirectoryFlag() *cli.StringFlag
GetDirectoryFlag returns the definition for directory flag.
func (*Options) GetExtraTablesDefinition ¶ added in v0.6.0
func (o *Options) GetExtraTablesDefinition() *cli.StringFlag
GetExtraTablesDefinition returns the definition for directory flag.
func (*Options) GetExtraTablesSurvey ¶ added in v0.6.0
GetExtraTablesSurvey returns the definition for title flag.
func (*Options) GetFileList ¶
func (o *Options) GetFileList() *cli.StringSliceFlag
GetFileList returns the definition for file_list flag.
func (*Options) GetIDField ¶
func (o *Options) GetIDField() *cli.StringFlag
GetIDField returns the definition for id_field flag.
func (*Options) GetOutputFilename ¶
func (o *Options) GetOutputFilename() *cli.StringFlag
GetOutputFilename returns the definition for output_filename flag.
func (*Options) GetOutputPath ¶
func (o *Options) GetOutputPath() *cli.StringFlag
GetOutputPath returns the definition for output_path flag.
func (*Options) GetTableNameCase ¶
func (o *Options) GetTableNameCase() *cli.StringFlag
GetTableNameCase returns the definition for table_name_case flag.
func (*Options) GetTableNamePlural ¶
GetTableNamePlural returns the definition for title flag.
func (*Options) GetTag ¶
func (o *Options) GetTag() *cli.StringFlag
GetTag returns the definition for tag flag.
func (*Options) GetTitle ¶
func (o *Options) GetTitle() *cli.StringFlag
GetTitle returns the definition for title flag.
type Reference ¶ added in v0.5.0
type Reference struct {
FromTableName string
FromTableColumn string
ToTableName string
TypeOfReference string
}
Reference describes the references for a table.
type Table ¶ added in v0.5.0
type Table struct {
Name string `json:"name"`
ColumnList []Column `json:"columns"`
Color string `json:"color"`
}
Table describes the details of a table.
type TableAnswer ¶ added in v0.6.0
TableAnswer captures the answers for the table definition questions.