configuration

package
v0.0.0-...-df2fae3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2017 License: Apache-2.0 Imports: 5 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) 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) 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) GetMadrillAPIKey

func (c *Data) GetMadrillAPIKey() string

GetMadrillAPIKey returns the API key used by the email sender

func (*Data) GetWITURL

func (c *Data) GetWITURL() string

GetWITURL return the base WorkItemTracker API URL

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

func (c *Data) Validate() error

Jump to

Keyboard shortcuts

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