Documentation ¶
Overview ¶
Package configuration is in charge of the validation and extraction of all the configuration details from a configuration file.
Index ¶
- Variables
- type Data
- func (c *Data) APIServerInsecureSkipTLSVerify() bool
- func (c *Data) APIServerUseTLS() bool
- func (c *Data) GetAuthClientID() string
- func (c *Data) GetAuthGrantType() string
- func (c *Data) GetAuthURL() string
- func (c *Data) GetAutomatedUpdateRetrySleep() time.Duration
- func (c *Data) GetAutomatedUpdateTimeGap() time.Duration
- func (c *Data) GetClientSecret() string
- func (c *Data) GetClustersRefreshDelay() time.Duration
- func (c *Data) GetConsoleURL() string
- func (c *Data) GetEnvironment() string
- func (c *Data) GetHTTPAddress() string
- func (c *Data) GetKeycloakClientID() string
- func (c *Data) GetKeycloakOpenshiftBroker() string
- func (c *Data) GetKeycloakRealm() string
- func (c *Data) GetKeycloakURL() string
- func (c *Data) GetLogLevel() string
- func (c *Data) GetMetricsHTTPAddress() string
- func (c *Data) GetPostgresConfigString() string
- func (c *Data) GetPostgresConnectionMaxIdle() int
- func (c *Data) GetPostgresConnectionMaxOpen() int
- func (c *Data) GetPostgresConnectionRetrySleep() time.Duration
- func (c *Data) GetPostgresConnectionTimeout() int64
- func (c *Data) GetPostgresDatabase() string
- func (c *Data) GetPostgresHost() string
- func (c *Data) GetPostgresPassword() string
- func (c *Data) GetPostgresPort() int64
- func (c *Data) GetPostgresSSLMode() string
- func (c *Data) GetPostgresUser() string
- func (c *Data) GetSentryDSN() string
- func (c *Data) GetTemplateValues() (map[string]string, error)
- func (c *Data) GetTogglesURL() string
- func (c *Data) GetTokenKey() string
- func (c *Data) IsAutomatedUpdateEnabled() bool
- func (c *Data) IsDeveloperModeEnabled() bool
- func (c *Data) IsLogJSON() bool
- func (c *Data) String() string
- func (c *Data) UseOpenshiftCurrentCluster() bool
- type HTTPClientOption
Constants ¶
This section is empty.
Variables ¶
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 ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data encapsulates the Viper configuration object which stores the configuration data in-memory.
func GetData ¶
GetData is a wrapper over NewData which reads configuration file path from the environment variable.
func NewData ¶
NewData creates a configuration reader object using a configurable configuration file path
func (*Data) APIServerInsecureSkipTLSVerify ¶
APIServerInsecureSkipTLSVerify returns if the server's certificate should be checked for validity. This will make your HTTPS connections insecure.
func (*Data) APIServerUseTLS ¶
APIServerUseTLS returns if the server uses secured HTTPS connections.
func (*Data) GetAuthClientID ¶
GetAuthClientID returns the tenant's client id used while communicating with fabric8-auth
func (*Data) GetAuthGrantType ¶
GetAuthGrantType returns the fabric8-auth Grant type used while retrieving user account token
func (*Data) GetAutomatedUpdateRetrySleep ¶
GetAutomatedUpdateRetrySleep returns the duration the automated update should wait to detect if there is some other ongoing update
func (*Data) GetAutomatedUpdateTimeGap ¶
GetAutomatedUpdateTimeGap returns the duration the automated update should wait after single tenant update
func (*Data) GetClientSecret ¶
GetClientSecret returns the secret which will be used in conjunction with the tenant client id
func (*Data) GetClustersRefreshDelay ¶
GetClustersRefreshDelay returns delay of clusters refresh (in minutes)
func (*Data) GetConsoleURL ¶
GetConsoleURL returns the fabric8-ui Console URL
func (*Data) GetEnvironment ¶
GetEnvironment returns the current environment application is deployed in like 'prod', 'preview', 'local', etc as the value of environment variable `F8_ENVIRONMENT` is set.
func (*Data) GetHTTPAddress ¶
GetHTTPAddress returns the HTTP address (as set via default, config file, or environment variable) that the alm server binds to (e.g. "0.0.0.0:8080")
func (*Data) GetKeycloakClientID ¶
GetKeycloakClientID returns the keycloak client id (mostly for Che)
func (*Data) GetKeycloakOpenshiftBroker ¶
GetKeycloakOpenshiftBroker returns the keycloak broker name for openshift
func (*Data) GetKeycloakRealm ¶
GetKeycloakRealm returns the keycloak realm name
func (*Data) GetKeycloakURL ¶
GetKeycloakURL returns Keycloak URL used by default in Dev mode
func (*Data) GetLogLevel ¶
GetLogLevel returns the loggging level (as set via config file or environment variable)
func (*Data) GetMetricsHTTPAddress ¶
GetMetricsHTTPAddress returns the address the /metrics endpoing will be mounted. By default GetMetricsHTTPAddress is the same as GetHTTPAddress
func (*Data) GetPostgresConfigString ¶
GetPostgresConfigString returns a ready to use string for usage in sql.Open()
func (*Data) GetPostgresConnectionMaxIdle ¶
GetPostgresConnectionMaxIdle returns the number of connections that should be keept alive in the database connection pool at any given time. -1 represents no restrictions/default behavior
func (*Data) GetPostgresConnectionMaxOpen ¶
GetPostgresConnectionMaxOpen returns the max number of open connections that should be open in the database connection pool. -1 represents no restrictions/default behavior
func (*Data) GetPostgresConnectionRetrySleep ¶
GetPostgresConnectionRetrySleep returns the number of seconds (as set via default, config file, or environment variable) to wait before trying to connect again
func (*Data) GetPostgresConnectionTimeout ¶
GetPostgresConnectionTimeout returns the postgres connection timeout as set via default, config file, or environment variable
func (*Data) GetPostgresDatabase ¶
GetPostgresDatabase returns the postgres database as set via default, config file, or environment variable
func (*Data) GetPostgresHost ¶
GetPostgresHost returns the postgres host as set via default, config file, or environment variable
func (*Data) GetPostgresPassword ¶
GetPostgresPassword returns the postgres password as set via default, config file, or environment variable
func (*Data) GetPostgresPort ¶
GetPostgresPort returns the postgres port as set via default, config file, or environment variable
func (*Data) GetPostgresSSLMode ¶
GetPostgresSSLMode returns the postgres sslmode as set via default, config file, or environment variable
func (*Data) GetPostgresUser ¶
GetPostgresUser returns the postgres user as set via default, config file, or environment variable
func (*Data) GetSentryDSN ¶
GetSentryDSN returns the secret needed to securely communicate with https://errortracking.prod-preview.openshift.io/openshift_io/fabric8-tenant/
func (*Data) GetTemplateValues ¶
GetTemplateValues return a Map of additional variables used to process the templates
func (*Data) GetTogglesURL ¶
GetTogglesURL returns Toggle service URL
func (*Data) GetTokenKey ¶
GetTokenKey returns the encryption key/passphrase which will be used to decrypt the cluster tokens stored in auth token mgm
func (*Data) IsAutomatedUpdateEnabled ¶
IsAutomatedUpdateEnabled returns if the automated update is enabled
func (*Data) IsDeveloperModeEnabled ¶
IsDeveloperModeEnabled returns if development related features (as set via default, config file, or environment variable), e.g. token generation endpoint are enabled
func (*Data) IsLogJSON ¶
IsLogJSON returns if we should log json format (as set via config file or environment variable)
func (*Data) UseOpenshiftCurrentCluster ¶
UseOpenshiftCurrentCluster returns if we should use the current cluster to provision tenant service
type HTTPClientOption ¶
HTTPClientOption options passed to the HTTP Client
func WithRoundTripper ¶
func WithRoundTripper(r http.RoundTripper) HTTPClientOption
WithRoundTripper configures the client's transport with the given round-tripper