Documentation ¶
Index ¶
- func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error)
- type AndRedirectCondition
- type ConditionalRedirect
- type Config
- type CookieRedirectCondition
- type HeaderRedirectCondition
- type NotRedirectCondition
- type OrRedirectCondition
- type RawRedirectCondition
- type RedirectCondition
- type RedirectRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AndRedirectCondition ¶
type AndRedirectCondition struct {
Children []RawRedirectCondition `mapstructure:"children"`
}
type ConditionalRedirect ¶
type ConditionalRedirect struct {
// contains filtered or unexported fields
}
func (*ConditionalRedirect) ServeHTTP ¶
func (c *ConditionalRedirect) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type Config ¶
type Config struct { StatusCode int `mapstructure:"statusCode,omitempty"` Rules []RedirectRule `mapstructure:"rules,omitempty"` }
func CreateConfig ¶
func CreateConfig() *Config
type CookieRedirectCondition ¶
type HeaderRedirectCondition ¶
type NotRedirectCondition ¶
type NotRedirectCondition struct {
Condition RawRedirectCondition `mapstructure:"condition"`
}
type OrRedirectCondition ¶
type OrRedirectCondition struct {
Children []RawRedirectCondition `mapstructure:"children"`
}
type RawRedirectCondition ¶
type RedirectCondition ¶
type RedirectCondition interface {
// contains filtered or unexported methods
}
type RedirectRule ¶
type RedirectRule struct { WithHost bool `mapstructure:"withHost,omitempty"` SourcePattern string `mapstructure:"sourcePattern"` DestinationPattern string `mapstructure:"destinationPattern"` Condition RawRedirectCondition `mapstructure:"condition"` }
Click to show internal directories.
Click to hide internal directories.