config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTLSConfig

func CreateTLSConfig(caCertFile string, certFile string, keyFile string) *tls.Config

func GetEnvVar

func GetEnvVar(key string) string

GetEnvVar gets a `key` from the environment variables

func GetEnvVarDefault

func GetEnvVarDefault(key string, fallback string) string

Types

type Config

type Config struct {
	AmqpUrl             string `json:"hermes_amqp"`
	ClientHandlerServer string `json:"hermes_client_handler_server"`
	CACertFile          string `json:"hermes_cacertfile"`
	CertFile            string `json:"hermes_certfile"`
	KeyFile             string `json:"hermes_keyfile"`
}

Config struct with configuration data for the client application

func GetGlobalConfig added in v0.3.1

func GetGlobalConfig() Config

GetGlobalConfig returns the global configuration struct for the application

func LoadConfig

func LoadConfig(filepath string) Config

LoadConfig loads the globalConfig structure from a JSON-based stream

Jump to

Keyboard shortcuts

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