configuration

package
v0.0.0-...-81e1ae8 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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

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

func Namespace

func Namespace() string

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 NewRegistrationServiceConfig

func NewRegistrationServiceConfig(config runtime.Object, secrets map[string]map[string]string) RegistrationServiceConfig

func (RegistrationServiceConfig) Analytics

func (RegistrationServiceConfig) Auth

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

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

Jump to

Keyboard shortcuts

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