config

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RegistryAddressKey   = "registry_address_key" //to be read from github
	AutoSSLDomainKey     = "auto_ssl_domain"
	AutoSSLCacheDirKey   = "auto_ssl_cache_dir"
	BlockchainEnabledKey = "blockchain_enabled"
	BurstSize            = "burst_size"
	ConfigPathKey        = "config_path"

	DaemonGroupName                = "daemon_group_name"
	DaemonTypeKey                  = "daemon_type"
	DaemonEndPoint                 = "daemon_end_point"
	EthereumJsonRpcEndpointKey     = "ethereum_json_rpc_endpoint"
	ExecutablePathKey              = "executable_path"
	HdwalletIndexKey               = "hdwallet_index"
	HdwalletMnemonicKey            = "hdwallet_mnemonic"
	IpfsEndPoint                   = "ipfs_end_point"
	IpfsTimeout                    = "ipfs_timeout"
	LogKey                         = "log"
	MonitoringEnabled              = "monitoring_enabled"
	MonitoringServiceEndpoint      = "monitoring_svc_end_point"
	OrganizationId                 = "organization_id"
	ServiceId                      = "service_id"
	PassthroughEnabledKey          = "passthrough_enabled"
	PassthroughEndpointKey         = "passthrough_endpoint"
	PrivateKeyKey                  = "private_key"
	RateLimitPerMinute             = "rate_limit_per_minute"
	SSLCertPathKey                 = "ssl_cert"
	SSLKeyPathKey                  = "ssl_key"
	PaymentChannelStorageTypeKey   = "payment_channel_storage_type"
	PaymentChannelStorageClientKey = "payment_channel_storage_client"
	PaymentChannelStorageServerKey = "payment_channel_storage_server"
	//configs for Daemon Monitoring and Notification
	AlertsEMail                 = "alerts_email"
	HeartbeatServiceEndpoint    = "heartbeat_svc_end_point"
	NotificationServiceEndpoint = "notification_svc_end_point"
	ServiceHeartbeatType        = "service_heartbeat_type"
)

Variables

This section is empty.

Functions

func GetBigInt added in v0.1.2

func GetBigInt(key string) *big.Int

func GetBigIntFromViper added in v0.1.2

func GetBigIntFromViper(config *viper.Viper, key string) (value *big.Int, err error)

func GetBool

func GetBool(key string) bool

func GetBuildTime added in v0.1.9

func GetBuildTime() string

func GetDuration

func GetDuration(key string) time.Duration

func GetInt

func GetInt(key string) int

func GetSha1Revision added in v0.1.9

func GetSha1Revision() string

func GetString

func GetString(key string) string

func GetVersionTag added in v0.1.9

func GetVersionTag() string

func IsValidUrl added in v0.1.5

func IsValidUrl(urlToTest string) bool

isValidUrl tests a string to determine if it is a url or not.

func LoadConfig added in v0.1.2

func LoadConfig(configFile string) error

func LogConfig added in v0.1.2

func LogConfig()

func ReadConfigFromJsonString added in v0.1.2

func ReadConfigFromJsonString(config *viper.Viper, json string) error

ReadConfigFromJsonString function reads settigs from json string to the config instance. String should contain valid JSON config.

func SetDefaultFromConfig added in v0.1.2

func SetDefaultFromConfig(config *viper.Viper, defaults *viper.Viper)

SetDefaultFromConfig sets all settings from defaults as default values to the config.

func SubWithDefault added in v0.1.2

func SubWithDefault(config *viper.Viper, key string) *viper.Viper

SubWithDefault returns sub-config by keys including configuration defaults values. It returns nil if no such key. It is analog of the viper.Sub() function. This is workaround for the issue https://github.com/spf13/viper/issues/559

func Validate

func Validate() error

func ValidateEmail added in v0.1.5

func ValidateEmail(email string) bool

validates in input URL

func Vip

func Vip() *viper.Viper

func WriteConfig added in v0.1.2

func WriteConfig(configFile string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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