Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Database DBConfig Server ServerConfig Log LogConfig }
Config is the application config
type DBConfig ¶
type DBConfig struct { // The SQL dialect we support // One of mysql, postgres, mssql, sqlite3 Type string `default:"sqlite3"` // The database connection options Host string `default:"localhost"` Port uint Name string `default:"ghz"` User string Password string SSLMode string `default:"disable"` // Optionally full connection string in which case the above are ignored Connection string // Path to db for sqlite Path string `default:"ghz.db"` }
DBConfig database configs
func (*DBConfig) GetConnectionString ¶
GetConnectionString returns the database connection string
func (*DBConfig) GetDialect ¶
GetDialect gets compatible GORM dialect
type ServerConfig ¶
type ServerConfig struct { RootURL string Address string `default:"localhost"` Port uint `default:"3000"` }
ServerConfig is server config
func (*ServerConfig) GetHostPort ¶
func (s *ServerConfig) GetHostPort() string
GetHostPort returns host:port
Click to show internal directories.
Click to hide internal directories.