Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBConnection ¶
DBConnection fetches the gorm DB from anywhere, regardless of which database is being used
Types ¶
type DatabaseConnection ¶
type DatabaseConnection interface { DatabaseInit() DatabaseMigrator() }
DatabaseConnection is done for ease of changing DB. This works with MariaDB and SQL Server. This can however be extended manually, with any of the databases supported by Gorm (see https://gorm.io/docs/connecting_to_the_database.html)
func DatabaseConnectionFactory ¶
func DatabaseConnectionFactory() DatabaseConnection
DatabaseConnectionFactory returns a database that implements the DatabaseConnection interface from the RDBMS written in the "DB_TYPE" env
Click to show internal directories.
Click to hide internal directories.