Version: v0.12.1 Latest Latest

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

Go to latest
Published: Sep 10, 2021 License: MIT Imports: 5 Imported by: 0




This section is empty.


This section is empty.


func Init added in v0.7.0

func Init() (command.Options, error)

Init reads in config file and returns a commands/Options instance.


type Config

type Config struct {
	Database struct {
		Host     string `default:""`
		Port     string `validate:"required"`
		DB       string `validate:"required"`
		User     string `validate:"required"`
		Password string `validate:"required"`
		Driver   string `validate:"required"`
		SSL      string `default:"disable"`
	// contains filtered or unexported fields

Config struct is used to store the db connection data.

func Get

func Get() *Config

Get returns a config object with the db connection data already in place.

func (*Config) Driver

func (c *Config) Driver() string

Driver returns the db driver from config.

func (*Config) GetDBConnStr

func (c *Config) GetDBConnStr() string

GetDBConnStr returns the connection string.

func (*Config) GetMigration

func (c *Config) GetMigration() string

GetMigration return up or down string to instruct the program if it should migrate database up or down.

func (*Config) GetSQLXDBConnStr added in v0.2.0

func (c *Config) GetSQLXDBConnStr() string

GetSQLXDBConnStr returns the connection string.

func (*Config) GetTestDBConnStr

func (c *Config) GetTestDBConnStr() string

GetTestDBConnStr returns the test connection string.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL