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 Driver
- type ParamsTransformer
- func (p *ParamsTransformer) CheckSkill(skill string) bool
- func (p *ParamsTransformer) Destroy()
- func (p *ParamsTransformer) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err error)
- func (p *ParamsTransformer) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error
- func (p *ParamsTransformer) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) error
- func (p *ParamsTransformer) Start() error
- func (p *ParamsTransformer) Stop() error
- type TransParam
Constants ¶
View Source
const ( FormParamType string = "application/x-www-form-urlencoded" JsonType string = "application/json" MultipartType string = "multipart/form-data" )
View Source
const (
Name = "params_transformer"
)
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 { Params []*TransParam `json:"params" label:"参数列表"` Remove bool `json:"remove" label:"映射后删除原参数"` ErrorType string `json:"error_type" enum:"text,json" label:"报错输出格式" ` }
type ParamsTransformer ¶
type ParamsTransformer struct { drivers.WorkerBase // contains filtered or unexported fields }
func (*ParamsTransformer) CheckSkill ¶
func (p *ParamsTransformer) CheckSkill(skill string) bool
func (*ParamsTransformer) Destroy ¶
func (p *ParamsTransformer) Destroy()
func (*ParamsTransformer) DoHttpFilter ¶ added in v0.8.0
func (p *ParamsTransformer) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error
func (*ParamsTransformer) Start ¶
func (p *ParamsTransformer) Start() error
func (*ParamsTransformer) Stop ¶
func (p *ParamsTransformer) Stop() error
type TransParam ¶
type TransParam struct { Name string `json:"name" label:"待映射参数名称"` Position string `json:"position" label:"待映射参数所在位置" enum:"header,query,body"` ProxyName string `json:"proxy_name" label:"目标参数名称"` ProxyPosition string `json:"proxy_position" label:"目标参数所在位置" enum:"header,query,body"` Required bool `json:"required" label:"待映射参数是否必含"` }
Click to show internal directories.
Click to hide internal directories.