configuration

package
v0.0.0-...-4cfaa68 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package configuration is in charge of the validation and extraction of all the configuration details from a configuration file.

Index

Constants

This section is empty.

Variables

This section is empty.

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

func GetData() (*Data, error)

GetData is a wrapper over NewData which reads configuration file path from the environment variable.

func NewData

func NewData() (*Data, error)

NewData creates a configuration reader object using a configurable configuration file path

func (*Data) APIServerInsecureSkipTLSVerify

func (c *Data) APIServerInsecureSkipTLSVerify() bool

APIServerInsecureSkipTLSVerify returns if the server's certificate should be checked for validity. This will make your HTTPS connections insecure.

func (*Data) GetHTTPAddress

func (c *Data) GetHTTPAddress() string

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) GetKeycloakOpenshiftBroker

func (c *Data) GetKeycloakOpenshiftBroker() string

GetKeycloakOpenshiftBroker returns the keyclaok broker name for openshift

func (*Data) GetKeycloakRealm

func (c *Data) GetKeycloakRealm() string

GetKeycloakRealm returns the keyclaok realm name

func (*Data) GetKeycloakURL

func (c *Data) GetKeycloakURL() string

GetKeycloakURL returns Keycloak URL used by default in Dev mode

func (*Data) GetLogLevel

func (c *Data) GetLogLevel() string

GetLogLevel returns the loggging level (as set via config file or environment variable)

func (*Data) GetOpenshiftServiceToken

func (c *Data) GetOpenshiftServiceToken() string

GetOpenshiftServiceToken returns the token be used by matser user for tenant init

func (*Data) GetOpenshiftTenantMasterURL

func (c *Data) GetOpenshiftTenantMasterURL() string

GetOpenshiftTenantMasterURL returns the URL for the openshift cluster where the tenant services are running

func (*Data) GetPostgresConfigString

func (c *Data) GetPostgresConfigString() string

GetPostgresConfigString returns a ready to use string for usage in sql.Open()

func (*Data) GetPostgresConnectionMaxIdle

func (c *Data) GetPostgresConnectionMaxIdle() int

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

func (c *Data) GetPostgresConnectionMaxOpen() int

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

func (c *Data) GetPostgresConnectionRetrySleep() time.Duration

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

func (c *Data) GetPostgresConnectionTimeout() int64

GetPostgresConnectionTimeout returns the postgres connection timeout as set via default, config file, or environment variable

func (*Data) GetPostgresDatabase

func (c *Data) GetPostgresDatabase() string

GetPostgresDatabase returns the postgres database as set via default, config file, or environment variable

func (*Data) GetPostgresHost

func (c *Data) GetPostgresHost() string

GetPostgresHost returns the postgres host as set via default, config file, or environment variable

func (*Data) GetPostgresPassword

func (c *Data) GetPostgresPassword() string

GetPostgresPassword returns the postgres password as set via default, config file, or environment variable

func (*Data) GetPostgresPort

func (c *Data) GetPostgresPort() int64

GetPostgresPort returns the postgres port as set via default, config file, or environment variable

func (*Data) GetPostgresSSLMode

func (c *Data) GetPostgresSSLMode() string

GetPostgresSSLMode returns the postgres sslmode as set via default, config file, or environment variable

func (*Data) GetPostgresUser

func (c *Data) GetPostgresUser() string

GetPostgresUser returns the postgres user as set via default, config file, or environment variable

func (*Data) GetTemplateValues

func (c *Data) GetTemplateValues() (map[string]string, error)

GetTemplateValues return a Map of additional variables used to process the templates

func (*Data) IsDeveloperModeEnabled

func (c *Data) IsDeveloperModeEnabled() bool

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

func (c *Data) IsLogJSON() bool

IsLogJSON returns if we should log json format (as set via config file or environment variable)

func (*Data) String

func (c *Data) String() string

String returns the current configuration as a string

func (*Data) UseOpenshiftCurrentCluster

func (c *Data) UseOpenshiftCurrentCluster() bool

UseOpenshiftCurrentCluster returns if we should use the current cluster to provision tenant service

Jump to

Keyboard shortcuts

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