global

package
v0.0.0-...-26b15f6 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: MIT Imports: 5 Imported by: 5

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

Jump to

Keyboard shortcuts

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