Documentation ¶
Overview ¶
Package global package is used for storing global variables that will be used across Voting application
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sql.DB
DB global variable for storing database connection
View Source
var Templates *template.Template
Templates variable is storing templates on application startup
Functions ¶
func ParseTemplates ¶
func ParseTemplates()
ParseTemplates parses templates folder and assigns parsed template to the global.Template variable
Types ¶
type Configuration ¶
type Configuration struct { Port string DbUser string DbPassword string DbName string JWTtokenPassword string }
Configuration is used store values from parsed config.json file
var Config Configuration
Config - global variable for providing global configuration
func ReadConfig ¶
func ReadConfig() Configuration
ReadConfig reads configuration file and exits if it does not exist or is wrongly formatter
Click to show internal directories.
Click to hide internal directories.