config

package
v0.0.0-...-8f442ae Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

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 {
	ApiEnvironment  string   `json:"APIENVIRONMENT"`
	PrivateKey      string   `json:"PRIVATEKEY"`
	PublicKey       string   `json:"PUBLICKEY"`
	AccountAddress  string   `json:"ACCOUNTADDRESS"`
	Node            string   `json:"NODE"`
	LCDNode         string   `json:"LCDNODE"`
	Amount          string   `json:"AMOUNT"`
	Origins         []string `json:"ORIGINS"`
	RedisEndpoint   string   `json:"REDISENDPOINT"`
	RedisPassword   string   `json:"REDISPASSWORD"`
	RecaptchaSecret string   `json:"RECAPTCHASECRET"`
	AWSRegion       string   `json:"AWSREGION"`
	Timeout         int64    `json:"TIMEOUT"`
}

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 f11.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