Documentation ¶
Overview ¶
Package configuration is in charge of the validation and extraction of all the configuration details from a configuration file.
Index ¶
- type Data
- func (c *Data) GetHTTPAddress() string
- func (c *Data) GetKeycloakRealm() string
- func (c *Data) GetKeycloakURL() string
- func (c *Data) GetLogLevel() string
- func (c *Data) GetMadrillAPIKey() string
- func (c *Data) GetWITURL() string
- func (c *Data) IsDeveloperModeEnabled() bool
- func (c *Data) IsLogJSON() bool
- func (c *Data) String() string
- func (c *Data) Validate() error
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 ¶
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) 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) GetKeycloakRealm ¶
GetKeycloakRealm returns the keyclaok 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) GetMadrillAPIKey ¶
GetMadrillAPIKey returns the API key used by the email sender
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)