response_rewrite

package
v0.12.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "response_rewrite"
)

Variables

This section is empty.

Functions

func Check added in v0.9.0

func Check(conf *Config, workers map[eosc.RequireId]eosc.IWorker) error

func Create added in v0.9.0

func Create(id, name string, conf *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

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 Driver

type Driver struct {
	// contains filtered or unexported fields
}

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) DoFilter

func (r *ResponseRewrite) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err error)

func (*ResponseRewrite) DoHttpFilter added in v0.8.0

func (r *ResponseRewrite) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error

func (*ResponseRewrite) Reset

func (r *ResponseRewrite) Reset(v interface{}, workers map[eosc.RequireId]eosc.IWorker) error

func (*ResponseRewrite) Start

func (r *ResponseRewrite) Start() error

func (*ResponseRewrite) Stop

func (r *ResponseRewrite) Stop() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL