Documentation ¶
Overview ¶
Copyright © 2024 Denys <https://github.com/AnyoneClown> This is my license. There are many like it, but this one is mine. My license is my best friend. It is my life. I must master it as I must master my life.
Copyright © 2024 Denys <https://github.com/AnyoneClown> This is my license. There are many like it, but this one is mine. My license is my best friend. It is my life. I must master it as I must master my life.
Copyright © 2024 Denys <https://github.com/AnyoneClown> This is my license. There are many like it, but this one is mine. My license is my best friend. It is my life. I must master it as I must master my life.
Index ¶
- Variables
- func CreateFileAndDir() error
- func GetDBString() (string, error)
- func GetLastRecords(db *sqlx.DB, tableName string, limit int) ([]map[string]interface{}, error)
- func GetTableColumns(db *sqlx.DB, tableName string) ([]table.Column, error)
- func GetTables(db *sqlx.DB) ([]string, error)
- func LoadDefaultConfig() error
- func SaveConfigs(configs []DBConfig, file string) error
- type DBConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigFile string
View Source
var Configs []DBConfig
View Source
var DefaultConfigFile string
View Source
var SupportedDrivers = []string{
"postgres",
"sqlite",
"cockroachdb",
}
Functions ¶
func CreateFileAndDir ¶
func CreateFileAndDir() error
func GetDBString ¶
func GetLastRecords ¶
func LoadDefaultConfig ¶
func LoadDefaultConfig() error
func SaveConfigs ¶
Types ¶
type DBConfig ¶
type DBConfig struct { ConfigName string `yaml:"configName"` Driver string `yaml:"driver"` Host string `yaml:"host"` Port int `yaml:"port"` User string `yaml:"user"` Password string `yaml:"password"` Database string `yaml:"database"` }
var DefaultConfigData DBConfig
func LoadConfigs ¶
Click to show internal directories.
Click to hide internal directories.