Documentation
¶
Overview ¶
Package config ...
Package config ...
Index ¶
- Constants
- Variables
- func GetPublicKey() []byte
- func GetRandomPort() string
- func SetConfiguration() error
- func SetUpMockConfig(t *testing.T) error
- func ValidateConfiguration() error
- type APICConf
- type DBConf
- type EventConf
- type KeyCertConf
- type LoadBalancerConf
- type MessageBusConf
- type ODIMConf
- type PluginConf
- type TLSConf
- type URLTranslation
Constants ¶
const ( // DefaultDBProtocol - default Protocol value DefaultDBProtocol = "tcp" // DefaultDBPoolSize - default PoolSize value DefaultDBPoolSize = 120 // DefaultDBMinIdleConns - default MinIdleConns value DefaultDBMinIdleConns = 10 )
Variables ¶
var AllowedMessageBusTypes = map[string]bool{ "Kafka": true, }
AllowedMessageBusTypes is for checking for message types are allowed
var Data configModel
Data will have the configuration data from config file
Functions ¶
func GetPublicKey ¶
func GetPublicKey() []byte
GetPublicKey provides the public key configured in MockConfig
func GetRandomPort ¶
func GetRandomPort() string
GetRandomPort provides a random port between a range
func SetConfiguration ¶
func SetConfiguration() error
SetConfiguration will extract the config data from file
func SetUpMockConfig ¶
SetUpMockConfig set ups a mock ration for unit testing
func ValidateConfiguration ¶
func ValidateConfiguration() error
ValidateConfiguration will validate configurations read and assign default values, where required
Types ¶
type APICConf ¶
type APICConf struct {
APICHost string `json:"APICHost"`
UserName string `json:"UserName"`
Password string `json:"Password"`
DomainData map[string]string `json:"DomainData"`
}
APICConf is for holding all the cisco APIC related configurations
type DBConf ¶
type DBConf struct {
Protocol string `json:"Protocol"`
SentinelHost string `json:"SentinelHost"`
Host string `json:"Host"`
Port string `json:"Port"`
MinIdleConns int `json:"MinIdleConns"`
PoolSize int `json:"PoolSize"`
RedisHAEnabled bool `json:"RedisHAEnabled"`
SentinelPort string `json:"SentinelPort"`
MasterSet string `json:"MasterSet"`
RedisOnDiskEncryptedPassword string `json:"RedisOnDiskEncryptedPassword"`
RedisOnDiskPassword []byte
}
DBConf holds all DB related configurations
type EventConf ¶
type EventConf struct {
DestURI string `json:"DestinationURI"`
ListenerHost string `json:"ListenerHost"`
ListenerPort string `json:"ListenerPort"`
}
EventConf is for holding all events related configuration
type KeyCertConf ¶
type KeyCertConf struct {
RootCACertificatePath string `json:"RootCACertificatePath"` // RootCACertificate will be added to truststore
PrivateKeyPath string `json:"PrivateKeyPath"` // plugin private key
CertificatePath string `json:"CertificatePath"` // plugin certificate
RootCACertificate []byte
PrivateKey []byte
RSAPrivateKeyPath string `json:"RSAPrivateKeyPath"`
Certificate []byte
RSAPrivateKey []byte
}
KeyCertConf is for holding all security oriented configuration
type LoadBalancerConf ¶
LoadBalancerConf is for holding all load balancer related configurations
type MessageBusConf ¶
type MessageBusConf struct {
MessageQueueConfigFilePath string `json:"MessageQueueConfigFilePath"` // Message Queue Config File Path
EmbType string `json:"MessageBusType"`
EmbQueue []string `json:"MessageBusQueue"`
}
MessageBusConf will have configuration data of MessageBusConf
type ODIMConf ¶
type ODIMConf struct {
URL string `json:"URL"`
UserName string `json:"UserName"`
Password string `json:"Password"`
}
ODIMConf hold the value of the ODIMConfiguration to plugin
type PluginConf ¶
type PluginConf struct {
ID string `json:"ID"` // PluginID hold the id of the plugin
Host string `json:"Host"`
Port string `json:"Port"`
UserName string `json:"UserName"`
Password string `json:"Password"`
}
PluginConf is for holding all the plugin related configurations