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 GetDuration(key string) time.Duration
- func GetInt(key string) int
- func GetString(key string) string
- 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 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" ConfigPathKey = "CONFIG_PATH" DaemonListeningPortKey = "DAEMON_LISTENING_PORT" DaemonTypeKey = "DAEMON_TYPE" DaemonEndPoint = "DAEMON_END_POINT" DbPathKey = "DB_PATH" EthereumJsonRpcEndpointKey = "ETHEREUM_JSON_RPC_ENDPOINT" ExecutablePathKey = "EXECUTABLE_PATH" HdwalletIndexKey = "HDWALLET_INDEX" HdwalletMnemonicKey = "HDWALLET_MNEMONIC" IpfsEndPoint = "IPFS_END_POINT" LogKey = "LOG" OrganizationName = "ORGANIZATION_NAME" ServiceName = "SERVICE_NAME" PassthroughEnabledKey = "PASSTHROUGH_ENABLED" PassthroughEndpointKey = "PASSTHROUGH_ENDPOINT" PollSleepKey = "POLL_SLEEP" PrivateKeyKey = "PRIVATE_KEY" ServiceTypeKey = "SERVICE_TYPE" SSLCertPathKey = "SSL_CERT" SSLKeyPathKey = "SSL_KEY" WireEncodingKey = "WIRE_ENCODING" PaymentChannelStorageTypeKey = "PAYMENT_CHANNEL_STORAGE_TYPE" PaymentChannelStorageClientKey = "PAYMENT_CHANNEL_STORAGE_CLIENT" PaymentChannelStorageServerKey = "PAYMENT_CHANNEL_STORAGE_SERVER" )
Variables ¶
This section is empty.
Functions ¶
func GetBigIntFromViper ¶ added in v0.1.2
func GetDuration ¶
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.