ipld-eth-server/config/database.go
Eric Meyer 102beb11e3 Add the concept of multiple environments
* Right now, the two environments are Public and Private
    * This was to reflect the two blockchains we run against
2017-11-01 12:15:55 -05:00

14 lines
268 B
Go

package config
import "fmt"
type Database struct {
Hostname string
Name string
Port int
}
func DbConnectionString(dbConfig Database) string {
return fmt.Sprintf("postgresql://%s:%d/%s?sslmode=disable", dbConfig.Hostname, dbConfig.Port, dbConfig.Name)
}