Documentation ¶
Overview ¶
Package redirector implements a filter to handle HTTP redirects.
Index ¶
- Constants
- type Redirector
- func (r *Redirector) Close()
- func (r *Redirector) Handle(ctx *context.Context) string
- func (r *Redirector) Inherit(previousGeneration filters.Filter)
- func (r *Redirector) Init()
- func (r *Redirector) Kind() *filters.Kind
- func (r *Redirector) Name() string
- func (r *Redirector) Spec() filters.Spec
- func (r *Redirector) Status() interface{}
- type Spec
Constants ¶
View Source
const (
// Kind is the kind of Redirector.
Kind = "Redirector"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redirector ¶
type Redirector struct {
// contains filtered or unexported fields
}
Redirector is filter to redirect HTTP requests.
func (*Redirector) Handle ¶
func (r *Redirector) Handle(ctx *context.Context) string
Handle Redirector Context.
func (*Redirector) Inherit ¶
func (r *Redirector) Inherit(previousGeneration filters.Filter)
Inherit inherits previous generation of Redirector.
func (*Redirector) Kind ¶
func (r *Redirector) Kind() *filters.Kind
Kind returns the kind of Redirector.
func (*Redirector) Name ¶
func (r *Redirector) Name() string
Name returns the name of the Redirector filter instance.
func (*Redirector) Spec ¶
func (r *Redirector) Spec() filters.Spec
Spec returns the spec used by the Redirector
type Spec ¶
type Spec struct { filters.BaseSpec `json:",inline"` Match string `json:"match" jsonschema:"required"` MatchPart string `json:"matchPart,omitempty" jsonschema:"enum=uri,enum=path,enum=full"` // default uri Replacement string `json:"replacement" jsonschema:"required"` StatusCode int `json:"statusCode,omitempty"` // default 301 }
Spec describes the Redirector.
Click to show internal directories.
Click to hide internal directories.