Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DB *gorm.DB
DB : is a exported variable for access from other packages, as this is the package that inits the DB
Functions ¶
func InitDB ¶
func InitDB(dbstringLocation string)
InitDB function reads the file location contents, which should contain database parameters and uses them to create a pointer to DB takes dbstringLocation (string) as a parameter, which shuold be a full path to the file nothing is returned directly, but if the function executes correctly the exported DB variable should be a *DB
func ParseConfig ¶
func ParseConfig(env string) (config model.Configuration)
ParseConfig does all the ParseConfig magic, with eventual support for environment variables etc. takes env (string) as an argument which is used to denote the environment the application is in returns model.Configuration struct containing various information about used by the aplication, see model/conf.go
Types ¶
This section is empty.