Documentation ¶
Index ¶
- Constants
- Variables
- func GetPsqlConnectionParams(hostname string) string
- func GetPsqlSslParams() string
- func GetPsqlWithPassowrdStarred(psql string) string
- func InitPostgres(hostname string) func()
- func InitTestCorrect() func()
- func InitTestError() func()
- func Initialize() func()
- func IsDatabaseVolume(volName string) bool
- func RegisterMigration(obj interface{})
- func UnregisterAllMigrations()
- type Connection
- type ConnectionFactory
Constants ¶
View Source
const ( KeyPsqlHost = "UBIQUITY_DB_PSQL_HOST" KeyPsqlUser = "UBIQUITY_DB_USERNAME" KeyPsqlPassword = "UBIQUITY_DB_PASSWORD" KeyPsqlDbName = "UBIQUITY_DB_NAME" KeyPsqlPort = "UBIQUITY_DB_PSQL_PORT" KeyPsqlTimeout = "UBIQUITY_DB_CONNECT_TIMEOUT" KeyPsqlSslMode = "UBIQUITY_DB_SSL_MODE" KeyPsqlSslRootCert = "UBIQUITY_DB_SSL_ROOT_CERT" )
View Source
const DBVolumeNameSuffix = "ibm-ubiquity-db"
Variables ¶
View Source
var VolumeNameSuffix = utils.GetEnv(keyPsqlDbPVName, DBVolumeNameSuffix)
Functions ¶
func GetPsqlConnectionParams ¶
func GetPsqlSslParams ¶
func GetPsqlSslParams() string
func InitPostgres ¶
func InitPostgres(hostname string) func()
func InitTestCorrect ¶ added in v1.2.0
func InitTestCorrect() func()
func InitTestError ¶
func InitTestError() func()
func Initialize ¶
func Initialize() func()
func IsDatabaseVolume ¶
func RegisterMigration ¶
func RegisterMigration(obj interface{})
func UnregisterAllMigrations ¶
func UnregisterAllMigrations()
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection() Connection
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) GetDb ¶
func (c *Connection) GetDb() *gorm.DB
func (*Connection) Open ¶
func (c *Connection) Open() error
type ConnectionFactory ¶
type ConnectionFactory interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.