Documentation
¶
Overview ¶
Package config contains the configuration for the application. This layer is responsible for loading the configuration from the environment variables and validating it.
Index ¶
- type Challenge
- type Config
- type IDLimiter
- type IPLimiter
- type Idenfy
- func (c *Idenfy) GetAPIKey() string
- func (c *Idenfy) GetAPISecret() string
- func (c *Idenfy) GetBaseURL() string
- func (c *Idenfy) GetCallbackSignKey() string
- func (c *Idenfy) GetCallbackUrl() string
- func (c *Idenfy) GetDevMode() bool
- func (c *Idenfy) GetNamespace() string
- func (c *Idenfy) GetWhitelistedIPs() []string
- type Log
- type MongoDB
- type Server
- type TFChain
- type Verification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MongoDB MongoDB Server Server Idenfy Idenfy TFChain TFChain Verification Verification IPLimiter IPLimiter IDLimiter IDLimiter Challenge Challenge Log Log }
func LoadConfigFromEnv ¶
func (Config) GetPublicConfig ¶
type Idenfy ¶
type Idenfy struct { APIKey string `env:"IDENFY_API_KEY" env-required:"true"` APISecret string `env:"IDENFY_API_SECRET" env-required:"true"` BaseURL string `env:"IDENFY_BASE_URL" env-default:"https://ivs.idenfy.com"` CallbackSignKey string `env:"IDENFY_CALLBACK_SIGN_KEY" env-required:"true"` WhitelistedIPs []string `env:"IDENFY_WHITELISTED_IPS" env-separator:","` DevMode bool `env:"IDENFY_DEV_MODE" env-default:"false"` CallbackUrl string `env:"IDENFY_CALLBACK_URL" env-required:"false"` Namespace string `env:"IDENFY_NAMESPACE" env-default:""` }
func (*Idenfy) GetAPISecret ¶
func (*Idenfy) GetBaseURL ¶
func (*Idenfy) GetCallbackSignKey ¶
func (*Idenfy) GetCallbackUrl ¶
implement getter for Idenfy
func (*Idenfy) GetDevMode ¶
func (*Idenfy) GetNamespace ¶
func (*Idenfy) GetWhitelistedIPs ¶
type TFChain ¶
type TFChain struct {
WsProviderURL []string `env:"TFCHAIN_WS_PROVIDER_URL" env-default:"wss://tfchain.grid.tf" env-separator:","`
}
func (*TFChain) GetWsProviderURL ¶
implement getter for TFChain
type Verification ¶
type Verification struct { SuspiciousVerificationOutcome string `env:"VERIFICATION_SUSPICIOUS_VERIFICATION_OUTCOME" env-default:"APPROVED"` ExpiredDocumentOutcome string `env:"VERIFICATION_EXPIRED_DOCUMENT_OUTCOME" env-default:"REJECTED"` MinBalanceToVerifyAccount uint64 `env:"VERIFICATION_MIN_BALANCE_TO_VERIFY_ACCOUNT" env-default:"10000000"` AlwaysVerifiedIDs []string `env:"VERIFICATION_ALWAYS_VERIFIED_IDS" env-separator:","` AlwaysVerifiedIDsOnly bool `env:"VERIFICATION_ALWAYS_VERIFIED_IDS_ONLY" env-default:"false"` }
Click to show internal directories.
Click to hide internal directories.