database

package
v0.0.0-...-412dc8c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2021 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxDatabaseConnectionRequests = uint64(15)
)

Variables

This section is empty.

Functions

func AutoMigrate

func AutoMigrate(db *gorm.DB, logger *zap.Logger) error

AutoMigrate Attempt to automatically migrate all database models.

func Connect

func Connect(config interfaces.MySQLConfig, dbLogger types.DatabaseLogger) (*gorm.DB, error)

Connect Attempt to connect to the database using an exponential backoff algorithm with a maximum retry count.

func ExtractMySQLConfig

func ExtractMySQLConfig(app interfaces.AppConfig) interfaces.MySQLConfig

ExtractMySQLConfig Extractor function for wire to extract the MySQL config object from the app config.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL