Documentation
¶
Index ¶
- Constants
- Variables
- func StaticDirMappingHookFunc() mapstructure.DecodeHookFunc
- func StringToTimeDurationHookFunc() mapstructure.DecodeHookFunc
- func URLMappingHookFunc() mapstructure.DecodeHookFunc
- type CacheConfig
- type CacheGlobs
- type Mapping
- type Mappings
- type Mock
- type Mocks
- type Response
- type StaticDirectories
- type StaticDirectory
- type UncorsConfig
Constants ¶
View Source
const ( DefaultExpirationTime = 30 * time.Minute DefaultClearTime = 30 * time.Minute )
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 StaticDirMappingHookFunc ¶ added in v0.1.0
func StaticDirMappingHookFunc() mapstructure.DecodeHookFunc
func StringToTimeDurationHookFunc ¶ added in v0.2.0
func StringToTimeDurationHookFunc() mapstructure.DecodeHookFunc
func URLMappingHookFunc ¶ added in v0.1.0
func URLMappingHookFunc() mapstructure.DecodeHookFunc
Types ¶
type CacheConfig ¶ added in v0.2.0
type CacheConfig struct {
ExpirationTime time.Duration `mapstructure:"expiration-time"`
ClearTime time.Duration `mapstructure:"clear-time"`
Methods []string `mapstructure:"methods"`
}
func (*CacheConfig) Clone ¶ added in v0.2.0
func (c *CacheConfig) Clone() *CacheConfig
type CacheGlobs ¶ added in v0.2.0
type CacheGlobs []string
func (CacheGlobs) Clone ¶ added in v0.2.0
func (g CacheGlobs) Clone() CacheGlobs
type Mapping ¶ added in v0.1.0
type Mapping struct {
From string `mapstructure:"from"`
To string `mapstructure:"to"`
Statics StaticDirectories `mapstructure:"statics"`
Mocks Mocks `mapstructure:"mocks"`
Cache CacheGlobs `mapstructure:"cache"`
}
type Mock ¶ added in v0.1.0
type Response ¶ added in v0.1.0
type StaticDirectories ¶ added in v0.1.0
type StaticDirectories []StaticDirectory
func (StaticDirectories) Clone ¶ added in v0.1.0
func (s StaticDirectories) Clone() StaticDirectories
type StaticDirectory ¶ added in v0.1.0
type StaticDirectory struct {
Path string `mapstructure:"path"`
Dir string `mapstructure:"dir"`
Index string `mapstructure:"index"`
}
func (*StaticDirectory) Clone ¶ added in v0.1.0
func (s *StaticDirectory) Clone() StaticDirectory
func (*StaticDirectory) String ¶ added in v0.2.0
func (s *StaticDirectory) String() string
type UncorsConfig ¶ added in v0.1.0
type UncorsConfig struct {
HTTPPort int `mapstructure:"http-port"`
Mappings Mappings `mapstructure:"mappings"`
Proxy string `mapstructure:"proxy"`
Debug bool `mapstructure:"debug"`
HTTPSPort int `mapstructure:"https-port"`
CertFile string `mapstructure:"cert-file"`
KeyFile string `mapstructure:"key-file"`
CacheConfig CacheConfig `mapstructure:"cache-config"`
}
func LoadConfiguration ¶ added in v0.1.0
func LoadConfiguration(viperInstance *viper.Viper, args []string) *UncorsConfig
func (*UncorsConfig) IsHTTPSEnabled ¶ added in v0.1.0
func (c *UncorsConfig) IsHTTPSEnabled() bool
Source Files
¶
Click to show internal directories.
Click to hide internal directories.