Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupTestDB ¶ added in v4.1.5
CleanupTestDB cleans up test database tables
func SetupTestDB ¶ added in v4.1.5
func SetupTestDB(config TestDBConfig) (*sql.DB, error)
SetupTestDB sets up a test database connection
func TestEncryptionConfig ¶ added in v4.5.0
Types ¶
type TestDBConfig ¶ added in v4.1.5
type TestDBConfig struct {
Driver string
Host string
Port int
User string
Password string
DBName string
}
TestDBConfig represents database configuration for tests
func DefaultMySQLConfig ¶ added in v4.1.5
func DefaultMySQLConfig() TestDBConfig
DefaultMySQLConfig returns default MySQL configuration for tests
func DefaultPostgresConfig ¶ added in v4.1.5
func DefaultPostgresConfig() TestDBConfig
DefaultPostgresConfig returns default PostgreSQL configuration for tests
func (TestDBConfig) DSN ¶ added in v4.1.5
func (c TestDBConfig) DSN() string
DSN returns the data source name for the database
Click to show internal directories.
Click to hide internal directories.