Documentation ¶
Index ¶
- Variables
- func ConfigFileExists() bool
- func CreateNewConfiguration(appName string, novusState novus.NovusState) error
- func LoadConfigurationFromFile(novusState novus.NovusState) (config.NovusConfig, bool)
- func LoadConfigurationFromState(appName string, novusState novus.NovusState) config.NovusConfig
- func ValidateConfig(conf config.NovusConfig, validationErrors ValidationErrors) []string
- func ValidateConfigDomainsUniqueness(conf config.NovusConfig, novusState novus.NovusState)
- type ValidationErrors
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidationErrorsConfigFile = ValidationErrors{
"required": "Field '%s' is required",
"url": "Field '%s' is not a valid URL",
"fqdn": "Field '%s' is not a valid FQDN",
"existing_tld": "Field '%s' contains an existing TLD domain.",
"unique_routes": "Field '%s' contains duplicate route definitions.",
"startswith": "Field '%s' must start with http://",
}
This is used for validating the config file
View Source
var ValidationErrorsGlobalAppInput = ValidationErrors{
"required": "Upstream cannot be empty",
"url": "Upstream is not a valid URL",
"fqdn": "Domain is not a valid FQDN",
"existing_tld": "Domain contains an existing TLD domain.",
"unique_routes": "Domain is already defined in the global scope",
"startswith": "Upstream must start with http://",
}
Functions ¶
func ConfigFileExists ¶
func ConfigFileExists() bool
func CreateNewConfiguration ¶
func CreateNewConfiguration(appName string, novusState novus.NovusState) error
func LoadConfigurationFromFile ¶ added in v0.0.5
func LoadConfigurationFromFile(novusState novus.NovusState) (config.NovusConfig, bool)
func LoadConfigurationFromState ¶
func LoadConfigurationFromState(appName string, novusState novus.NovusState) config.NovusConfig
func ValidateConfig ¶
func ValidateConfig(conf config.NovusConfig, validationErrors ValidationErrors) []string
func ValidateConfigDomainsUniqueness ¶ added in v0.0.5
func ValidateConfigDomainsUniqueness(conf config.NovusConfig, novusState novus.NovusState)
Types ¶
type ValidationErrors ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.