Documentation ¶
Overview ¶
Package config provide configurations for connections on databases
Index ¶
- Variables
- func CheckConfig() (*os.File, error)
- func CreateFileConfig(data []byte) error
- func GenerateConfig()
- func GetConfig() model.Config
- func GetOS() string
- func GetPathConfigFile() string
- func IsDirectoryExists(path string) bool
- func IsNotEmpty(config *model.Config, Item []string, subItem func() map[string][]string) (string, error)
- func MustBeNotEmpty(v interface{}, require func() []string, sub func() map[string][]string) (string, error)
- func Unmarshal(reader *csv.Reader, v interface{}) error
- type FieldMismatch
- type UnsupportedType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Client provide the name of server executing Client string = "" )
Functions ¶
func CreateFileConfig ¶
CreateFileConfig create config file and put the byte data
func GenerateConfig ¶
func GenerateConfig()
GenerateConfig generates the configuration file from some questions that are answered by the user
func GetConfig ¶
GetConfig using lib yaml.v2 for read the yaml file to get the configuration of hosts and return struct Config{}
func GetPathConfigFile ¶
func GetPathConfigFile() string
GetPathConfigFile only darwin and linux are running the configuration
func IsDirectoryExists ¶
IsDirectoryExists verify is directory exists
func IsNotEmpty ¶
func IsNotEmpty(config *model.Config, Item []string, subItem func() map[string][]string) (string, error)
IsNotEmpty using the closure MustBeNotEmpty for check if exist the data on the struct Config
Types ¶
type FieldMismatch ¶
type FieldMismatch struct {
// contains filtered or unexported fields
}
FieldMismatch struct used on func Unmarshal
func (*FieldMismatch) Error ¶
func (e *FieldMismatch) Error() string
type UnsupportedType ¶
type UnsupportedType struct {
Type string
}
UnsupportedType return field string
func (*UnsupportedType) Error ¶
func (e *UnsupportedType) Error() string
Click to show internal directories.
Click to hide internal directories.