config

package
v0.0.0-...-7ce84cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Database string `yaml:"database"`

	Tables []Table `yaml:"tables"`

	SchemaTablesDirOverride  string `yaml:"schema_tables_dir"`
	SchemaQueriesDirOverride string `yaml:"schema_queries_dir"`
	DbModelsDirOverride      string `yaml:"dbmodels_dir"`
}

func ParseConfigFromYAMLPath

func ParseConfigFromYAMLPath(configFilepath string) (*Config, error)

type Enum

type Enum struct {
	EnumName string `yaml:"name"`
}

type Table

type Table struct {
	TableName        string `yaml:"name"`
	FilenameOverride string `yaml:"filename_override"`
	ModelClass       string `yaml:"model_class"`
	Enums            []Enum `yaml:"enums"`
	// contains filtered or unexported fields
}

func TablesFromConfig

func TablesFromConfig(configFilepath string) ([]Table, error)

func (*Table) DbModelsDirPath

func (t *Table) DbModelsDirPath() string

func (*Table) Filename

func (t *Table) Filename() string

func (*Table) InvalidReasons

func (t *Table) InvalidReasons() error

func (*Table) IsValid

func (t *Table) IsValid() bool

func (*Table) ModelsDirPath

func (t *Table) ModelsDirPath() string

func (*Table) QuerierInterfaceGoPath

func (t *Table) QuerierInterfaceGoPath() string

func (*Table) QuerierMockGoPath

func (t *Table) QuerierMockGoPath() string

func (*Table) QuerySQLPath

func (t *Table) QuerySQLPath() string

func (*Table) SQLFilename

func (t *Table) SQLFilename() string

func (*Table) SchemaQueriesDirPath

func (t *Table) SchemaQueriesDirPath() string

func (*Table) SchemaSQLPath

func (t *Table) SchemaSQLPath() string

func (*Table) SchemaTablesDirPath

func (t *Table) SchemaTablesDirPath() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL