Documentation ¶
Overview ¶
Package configuration is in charge of the validation and extraction of all the configuration details from a configuration file or environment variables.
Index ¶
- Constants
- Variables
- func IsTestingMode() bool
- func Namespace() string
- type AnalyticsConfig
- type AuthConfig
- type RegistrationServiceConfig
- func (r RegistrationServiceConfig) Analytics() AnalyticsConfig
- func (r RegistrationServiceConfig) Auth() AuthConfig
- func (r RegistrationServiceConfig) Environment() string
- func (r RegistrationServiceConfig) IsProdEnvironment() bool
- func (r RegistrationServiceConfig) LogLevel() string
- func (r RegistrationServiceConfig) Print()
- func (r RegistrationServiceConfig) RegistrationServiceURL() string
- func (r RegistrationServiceConfig) Verification() VerificationConfig
- type VerificationConfig
- func (r VerificationConfig) AWSAccessKeyID() string
- func (r VerificationConfig) AWSRegion() string
- func (r VerificationConfig) AWSSMSType() string
- func (r VerificationConfig) AWSSecretAccessKey() string
- func (r VerificationConfig) AWSSenderID() string
- func (r VerificationConfig) AttemptsAllowed() int
- func (r VerificationConfig) CaptchaAllowLowScoreReactivation() bool
- func (r VerificationConfig) CaptchaEnabled() bool
- func (r VerificationConfig) CaptchaProjectID() string
- func (r VerificationConfig) CaptchaRequiredScore() float32
- func (r VerificationConfig) CaptchaScoreThreshold() float32
- func (r VerificationConfig) CaptchaServiceAccountFileContents() string
- func (r VerificationConfig) CaptchaSiteKey() string
- func (r VerificationConfig) CodeExpiresInMin() int
- func (r VerificationConfig) DailyLimit() int
- func (r VerificationConfig) Enabled() bool
- func (r VerificationConfig) ExcludedEmailDomains() []string
- func (r VerificationConfig) MessageTemplate() string
- func (r VerificationConfig) NotificationSender() string
- func (r VerificationConfig) TwilioAccountSID() string
- func (r VerificationConfig) TwilioAuthToken() string
- func (r VerificationConfig) TwilioFromNumber() string
- func (r VerificationConfig) TwilioSenderConfigs() []toolchainv1alpha1.TwilioSenderConfig
Constants ¶
View Source
const ( GracefulTimeout = time.Second * 15 HTTPAddress = "0.0.0.0:8080" HTTPCompressResponses = true HTTPIdleTimeout = time.Second * 60 HTTPReadTimeout = time.Second * 60 HTTPWriteTimeout = time.Second * 60 DefaultEnvironment = prodEnvironment UnitTestsEnvironment = "unit-tests" )
View Source
const ( CaptchaFileName = "captcha.json" CaptchaFilePath = "/tmp/" + CaptchaFileName )
captcha specific configuration
Variables ¶
View Source
var ( // Commit current build commit set by build script. Commit = "0" // BuildTime set by build script in ISO 8601 (UTC) format: // YYYY-MM-DDThh:mm:ssTZD (see https://www.w3.org/TR/NOTE-datetime for // details). BuildTime = "0" // StartTime in ISO 8601 (UTC) format. StartTime = time.Now().UTC().Format("2006-01-02T15:04:05Z") )
Functions ¶
func IsTestingMode ¶
func IsTestingMode() bool
Types ¶
type AnalyticsConfig ¶
type AnalyticsConfig struct {
// contains filtered or unexported fields
}
func (AnalyticsConfig) DevSpacesSegmentWriteKey ¶
func (r AnalyticsConfig) DevSpacesSegmentWriteKey() string
func (AnalyticsConfig) SegmentWriteKey ¶
func (r AnalyticsConfig) SegmentWriteKey() string
type AuthConfig ¶
type AuthConfig struct {
// contains filtered or unexported fields
}
func (AuthConfig) AuthClientConfigContentType ¶
func (r AuthConfig) AuthClientConfigContentType() string
func (AuthConfig) AuthClientConfigRaw ¶
func (r AuthConfig) AuthClientConfigRaw() string
func (AuthConfig) AuthClientLibraryURL ¶
func (r AuthConfig) AuthClientLibraryURL() string
func (AuthConfig) AuthClientPublicKeysURL ¶
func (r AuthConfig) AuthClientPublicKeysURL() string
func (AuthConfig) SSOBaseURL ¶
func (r AuthConfig) SSOBaseURL() string
func (AuthConfig) SSORealm ¶
func (r AuthConfig) SSORealm() string
type RegistrationServiceConfig ¶
type RegistrationServiceConfig struct {
// contains filtered or unexported fields
}
func ForceLoadRegistrationServiceConfig ¶
func ForceLoadRegistrationServiceConfig(cl client.Client) (RegistrationServiceConfig, error)
ForceLoadRegistrationServiceConfig updates the cache using the provided client and returns the latest RegistrationServiceConfig
func GetRegistrationServiceConfig ¶
func GetRegistrationServiceConfig() RegistrationServiceConfig
GetRegistrationServiceConfig returns a RegistrationServiceConfig using the cache, or if the cache was not initialized then retrieves the latest config using the provided client and updates the cache
func (RegistrationServiceConfig) Analytics ¶
func (r RegistrationServiceConfig) Analytics() AnalyticsConfig
func (RegistrationServiceConfig) Auth ¶
func (r RegistrationServiceConfig) Auth() AuthConfig
func (RegistrationServiceConfig) Environment ¶
func (r RegistrationServiceConfig) Environment() string
func (RegistrationServiceConfig) IsProdEnvironment ¶
func (r RegistrationServiceConfig) IsProdEnvironment() bool
func (RegistrationServiceConfig) LogLevel ¶
func (r RegistrationServiceConfig) LogLevel() string
func (RegistrationServiceConfig) Print ¶
func (r RegistrationServiceConfig) Print()
func (RegistrationServiceConfig) RegistrationServiceURL ¶
func (r RegistrationServiceConfig) RegistrationServiceURL() string
func (RegistrationServiceConfig) Verification ¶
func (r RegistrationServiceConfig) Verification() VerificationConfig
type VerificationConfig ¶
type VerificationConfig struct {
// contains filtered or unexported fields
}
func (VerificationConfig) AWSAccessKeyID ¶
func (r VerificationConfig) AWSAccessKeyID() string
func (VerificationConfig) AWSRegion ¶
func (r VerificationConfig) AWSRegion() string
func (VerificationConfig) AWSSMSType ¶
func (r VerificationConfig) AWSSMSType() string
func (VerificationConfig) AWSSecretAccessKey ¶
func (r VerificationConfig) AWSSecretAccessKey() string
func (VerificationConfig) AWSSenderID ¶
func (r VerificationConfig) AWSSenderID() string
func (VerificationConfig) AttemptsAllowed ¶
func (r VerificationConfig) AttemptsAllowed() int
func (VerificationConfig) CaptchaAllowLowScoreReactivation ¶
func (r VerificationConfig) CaptchaAllowLowScoreReactivation() bool
func (VerificationConfig) CaptchaEnabled ¶
func (r VerificationConfig) CaptchaEnabled() bool
func (VerificationConfig) CaptchaProjectID ¶
func (r VerificationConfig) CaptchaProjectID() string
func (VerificationConfig) CaptchaRequiredScore ¶
func (r VerificationConfig) CaptchaRequiredScore() float32
func (VerificationConfig) CaptchaScoreThreshold ¶
func (r VerificationConfig) CaptchaScoreThreshold() float32
func (VerificationConfig) CaptchaServiceAccountFileContents ¶
func (r VerificationConfig) CaptchaServiceAccountFileContents() string
func (VerificationConfig) CaptchaSiteKey ¶
func (r VerificationConfig) CaptchaSiteKey() string
func (VerificationConfig) CodeExpiresInMin ¶
func (r VerificationConfig) CodeExpiresInMin() int
func (VerificationConfig) DailyLimit ¶
func (r VerificationConfig) DailyLimit() int
func (VerificationConfig) Enabled ¶
func (r VerificationConfig) Enabled() bool
func (VerificationConfig) ExcludedEmailDomains ¶
func (r VerificationConfig) ExcludedEmailDomains() []string
func (VerificationConfig) MessageTemplate ¶
func (r VerificationConfig) MessageTemplate() string
func (VerificationConfig) NotificationSender ¶
func (r VerificationConfig) NotificationSender() string
func (VerificationConfig) TwilioAccountSID ¶
func (r VerificationConfig) TwilioAccountSID() string
func (VerificationConfig) TwilioAuthToken ¶
func (r VerificationConfig) TwilioAuthToken() string
func (VerificationConfig) TwilioFromNumber ¶
func (r VerificationConfig) TwilioFromNumber() string
func (VerificationConfig) TwilioSenderConfigs ¶
func (r VerificationConfig) TwilioSenderConfigs() []toolchainv1alpha1.TwilioSenderConfig
Click to show internal directories.
Click to hide internal directories.