config

package
v0.0.0-...-b8b82af Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

Jump to

Keyboard shortcuts

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