Documentation
¶
Index ¶
- func DBConfig() (DSN string)
- func SetupConfig() error
- type AuthConfiguration
- type Configuration
- type CryptoConfiguration
- type DatabaseConfiguration
- type EngineConfiguration
- type EtherscanConfiguration
- type IdentityConfiguration
- type NotificationConfiguration
- type OrderConfiguration
- type RedisConfiguration
- type ServerConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthConfiguration ¶
type AuthConfiguration struct {
Secret string
JwtAccessLifespan time.Duration
JwtRefreshLifespan time.Duration
HmacTimestampAge time.Duration
PasswordResetLifespan time.Duration
// Slack config
SlackSigningSecret string
SlackBotToken string
// Turnstile config
TurnstileSiteKey string
TurnstileSecretKey string
TurnstileEnabled bool
}
AuthConfiguration defines the authentication & authorization settings
func AuthConfig ¶
func AuthConfig() (config *AuthConfiguration)
AuthConfig sets the authentication & authorization configurations
type Configuration ¶
type Configuration struct {
Server ServerConfiguration
Database DatabaseConfiguration
Auth AuthConfiguration
Order OrderConfiguration
Notification NotificationConfiguration
Engine EngineConfiguration
Etherscan EtherscanConfiguration
}
Configuration type
type CryptoConfiguration ¶
type CryptoConfiguration struct {
HDWalletMnemonic string
AggregatorPublicKey string
AggregatorPrivateKey string
AggregatorSmartAccount string
}
CryptoConfiguration type defines crypto configurations
func CryptoConfig ¶
func CryptoConfig() *CryptoConfiguration
CryptoConfig sets the crypto configuration
type DatabaseConfiguration ¶
type DatabaseConfiguration struct {
Driver string
Dbname string
Username string
Password string
Host string
Port string
LogMode bool
}
DatabaseConfiguration type defines the server configurations
type EngineConfiguration ¶
EngineConfiguration holds the configuration for Engine integration
func EngineConfig ¶
func EngineConfig() *EngineConfiguration
EngineConfig returns the Engine configuration
type EtherscanConfiguration ¶
type EtherscanConfiguration struct {
ApiKey string
}
EtherscanConfiguration holds the configuration for Etherscan API integration
func EtherscanConfig ¶
func EtherscanConfig() *EtherscanConfiguration
EtherscanConfig returns the Etherscan configuration
type IdentityConfiguration ¶
type IdentityConfiguration struct {
SmileIdentityBaseUrl string
SmileIdentityPartnerId string
SmileIdentityApiKey string
PrivyAppID string
PrivyVerificationKey string
}
IdentityConfiguration defines the identity provider configurations
func IdentityConfig ¶
func IdentityConfig() (config *IdentityConfiguration)
IdentityConfig sets the identity provider configurations
type NotificationConfiguration ¶
type NotificationConfiguration struct {
EmailDomain string
EmailAPIKey string
EmailFromAddress string
EmailProvider string
}
NotificationConfiguration defines the email service configurations
func NotificationConfig ¶
func NotificationConfig() (config *NotificationConfiguration)
NotificationConfig sets the email configurations
type OrderConfiguration ¶
type OrderConfiguration struct {
OrderFulfillmentValidity time.Duration
OrderRefundTimeout time.Duration
ReceiveAddressValidity time.Duration
OrderRequestValidity time.Duration
TronProApiKey string
EntryPointContractAddress common.Address
BucketQueueRebuildInterval int
RefundCancellationCount int
PercentDeviationFromExternalRate decimal.Decimal
PercentDeviationFromMarketRate decimal.Decimal
IndexingDuration time.Duration
}
OrderConfiguration type defines payment order configurations
type RedisConfiguration ¶
RedisConfiguration type defines the Redis configurations
func RedisConfig ¶
func RedisConfig() RedisConfiguration
RedisConfig retrieves the Redis configuration
type ServerConfiguration ¶
type ServerConfiguration struct {
Debug bool
Host string
Port string
Timezone string
AllowedHosts string
Environment string
SentryDSN string
ServerURL string
RateLimitUnauthenticated int
RateLimitAuthenticated int
SlackWebhookURL string
}
ServerConfiguration type defines the server configurations
func ServerConfig ¶
func ServerConfig() *ServerConfiguration
ServerConfig sets the server configuration