ipld-eth-server/config/database.go

14 lines
268 B
Go
Raw Normal View History

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)
}