Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvProduction = "production" EnvLocal = "local" )
Variables ¶
View Source
var ( // Env global environment accessible from anywhere Env string )
Functions ¶
func Production ¶
func Production() bool
Types ¶
type Config ¶
type ConnectionType ¶
type ConnectionType string
const ( MySQL ConnectionType = "mysql" Postgres ConnectionType = "postgresql" SQLite ConnectionType = "sqlite" )
type Database ¶
type Database struct { DSN string `env:"DATABASE_DSN" envDefault:"fitWave.db"` Type ConnectionType `env:"DATABASE_TYPE" envDefault:"sqlite"` AutoMigrate bool `env:"DATABASE_AUTO_MIGRATE" envDefault:"true"` }
Click to show internal directories.
Click to hide internal directories.