Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockMarker ¶
type BlockMarker struct { Start string `` /* 133-byte string literal not displayed */ End string `json:"end,omitempty" yaml:"end,omitempty" jsonschema:"description=The end marker for code block,example=@gencoder.block.end:"` }
func (BlockMarker) GetEnd ¶
func (e BlockMarker) GetEnd() string
func (BlockMarker) GetStart ¶
func (e BlockMarker) GetStart() string
type Column ¶
type Column struct { Name string `json:"name" yaml:"name"` Ordinal int `json:"ordinal" yaml:"ordinal"` Type string `json:"type" yaml:"type"` IsNullable bool `json:"isNullable" yaml:"isNullable"` DefaultValue *string `json:"defaultValue" yaml:"defaultValue"` IsPrimaryKey bool `json:"isPrimaryKey" yaml:"isPrimaryKey"` Comment *string `json:"comment" yaml:"comment"` }
type Config ¶
type Config struct { Templates string `` /* 130-byte string literal not displayed */ OutputMarker string `` /* 162-byte string literal not displayed */ BlockMarker BlockMarker `` /* 131-byte string literal not displayed */ Databases []*DatabaseConfig `json:"databases,omitempty" yaml:"databases,omitempty" jsonschema:"description=The list of databases"` Properties map[string]string `` /* 159-byte string literal not displayed */ Output string `` /* 130-byte string literal not displayed */ ImportHelpers []string `json:"importHelpers,omitempty" yaml:"importHelpers,omitempty" jsonschema:"description=The list of helper JavaScript files"` }
func (Config) GetOutputMarker ¶
func (Config) GetTemplates ¶
type DatabaseConfig ¶
type DatabaseConfig struct { Name string `json:"name,omitempty" yaml:"name,omitempty" jsonschema:"description=The name of the database,example=mydb"` Dsn string `` /* 271-byte string literal not displayed */ Schema string `json:"schema,omitempty" yaml:"schema,omitempty" jsonschema:"description=The schema of the database,example=public"` Properties map[string]string `json:"properties,omitempty" yaml:"properties,omitempty" jsonschema:"description=Properties specific to the database"` Tables []*TableConfig `json:"tables,omitempty" yaml:"tables,omitempty" jsonschema:"description=The list of tables in the database"` }
type GlobalOptions ¶
type GlobalOptions struct {
Config string `json:"config" yaml:"config"` // Where to read gencoder.yaml
}
type Index ¶
type Index struct { Name string `json:"name" yaml:"name"` IsUnique bool `json:"isUnique" yaml:"isUnique"` IsPrimary bool `json:"isPrimary" yaml:"isPrimary"` Columns []*IndexColumn `json:"columns" yaml:"columns"` }
type IndexColumn ¶
type RenderContext ¶
type RenderContext struct { Table *Table `json:"table" yaml:"table"` Properties map[string]string `json:"properties" yaml:"properties"` // Merged properties Config *Config `json:"config" yaml:"config"` DatabaseConfig *DatabaseConfig `json:"databaseConfig" yaml:"databaseConfig"` TableConfig *TableConfig `json:"tableConfig" yaml:"tableConfig"` }
type TableConfig ¶
type TableConfig struct { Schema string `json:"schema,omitempty" yaml:"schema,omitempty" jsonschema:"description=The schema of the table,example=public"` Name string `json:"name,omitempty" yaml:"name,omitempty" jsonschema:"description=The name of the table,example=user,required"` Properties map[string]string `json:"properties,omitempty" yaml:"properties,omitempty" jsonschema:"description=Properties specific to the table"` IgnoreColumns []string `` /* 133-byte string literal not displayed */ }
Click to show internal directories.
Click to hide internal directories.