config

package
v0.0.0-...-cec6815 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Overview

Config package declares primitives to handle dynamic configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Environment string `json:"ENVIRONMENT"`
	AWSRegion   string `json:"AWSREGION"`
	//	Timeout       int64  `json:"TIMEOUT"`
	TelegramToken string `json:"TELEGRAMTOKEN"`
}

Config holds a complete set of dynamic configuration.

func GetConfigFromENV

func GetConfigFromENV() (*Config, error)

GetConfigFromENV reads the configuration from environment variables and returns a Config struct.

func GetConfigFromFile

func GetConfigFromFile(configFile string) (*Config, error)

GetConfigFromFile reads the configuration from an INI-style file and returns a Config struct. See tmb.conf.template for an example input file.

Jump to

Keyboard shortcuts

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