dependencies

package
v0.0.0-...-9cddf44 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

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) Close

func (d *Database) Close()

Close Close the databases connections

func (*Database) GetMainDataseConnection

func (d *Database) GetMainDataseConnection() *gorm.DB

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

Jump to

Keyboard shortcuts

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