config

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBConfig

func DBConfig() (DSN string)

DBConfig sets the database configuration

func SetupConfig

func SetupConfig() error

SetupConfig configuration

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

type EngineConfiguration struct {
	BaseURL           string
	AccessToken       string
	ThirdwebSecretKey string
}

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

func OrderConfig

func OrderConfig() *OrderConfiguration

OrderConfig sets the order configuration

type RedisConfiguration

type RedisConfiguration struct {
	Host     string
	Port     string
	Password string
	DB       int
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL