config

package
v0.0.0-...-dd92ee3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2019 License: MIT Imports: 6 Imported by: 0

README

Configuration Files

The default location for the configuration file is $GGEROOT/gge.json. If you want to change this location, you will need to change the code in this package.

By default, the code looks for an environmental variable named $GGEROOT. If it is not there it is assigned the default of '/home/user/.config/gge'.

If $GGEROOT/gge.json does not exist, configuration defaults are set by ggconf.defaultConfiguration().

In the future I will put more work into this package so that it can verify which settings are actually set and which are not in the config, and assign defaults to those that are blank. For now, if the config file is proper json, it assumes it is good.

The example configuration file in this directory will show not only my default expectations, but also what you will get if you fall back to defaultConfiguration().

Documentation

Overview

Package config handles the configuraion for the God Game Engine Program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfiguration

func LoadConfiguration()

LoadConfiguration Loads the configuration and sets the global variable.

Types

type GodGameConfiguration

type GodGameConfiguration struct {
	StaticPath        string
	MongoUserName     string
	MongoPassword     string
	MongoServerURL    string
	MongoSession      *mgo.Session
	TemplateRoot      string
	AdminToken        string
	MinimumNameLength int
	MinPasswordLength int
	EncKey            string
	AuthKey           string
	SMTPServer        string
	SMTPPort          int
	FromAddress       string
	FromName          string
	SMTPPassword      string
	SMTPUserName      string
	Router            *mux.Router

	Database *gorm.DB //Not in the Config File.
}

GodGameConfiguration holds the configuration information for the GGE program.

var Config *GodGameConfiguration

Config holds the system configuration.

func GetConfigs

func GetConfigs() *GodGameConfiguration

GetConfigs returns a configuration struct.

Jump to

Keyboard shortcuts

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