config

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2018 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalComment

type AdditionalComment struct {
	Table          string            `yaml:"table"`
	TableComment   string            `yaml:"tableComment"`
	ColumnComments map[string]string `yaml:"columnComments"`
}

AdditionalComment is the struct for table relation from yaml

type AdditionalRelation

type AdditionalRelation struct {
	Table         string   `yaml:"table"`
	Columns       []string `yaml:"columns"`
	ParentTable   string   `yaml:"parentTable"`
	ParentColumns []string `yaml:"parentColumns"`
	Def           string   `yaml:"def"`
}

AdditionalRelation is the struct for table relation from yaml

type Config

type Config struct {
	DSN       string               `yaml:"dsn"`
	DocPath   string               `yaml:"dataPath"`
	Relations []AdditionalRelation `yaml:"relations"`
	Comments  []AdditionalComment  `yaml:"comments"`
}

Config is tbls config

func NewConfig

func NewConfig() (*Config, error)

NewConfig return Config

func (*Config) LoadArgs

func (c *Config) LoadArgs(args []string) error

LoadArgs load args slice

func (*Config) LoadConfigFile

func (c *Config) LoadConfigFile(path string) error

LoadConfigFile load config file

Jump to

Keyboard shortcuts

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