Documentation ¶
Index ¶
- Constants
- func Check(conf *Config, workers map[eosc.RequireId]eosc.IWorker) error
- func Create(id, name string, conf *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)
- func NewFactory() eosc.IExtenderDriverFactory
- func Register(register eosc.IExtenderDriverRegister)
- type Config
- 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) error
- 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 NewFactory ¶
func NewFactory() eosc.IExtenderDriverFactory
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 MatchConf ¶
type MatchConf struct {
Code []int `json:"code" label:"状态码" minimum:"100" description:"最小值:100"`
}
type ResponseRewrite ¶
type ResponseRewrite struct { drivers.WorkerBase // 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) error
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.