Documentation
¶
Overview ¶
Package config contains the configuration schema and some utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
Logger Logger `yaml:"logger"`
SSE SSE `yaml:"sse"`
RateLimiter RateLimiter `yaml:"rate_limiter"`
}
API configuration.
type Config ¶
type Config struct {
Notifier Notifier `yaml:"notifier"`
DB DB `yaml:"db"`
Lottery Lottery `yaml:"lottery"`
Tor Tor `yaml:"tor"`
Lightning Lightning `yaml:"lightning"`
API API `yaml:"api"`
Server Server `yaml:"server"`
}
Config represents the configuration for the BTRY application.
type DB ¶
type DB struct {
Path string `yaml:"path"`
Logger Logger `yaml:"logger"`
MaxIdleConns int `yaml:"max_idle_conns"`
ConnMaxIdleTime time.Duration `yaml:"conn_max_idle_time"`
}
DB database configuration.
type Lightning ¶
type Lightning struct {
RPCAddress string `yaml:"rpc_address"`
TLSCertPath string `yaml:"tls_cert_path"`
MacaroonPath string `yaml:"macaroon_path"`
Logger Logger `yaml:"logger"`
MaxFeePPM int64 `yaml:"max_fee_ppm"`
}
Lightning configuration.
type Logger ¶
type Logger struct {
Label string `yaml:"label"`
OutFile string `yaml:"out_file"`
Level uint8 `yaml:"level"`
}
Logger configuration.
type Notifier ¶
type Notifier struct {
Telegram Telegram `yaml:"telegram"`
Nostr Nostr `yaml:"nostr"`
Logger Logger `yaml:"logger"`
Enabled bool `yaml:"enabled"`
}
Notifier configuration.
type RateLimiter ¶
RateLimiter configuration.
type Server ¶
type Server struct {
Address string `yaml:"address"`
TLSCertificates []tls.Certificate `yaml:"tls_certificates"`
Logger Logger `yaml:"logger"`
Timeout struct {
Read time.Duration `yaml:"read"`
Write time.Duration `yaml:"write"`
Shutdown time.Duration `yaml:"shutdown"`
Idle time.Duration `yaml:"idle"`
} `yaml:"timeout"`
}
Server configuration.
Click to show internal directories.
Click to hide internal directories.