configuration

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 9 Imported by: 0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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