Documentation ¶
Index ¶
Constants ¶
const ( // RootDirFlagFile if file that we place at the root of our project to // hold some important data, but also to flag us that it is the root RootDirFlagFile = ".uno" )
Variables ¶
This section is empty.
Functions ¶
func GetBasePath ¶
GetBasePath returns applications base path
Types ¶
type AppConfig ¶
AppConfig
func NewAppConfig ¶
NewAppConfig returns new instance of app configuration struct
type Config ¶
type Config struct { DB *DBConfig Server *ServerConfig App *AppConfig }
Config struct holds field names for most common data (DB, etc) but also has capacity to hold dynamic config registration Config must be serializable/unserializable, so dont' put any structs with methods here
func ReplaceTplVars ¶
ReplaceTplVars replaces tpl vars like {App.BasePath} with actuall values
type DBConfig ¶
type DBConfig struct { Name string Host string Port string User string Password string DBName string DSN string Migrate *MigrateConfig }
DBConfig
func NewDBConfig ¶
func NewDBConfig() *DBConfig
NewConfig returns new Config instance for the current environment
func NewMySqlDBConfig ¶
func NewMySqlDBConfig() *DBConfig
NewConfig returns new Config instance for the current environment
func NewSqliteDBConfig ¶
func NewSqliteDBConfig() *DBConfig
NewConfig returns new Config instance for the current environment
type MigrateConfig ¶
MigrateConfig
func NewMigrateConfig ¶
func NewMigrateConfig() *MigrateConfig
NewMigrateConfig returns migration config based on env settings
type ServerConfig ¶
type ServerConfig struct {
Address string
}
ServerConfig
func NewServerConfig ¶
func NewServerConfig() *ServerConfig
NewServerConfig creates new instance of ServerConfig with default values