config

package
v0.0.0-...-bba364d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Env - export environment variables
	Env = GetConfig()
)

Functions

func GetBoolFromEnv

func GetBoolFromEnv(key string) bool

GetBoolFromEnv - parse boolean variables values

func GetIntFromEnv

func GetIntFromEnv(key string) int

GetIntFromEnv - parse int variables values

func LoadEnvs

func LoadEnvs()

LoadEnvs - load environment variables

Types

type Config

type Config struct {
	DatabaseHost           string
	DatabasePort           string
	DatabaseName           string
	DatabasePassword       string
	DatabaseUsername       string
	MagacoinPaymentURL     string
	PrivateKey             string
	TargetAccount          int
	DatabaseMaxIdle        int
	DatabaseIdleTimeout    int
	MagacoinPaymentTimeout int
	DatabaseMaxCon         int
}

Config - struct of config. variables

func GetConfig

func GetConfig() Config

GetConfig - get values of environment variables

Jump to

Keyboard shortcuts

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