Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Hostname Host string // Port Port string // User User string // Password Pwd string // Database Name Name string // Whether SSL is enabled on the connection or not Ssl bool // Schema name SchemaName string }
Config holds the configuration to connect to a database
func GetM3DbConfig ¶
func GetM3DbConfig() *Config
GetM3DbConfig returns a `Config` object with the values for the database by either reading them from the environment or defaulting them to a known value.
func GetTenantDBConfig ¶
type Singleton ¶
func GetInstance ¶
func GetInstance() *Singleton
Returns a Singleton instance that keeps the connections to the Database
func (*Singleton) GetTenantDB ¶
GetTenantDB returns a database connection to the tenant being accessed, if the connection has been established then it's returned from a local cache, else it's created, cached and returned.
Click to show internal directories.
Click to hide internal directories.