config

package
v0.0.0-...-5a62e24 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2017 License: GPL-3.0 Imports: 13 Imported by: 2

Documentation

Overview

Package config provides functionalities to decode, verify, and enrich the environment and configuration file of a protokollamt deployment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFlags

func CheckFlags(envName string, configName string) (string, string, error)

CheckFlags verifies that supplied flags are no file system paths and point to existing files.

func DefineRoutes

func DefineRoutes(c *models.Config) *gin.Engine

DefineRoutes initializes a new default gin router, defines the provided HTTP endpoints of protokollamt, and declared where static and template resources are located.

func LoadConfig

func LoadConfig(configName string, dbPassword string, mailPassword string) (*models.Config, error)

LoadConfig expects a name for protokollamt's configuration file. It attempts to parse its contents into above configuration structs.

func OpenDatabase

func OpenDatabase(connString string, deployStage string, resetProt bool, resetRemv bool, resetRepl bool) (*gorm.DB, error)

OpenDatabase attempts to connect to configured PostgreSQL database and checks for connectivity.

Types

This section is empty.

Jump to

Keyboard shortcuts

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