Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Port string `mapstructure:"PORT"`
Env string `mapstructure:"ENV"`
JWTSecret string `mapstructure:"JWT_SECRET"`
JWTTokenDuration time.Duration `mapstructure:"JWT_TOKEN_DURATION"`
JWTRefreshTokenDuration time.Duration `mapstructure:"JWT_REFRESH_TOKEN_DURATION"`
MagicLinkTokenDuration time.Duration `mapstructure:"MAGIC_LINK_TOKEN_DURATION"`
DatabaseURL string `mapstructure:"DATABASE_URL"`
DatabaseLogLevel string `mapstructure:"DATABASE_LOG_LEVEL"`
DatabaseMaxIdleConns int `mapstructure:"DATABASE_MAX_IDLE_CONNS"`
DatabaseMaxOpenConns int `mapstructure:"DATABASE_MAX_OPEN_CONNS"`
DatabaseConnMaxLifetime time.Duration `mapstructure:"DATABASE_CONN_MAX_LIFETIME"`
AppBaseURL string `mapstructure:"APP_BASE_URL"`
FreeNoteLimit int `mapstructure:"FREE_NOTE_LIMIT"`
RateLimitPerMinute int `mapstructure:"RATE_LIMIT_PER_MINUTE"`
RateLimitBurst int `mapstructure:"RATE_LIMIT_BURST"`
ResendAPIKey string `mapstructure:"RESEND_API_KEY"`
EmailFrom string `mapstructure:"EMAIL_FROM"`
// Billing / Stripe. All fields are optional unless BillingEnabled is true,
// in which case Validate() requires the Stripe secrets and the Resend key.
BillingEnabled bool `mapstructure:"BILLING_ENABLED"`
StripeSecretKey string `mapstructure:"STRIPE_SECRET_KEY"`
StripeWebhookSecret string `mapstructure:"STRIPE_WEBHOOK_SECRET"`
StripePriceID string `mapstructure:"STRIPE_PRICE_ID"`
StripeSuccessURL string `mapstructure:"STRIPE_SUCCESS_URL"`
StripeCancelURL string `mapstructure:"STRIPE_CANCEL_URL"`
}
func (*Config) IsDevelopment ¶
Click to show internal directories.
Click to hide internal directories.