configuration

package
v0.0.0-...-e98f407 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DevModeRsaPrivateKey for signing JWT Tokens in Dev Mode
	// ssh-keygen -f alm_rsa
	DevModeRsaPrivateKey = `` /* 1678-byte string literal not displayed */

)

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

func (c *Data) GetAuthServiceURL() string

GetAuthServiceURL returns the Auth Service URL

func (*Data) GetFeaturesCacheControl

func (c *Data) GetFeaturesCacheControl() string

GetFeaturesCacheControl returns the `cache-control` response header value to use when returning features

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

func (c *Data) GetLogLevel() string

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

func (*Data) GetTogglesURL

func (c *Data) GetTogglesURL() string

GetTogglesURL returns Toggle service 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

Jump to

Keyboard shortcuts

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