You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flux-feed/config/database.go

19 lines
497 B
Go

package config
import "github.com/kelseyhightower/envconfig"
// Database holds the configuration for the database connection.
type Database struct {
DatabaseDriver string `split_words:"true"`
DatabaseDSN string `split_words:"true"`
MigrationsPath string `default:"head" split_words:"true"`
}
// DataStore processes environment variables and returns a configured Database configuration struct.
func DataStore() Database {
var db Database
envconfig.MustProcess("flux", &db)
return db
}