Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Name string `envconfig:"RVASP_NAME"`
BindAddr string `envconfig:"RVASP_BIND_ADDR" default:":4434"`
TRISABindAddr string `envconfig:"RVASP_TRISA_BIND_ADDR" default:":4435"`
FixturesPath string `envconfig:"RVASP_FIXTURES_PATH"`
CertPath string `envconfig:"RVASP_CERT_PATH"`
TrustChainPath string `envconfig:"RVASP_TRUST_CHAIN_PATH"`
AsyncInterval time.Duration `envconfig:"RVASP_ASYNC_INTERVAL" default:"1m"`
AsyncNotBefore time.Duration `envconfig:"RVASP_ASYNC_NOT_BEFORE" default:"5m"`
AsyncNotAfter time.Duration `envconfig:"RVASP_ASYNC_NOT_AFTER" default:"1h"`
ConsoleLog bool `envconfig:"RVASP_CONSOLE_LOG" default:"false"`
LogLevel LogLevelDecoder `envconfig:"RVASP_LOG_LEVEL" default:"info"`
GDS GDSConfig
Database DatabaseConfig
Activity activity.Config
}
Config uses envconfig to load required settings from the environment and validate them in preparation for running the rVASP.
TODO: also store separate signing key instead of using the cert key.
type DatabaseConfig ¶
type DatabaseConfig struct {
DSN string `split_words:"true"`
MaxRetries int `split_words:"true" default:"0"`
}
DatabaseConfig is the configuration for connecting to the RVASP database
type GDSConfig ¶
type GDSConfig struct {
URL string `split_words:"true" default:"api.testnet.directory:443"`
Insecure bool `split_words:"true" default:"false"`
}
GDSConfig is the configuration for connecting to GDS
type LogLevelDecoder ¶
LogLevelDecoder deserializes the log level from a config string.
func (*LogLevelDecoder) Decode ¶
func (ll *LogLevelDecoder) Decode(value string) error
Decode implements envconfig.Decoder
Click to show internal directories.
Click to hide internal directories.