Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoToPair = errors.New("`to` values are not set for every `from`") ErrNoFromPair = errors.New("`from` values are not set for every `to`") )
Functions ¶
func Validate ¶
func Validate(config *UncorsConfig) error
Types ¶
type UncorsConfig ¶
type UncorsConfig struct {
// Base config_test_data
HTTPPort int `mapstructure:"http-port" validate:"required"`
Mappings map[string]string `mapstructure:"mappings" validate:"required"`
Proxy string `mapstructure:"proxy"`
Debug bool `mapstructure:"debug"`
// HTTPS config_test_data
HTTPSPort int `mapstructure:"https-port"`
CertFile string `mapstructure:"cert-file"`
KeyFile string `mapstructure:"key-file"`
// Mocks config_test_data
Mocks []mock.Mock `mapstructure:"mocks"`
}
func LoadConfiguration ¶
func LoadConfiguration(viperInstance *viper.Viper, args []string) (*UncorsConfig, error)
func (*UncorsConfig) IsHTTPSEnabled ¶
func (config *UncorsConfig) IsHTTPSEnabled() bool
Click to show internal directories.
Click to hide internal directories.