Documentation
¶
Overview ¶
Package config is responsible for loading, parsing the configuration.
Index ¶
Constants ¶
View Source
const ( // EnvPrefix is used as the prefix for Environment variable configuration. EnvPrefix = "APIM_BROKER" // FilePathEnv is used as a key to get the configuration file location. FilePathEnv = EnvPrefix + "_CONF_FILE" // FileType constant is used to specify the Configuration file type(YAML). FileType = "yaml" InfoMsgSettingUp = "loading the configuration file: %s " ErrMsgUnableToReadConf = "unable to read configuration: %s" ErrMsgUnableToParseConf = "unable to parse configuration" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIM ¶
type APIM struct { Username string `mapstructure:"username"` Password string `mapstructure:"password"` TokenEndpoint string `mapstructure:"tokenEndpoint"` DynamicClientEndpoint string `mapstructure:"dynamicClientEndpoint"` DynamicClientRegistrationContext string `mapstructure:"dynamicClientRegistrationContext"` PublisherEndpoint string `mapstructure:"publisherEndpoint"` PublisherAPIContext string `mapstructure:"publisherAPIContext"` StoreApplicationContext string `mapstructure:"storeApplicationContext"` StoreSubscriptionContext string `mapstructure:"storeSubscriptionContext"` StoreMultipleSubscriptionContext string `mapstructure:"storeMultipleSubscriptionContext"` StoreEndpoint string `mapstructure:"storeEndpoint"` }
APIM represents the information required to interact with the APIM.
type Auth ¶
type Auth struct { Username string `mapstructure:"username"` Password string `mapstructure:"password"` }
Auth represents the username and the password for basic auth.
type Broker ¶
type Broker struct { Log Log `mapstructure:"log"` HTTP HTTP `mapstructure:"http"` APIM APIM `mapstructure:"apim"` DB DB `mapstructure:"db"` }
Broker main struct which holds sub configurations.
type Client ¶
type Client struct { InsecureCon bool `mapstructure:"insecureCon"` Timeout int `mapstructure:"timeout"` MinBackOff int `mapstructure:"minBackOff"` MaxBackOff int `mapstructure:"maxBackOff"` MaxRetries int `mapstructure:"maxRetries"` }
Client represents configuration needed for the HTTP client.
type DB ¶
type DB struct { Host string `mapstructure:"host"` Port int `mapstructure:"port"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` Database string `mapstructure:"database"` LogMode bool `mapstructure:"logMode"` MaxRetries int `mapstructure:"maxRetries"` }
DB represent the Database configuration.
Click to show internal directories.
Click to hide internal directories.