config

package
v0.0.0-...-e39e4f3 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: MIT Imports: 5 Imported by: 0

README

Configuration Files

The default location for the configuration file is $BLOCKORGROOT/blockorg.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 $BLOCKORGROOT. If it is not there it is assigned the default of '/home/user/.config/blockorg'.

If $BLOCKORGROOT/blockorg.json does not exist, the system will panic and exit. I have decided against using a default configuration for security reasons.

The provided example configuration should be used as a goby when creating your own configuration. Feel free to copy it into place and adjust the values.

Documentation

Overview

Package config handles the configuraion for the BlockOrg node

Package config

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 BlockOrgConfiguration

type BlockOrgConfiguration struct {
	StaticPath     string
	TemplateRoot   string
	AdminToken     string
	ManifestoPath  string
	MongoUserName  string
	MongoPassword  string
	MongoServerURL string
	EncKey         string
	AuthKey        string

	//The items bellow are set by the application itself.
	MongoSession *mgo.Session
	Router       *mux.Router
}

GodGameConfiguration holds the configuration information for the GGE program.

var Config *BlockOrgConfiguration

Config holds the system configuration.

func GetConfigs

func GetConfigs() *BlockOrgConfiguration

GetConfigs returns a configuration struct.

Jump to

Keyboard shortcuts

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