Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseDependencies ¶
func CloseDependencies() error
CloseDependencies Close the initied dependencies
func InitDependencies ¶
func InitDependencies(configurations Configurations) error
InitDependencies Init the app dependencies
Types ¶
type Configurations ¶
type Configurations struct { DatabaseType string `json:"database_type"` DatabaseURL string `json:"database_url"` }
Configurations The app configurations
func (Configurations) GetDatabaseConnection ¶
func (c Configurations) GetDatabaseConnection() (databaseType string, databaseURL string)
GetDatabaseConnection Get database type and url from connection
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database Create database connections
func (*Database) GetMainDataseConnection ¶
GetMainDataseConnection Get main app db connection
type Dependencies ¶
type Dependencies struct {
// contains filtered or unexported fields
}
Dependencies Store the dependencies
var AppDependencies Dependencies
AppDependencies Export the app dependencies (db, http client, ...) to all packages
func (Dependencies) GetMainDbConnection ¶
func (d Dependencies) GetMainDbConnection() *gorm.DB
GetMainDbConnection Get the application database main connection
Click to show internal directories.
Click to hide internal directories.