Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ServerPort string `env:"SERVER_PORT" env-default:"8080" env-description:"HTTP server port"`
OwnerPrivateKey string `env:"OWNER_PRIVATE_KEY" env-required:"true" env-description:"Private key for faucet owner wallet (without 0x prefix)"`
NitronodeURL string `env:"NITRONODE_URL" env-required:"true" env-description:"Nitronode WebSocket URL"`
TokenSymbol string `env:"TOKEN_SYMBOL" env-required:"true" env-description:"Token symbol to distribute (e.g., usdc, weth)"`
StandardTipAmount string `env:"STANDARD_TIP_AMOUNT" env-required:"true" env-description:"Default amount to send per request"`
MinTransferCount int `` /* 128-byte string literal not displayed */
CooldownPeriod string `env:"COOLDOWN_PERIOD" env-default:"24h" env-description:"Cooldown between requests per wallet/IP (e.g. 24h, 1h30m)"`
// IPRateLimitEnabled toggles the per-IP bucket. With ingress-level
// limits (limit-rps, limit-connections) handling flood protection, the
// per-IP app cooldown becomes redundant — and worse, collapses to a
// single bucket whenever TRUSTED_PROXIES is unset, since gin's
// ClientIP() then returns the ingress pod's address for every request.
IPRateLimitEnabled bool `` /* 165-byte string literal not displayed */
TrustedProxies string `env:"TRUSTED_PROXIES" env-default:"" env-description:"Comma-separated trusted proxy IPs; empty means direct exposure only"`
// Log carries LOG_LEVEL / LOG_FORMAT / LOG_OUTPUT (see pkg/log).
Log log.Config
// Parsed values (set after loading)
StandardTipAmountDecimal decimal.Decimal
CooldownPeriodDuration time.Duration
TrustedProxyList []string
}
Config holds all runtime configuration for the faucet server.
Click to show internal directories.
Click to hide internal directories.