Documentation
¶
Index ¶
Constants ¶
View Source
const PeersPrefix = "mpc_peers/"
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
func InitLogger()
func InitViperConfig ¶
func InitViperConfig()
Types ¶
type AppConfig ¶
type AppConfig struct {
Consul *ConsulConfig `mapstructure:"consul"`
NATs *NATsConfig `mapstructure:"nats"`
R2 *R2Config `mapstructure:"r2"`
Environment string `mapstructure:"environment"`
BadgerPassword string `mapstructure:"badger_password"`
BadgerBackupPassword string `mapstructure:"badger_backup_password"`
ConsulBackupPassword string `mapstructure:"consul_backup_password"`
ChainCodeHex string `mapstructure:"chain_code"`
}
func LoadConfig ¶
func LoadConfig() *AppConfig
func (AppConfig) MarshalJSONMask ¶
Implement masking serializer AppConfig
type ConsulConfig ¶
type ConsulConfig struct {
Address string `mapstructure:"address"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Token string `mapstructure:"token"`
TLS *ConsulTLSConfig `mapstructure:"tls"`
}
type ConsulTLSConfig ¶
type NATsConfig ¶
type Peer ¶
func LoadPeersFromFile ¶
LoadPeersFromFile loads peers from a JSON file (map[string]string: name -> ID)
type R2Config ¶
type R2Config struct {
AccountID string `mapstructure:"account_id"`
AccessKeyID string `mapstructure:"access_key_id"`
SecretAccessKey string `mapstructure:"secret_access_key"`
Bucket string `mapstructure:"bucket"`
Prefix string `mapstructure:"prefix"`
}
R2Config holds Cloudflare R2 credentials for off-site backup uploads. Set via env vars: R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET, R2_PREFIX (optional).
Click to show internal directories.
Click to hide internal directories.