Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultConfigFileName = "config.yaml"
Variables ¶
This section is empty.
Functions ¶
func AddConfig ¶
func AddConfig(envName string, env *ConfigEnvironment, configPath string) error
creates a config into default file
func GetDefaultConfigPath ¶
func GetDefaultConfigPath() string
func RemoveConfig ¶
Types ¶
type CliOptions ¶
func NewCliOptions ¶
func NewCliOptions() *CliOptions
type ConfigEnvironment ¶
type ConfigEnvironment struct { Name string Host string Database string Port uint16 User string Password string Default bool }
func DefaultConfig ¶
func DefaultConfig() *ConfigEnvironment
Used to the test environment. This params would not be used for production
func ListConfigs ¶
func ListConfigs(path string) ([]*ConfigEnvironment, error)
func LoadConfig ¶
func LoadConfig(path string, env string) (*ConfigEnvironment, error)
func (*ConfigEnvironment) Headers ¶
func (c *ConfigEnvironment) Headers() []string
func (*ConfigEnvironment) Values ¶
func (c *ConfigEnvironment) Values() []string
Click to show internal directories.
Click to hide internal directories.