Versions in this module Expand all Collapse all v1 v1.1.0 Dec 2, 2025 Changes in this version + func ApplyPostgresPoolSettings(db *sql.DB, pool PostgresPoolConfig) + type APIKeyConfig struct + Enabled bool + Keys map[string]string + type ArchivalConfig struct + Enabled bool + RetentionPeriod Duration + RunInterval Duration + type BreakerServiceConfig struct + ConsecutiveFailures uint32 + FailureRatio float64 + Interval Duration + MaxRequests uint32 + MinRequests uint32 + Timeout Duration + type CallbacksConfig struct + Body string + BodyTemplate string + DLQEnabled bool + DLQPath string + Headers map[string]string + PaymentSuccessURL string + Retry RetryConfig + Timeout Duration + type CircuitBreakerConfig struct + Enabled bool + SolanaRPC BreakerServiceConfig + StripeAPI BreakerServiceConfig + Webhook BreakerServiceConfig + type Config struct + APIKey APIKeyConfig + Callbacks CallbacksConfig + CircuitBreaker CircuitBreakerConfig + Coupons CouponConfig + Logging LoggingConfig + Monitoring MonitoringConfig + Paywall PaywallConfig + RateLimit RateLimitConfig + Server ServerConfig + Storage StorageConfig + Stripe StripeConfig + Subscriptions SubscriptionsConfig + X402 X402Config + func Load(path string) (*Config, error) + type Coupon struct + Active bool + AppliesAt string + AutoApply bool + Code string + Currency string + DiscountType string + DiscountValue float64 + ExpiresAt string + Metadata map[string]string + PaymentMethod string + ProductIDs []string + Scope string + StartsAt string + UsageCount int + UsageLimit *int + type CouponConfig struct + CacheTTL Duration + CouponSource string + Coupons map[string]Coupon + MongoDBCollection string + MongoDBDatabase string + MongoDBURL string + PostgresPool PostgresPoolConfig + PostgresTableName string + PostgresURL string + type Duration struct + func (d *Duration) UnmarshalYAML(value *yaml.Node) error + func (d Duration) MarshalYAML() (interface{}, error) + type LoggingConfig struct + Environment string + Format string + Level string + type MonitoringConfig struct + BodyTemplate string + CheckInterval Duration + Headers map[string]string + LowBalanceAlertURL string + LowBalanceThreshold float64 + Timeout Duration + type PaywallConfig struct + MongoDBCollection string + MongoDBDatabase string + MongoDBURL string + PostgresPool PostgresPoolConfig + PostgresTableName string + PostgresURL string + ProductCacheTTL Duration + ProductSource string + QuoteTTL Duration + Resources map[string]PaywallResource + type PaywallResource struct + CryptoAccount string + CryptoAtomicAmount int64 + CryptoToken string + Description string + Extras map[string]any + FiatAmountCents int64 + FiatCurrency string + MemoTemplate string + Metadata map[string]string + ResourceID string + StripePriceID string + Subscription *SubscriptionResourceConfig + type PostgresPoolConfig struct + ConnMaxLifetime Duration + MaxIdleConns int + MaxOpenConns int + type RateLimitConfig struct + GlobalEnabled bool + GlobalLimit int + GlobalWindow Duration + PerIPEnabled bool + PerIPLimit int + PerIPWindow Duration + PerWalletEnabled bool + PerWalletLimit int + PerWalletWindow Duration + type RetryConfig struct + Enabled bool + InitialInterval Duration + MaxAttempts int + MaxInterval Duration + Multiplier float64 + type SchemaMappingConfig struct + AdminNonces TableMappingConfig + CartQuotes TableMappingConfig + Coupons TableMappingConfig + Payments TableMappingConfig + Products TableMappingConfig + RefundQuotes TableMappingConfig + Sessions TableMappingConfig + WebhookQueue TableMappingConfig + type ServerConfig struct + Address string + AdminMetricsAPIKey string + CORSAllowedOrigins []string + IdleTimeout Duration + ReadTimeout Duration + RoutePrefix string + WriteTimeout Duration + type StorageConfig struct + Archival ArchivalConfig + Backend string + CartQuoteTTL Duration + CleanupInterval Duration + FilePath string + MongoDBDatabase string + MongoDBURL string + PostgresPool PostgresPoolConfig + PostgresURL string + RefundQuoteTTL Duration + SchemaMapping SchemaMappingConfig + type StripeConfig struct + CancelURL string + Mode string + PublishableKey string + SecretKey string + SuccessURL string + TaxRateID string + WebhookSecret string + func (s StripeConfig) GetCancelURL() string + func (s StripeConfig) GetSecretKey() string + func (s StripeConfig) GetSuccessURL() string + func (s StripeConfig) GetTaxRateID() string + type SubscriptionResourceConfig struct + AllowX402 bool + BillingInterval int + BillingPeriod string + GracePeriodHours int + StripePriceID string + TrialDays int + type SubscriptionsConfig struct + Backend string + Enabled bool + GracePeriodHours int + PostgresURL string + type TableMappingConfig struct + TableName string + type X402Config struct + AllowedTokens []string + AutoCreateTokenAccount bool + Commitment string + ComputeUnitLimit uint32 + ComputeUnitPriceMicroLamports uint64 + GaslessEnabled bool + MemoPrefix string + Network string + PaymentAddress string + RPCURL string + RoundingMode string + ServerWalletKeys []string + SkipPreflight bool + TokenDecimals uint8 + TokenMint string + TxQueueMaxInFlight int + TxQueueMinTimeBetween Duration + WSURL string