Documentation
¶
Index ¶
Constants ¶
View Source
const (
ErrDuplicate = errors.Value("duplicate rule")
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handlers ¶
type Handlers []Handler
Handlers is a type to implement UnmarshalJSON method every time a new rule is imeplemented, it needs to be added to append method
func (*Handlers) UnmarshalJSON ¶
UnmarshalJSON overrides and decode rule handler configuration based on name
type PathReplace ¶
type PathReplace struct {
Search string `json:"search"`
Replace string `json:"replace"`
Times int `json:"times"`
}
func (*PathReplace) ApplyRule ¶
func (p *PathReplace) ApplyRule(r *http.Request)
func (*PathReplace) Valid ¶
func (p *PathReplace) Valid() error
type PathReplaceRegistry ¶
type PathReplaceRegistry struct{}
func (*PathReplaceRegistry) CreateHandler ¶
func (p *PathReplaceRegistry) CreateHandler() Handler
func (*PathReplaceRegistry) Name ¶
func (p *PathReplaceRegistry) Name() string
Click to show internal directories.
Click to hide internal directories.