Documentation ¶
Index ¶
- Constants
- func GetBigInt(key string) *big.Int
- func GetBigIntFromViper(config *viper.Viper, key string) (value *big.Int, err error)
- func GetBool(key string) bool
- func GetBuildTime() string
- func GetDuration(key string) time.Duration
- func GetInt(key string) int
- func GetSha1Revision() string
- func GetString(key string) string
- func GetVersionTag() string
- func IsValidUrl(urlToTest string) bool
- func LoadConfig(configFile string) error
- func LogConfig()
- func ReadConfigFromJsonString(config *viper.Viper, json string) error
- func SetDefaultFromConfig(config *viper.Viper, defaults *viper.Viper)
- func SubWithDefault(config *viper.Viper, key string) *viper.Viper
- func Validate() error
- func ValidateEmail(email string) bool
- func Vip() *viper.Viper
- func WriteConfig(configFile string) error
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 GetBigIntFromViper ¶ added in v0.1.2
func GetBuildTime ¶ added in v0.1.9
func GetBuildTime() string
func GetDuration ¶
func GetSha1Revision ¶ added in v0.1.9
func GetSha1Revision() string
func GetVersionTag ¶ added in v0.1.9
func GetVersionTag() string
func IsValidUrl ¶ added in v0.1.5
isValidUrl tests a string to determine if it is a url or not.
func LoadConfig ¶ added in v0.1.2
func ReadConfigFromJsonString ¶ added in v0.1.2
ReadConfigFromJsonString function reads settigs from json string to the config instance. String should contain valid JSON config.
func SetDefaultFromConfig ¶ added in v0.1.2
SetDefaultFromConfig sets all settings from defaults as default values to the config.
func SubWithDefault ¶ added in v0.1.2
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 WriteConfig ¶ added in v0.1.2
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.