Documentation ¶
Index ¶
- Constants
- func Register(register eosc.IExtenderDriverRegister)
- type Config
- type Driver
- type Factory
- type MatchConf
- type ResponseRewrite
- func (r *ResponseRewrite) CheckSkill(skill string) bool
- func (r *ResponseRewrite) Destroy()
- func (r *ResponseRewrite) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err error)
- func (r *ResponseRewrite) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) (err error)
- func (r *ResponseRewrite) Id() string
- func (r *ResponseRewrite) Reset(v interface{}, workers map[eosc.RequireId]eosc.IWorker) error
- func (r *ResponseRewrite) Start() error
- func (r *ResponseRewrite) Stop() error
Constants ¶
View Source
const (
Name = "response_rewrite"
)
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(register eosc.IExtenderDriverRegister)
Types ¶
type Config ¶
type Config struct { StatusCode int `json:"status_code" label:"响应状态码" minimum:"100" description:"最小值:100"` Body string `json:"body" label:"响应内容"` BodyBase64 bool `json:"body_base64" label:"是否base64加密"` Headers map[string]string `json:"headers" label:"响应头部"` Match *MatchConf `json:"match" label:"匹配状态码列表"` }
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) ConfigType ¶
type Factory ¶
type Factory struct { }
func NewFactory ¶
func NewFactory() *Factory
type MatchConf ¶
type MatchConf struct {
Code []int `json:"code" label:"状态码" minimum:"100" description:"最小值:100"`
}
type ResponseRewrite ¶
type ResponseRewrite struct { *Driver // contains filtered or unexported fields }
func (*ResponseRewrite) CheckSkill ¶
func (r *ResponseRewrite) CheckSkill(skill string) bool
func (*ResponseRewrite) Destroy ¶
func (r *ResponseRewrite) Destroy()
func (*ResponseRewrite) DoHttpFilter ¶ added in v0.8.0
func (r *ResponseRewrite) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) (err error)
func (*ResponseRewrite) Id ¶
func (r *ResponseRewrite) Id() string
func (*ResponseRewrite) Start ¶
func (r *ResponseRewrite) Start() error
func (*ResponseRewrite) Stop ¶
func (r *ResponseRewrite) Stop() error
Click to show internal directories.
Click to hide internal directories.