Documentation ¶
Overview ¶
Package config provides config-data. The most-basic information is to be injected at compile-time. Otherwise, this package stops execution with an error, when Load is called. The other configuration-options are loaded from a config.ini-file, that is located at ConfigPath, when the Load() function is called
Index ¶
Constants ¶
const ConfigDependant = "CONFIG-DEPENDANT"
ConfigDependant is a string-flag signalizing, that a cli flag depends on which config-file is used
Variables ¶
var BuildTime string
BuildTime must be injected using the makefile. It is attached to the version command- and request-output
var ConfigPath string
ConfigPath must be injected using the makefile. It holds the path to the config-file used, if not specified otherwise via the cli
var GitCommit string
GitCommit must be injected using the makefile. It is attached to the version command- and request-output
var IsTest bool
IsTest is a flag, that should be set when running tests. If set, this package won't panic, if the following variables were not injected at compile-time
var Version string
Version must be injected using the makefile. If its value is set to "develop" this server operates in development-mode, if not specified otherwise via the cli. The Version is attached to the version command- and request-output
Functions ¶
Types ¶
type SSLConfig ¶
type SSLConfig struct {
CertificatePath string `ini:"path"`
}
SSLConfig holds the path to the ssl-certificate
var SSL *SSLConfig
SSL holds the path to the ssl-certificate
type ServerConfig ¶
type ServerConfig struct { IP string `ini:"ip"` Port int `ini:"port"` // (production = 1; development = 2) Mode int `ini:"mode"` // add "*", if you want to allow any origin AllowedRequestOrigins []string `ini:"allowed_request_origins"` }
ServerConfig holds the local ip and port and, whether the server runs in production or development mode
var Server *ServerConfig
Server holds the local ip and port and, whether the server runs in production or development mode
type StreamBaseConfig ¶
type StreamBaseConfig struct { SupplierTimeout time.Duration `ini:"suppliertimeout"` StreamTimeout time.Duration `ini:"streamtimeout"` }
StreamBaseConfig holds the inactivity-timeouts for Streams and StreamSources
var StreamBase *StreamBaseConfig
StreamBase holds the inactivity-timeouts for Streams and StreamSources