Documentation ¶
Index ¶
- Constants
- func ReadConfig(envVarPrefix string, configInstance interface{}, options ...ViperOption) error
- type KubernetesApiConfiguration
- type MqttClientConfig
- type MqttTlsClientConfig
- type ViperOption
- func WithConfigFile(configFile string) ViperOption
- func WithConfigName(configName string) ViperOption
- func WithConfigPath(path string) ViperOption
- func WithConfigType(configType string) ViperOption
- func WithDefaultConfigName() ViperOption
- func WithFileSystem(fs afero.Fs) ViperOption
- func WithLocalPath() ViperOption
Constants ¶
View Source
const MqttDefaultBrokerEnv = "NAMESPACE_BROKER_PORT"
Variables ¶
This section is empty.
Functions ¶
func ReadConfig ¶
func ReadConfig(envVarPrefix string, configInstance interface{}, options ...ViperOption) error
Types ¶
type KubernetesApiConfiguration ¶
type KubernetesApiConfiguration struct { InCluster bool `mapstructure:"inCluster"` KubernetesConfigFile string `mapstructure:"kubernetesConfigFile"` }
func (*KubernetesApiConfiguration) KubernetesConfigFilePath ¶
func (c *KubernetesApiConfiguration) KubernetesConfigFilePath() *string
func (*KubernetesApiConfiguration) Verify ¶
func (c *KubernetesApiConfiguration) Verify() error
type MqttClientConfig ¶
type MqttClientConfig struct { Broker string `mapstructure:"broker"` ClientId string `mapstructure:"clientId"` MqttTlsClientConfig MqttTlsClientConfig `mapstructure:"mqttTlsClientConfig"` }
func (*MqttClientConfig) Verify ¶
func (c *MqttClientConfig) Verify() error
TODO log entries here are not context-scoped, so will not be transferred to any client
type MqttTlsClientConfig ¶
type MqttTlsClientConfig struct { ServerCaFile string `mapstructure:"serverCaFile"` ClientCertFile string `mapstructure:"clientCertFile"` ClientCertKeyFile string `mapstructure:"clientCertKeyFile"` }
func (*MqttTlsClientConfig) Verify ¶
func (c *MqttTlsClientConfig) Verify() error
TODO log entries here are not context-scoped, so will not be transferred to any client
type ViperOption ¶
func WithConfigFile ¶
func WithConfigFile(configFile string) ViperOption
/ ConfigFile (complete config file name i.e. "some-config-file.json" => some-config-file.json)
func WithConfigName ¶
func WithConfigName(configName string) ViperOption
/ ConfigName (config file base name i.e. "config" => config.*)
func WithConfigPath ¶
func WithConfigPath(path string) ViperOption
/ PATH (directory which get searched for config files)
func WithConfigType ¶
func WithConfigType(configType string) ViperOption
/ ConfigType (config file extension i.e. "yaml" => [ConfigName].yaml)
func WithDefaultConfigName ¶
func WithDefaultConfigName() ViperOption
func WithFileSystem ¶
func WithFileSystem(fs afero.Fs) ViperOption
/ FileSystem (sets the used filesystem to read config file from)
func WithLocalPath ¶
func WithLocalPath() ViperOption
Click to show internal directories.
Click to hide internal directories.