extra_params

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormParamType string = "application/x-www-form-urlencoded"
	JsonType      string = "application/json"
)
View Source
const (
	Name = "extra_params"
)

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 ConvertHeaderKey

func ConvertHeaderKey(header string) string

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 {
	Params    []*ExtraParam `json:"params" label:"参数列表"`
	ErrorType string        `json:"error_type" enum:"text,json" label:"报错输出格式" `
}

type Driver

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

type ExtraParam

type ExtraParam struct {
	Name     string `json:"name" label:"参数名"`
	Position string `json:"position" enum:"header,query,body" label:"参数位置"`
	Value    string `json:"value" label:"参数值"`
	Conflict string `json:"conflict" label:"参数冲突时的处理方式" enum:"origin,convert,error"`
}

type ExtraParams

type ExtraParams struct {
	drivers.WorkerBase
	// contains filtered or unexported fields
}

func (*ExtraParams) CheckSkill

func (e *ExtraParams) CheckSkill(skill string) bool

func (*ExtraParams) Destroy

func (e *ExtraParams) Destroy()

func (*ExtraParams) DoFilter

func (e *ExtraParams) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err error)

func (*ExtraParams) DoHttpFilter added in v0.8.0

func (e *ExtraParams) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error

func (*ExtraParams) Reset

func (e *ExtraParams) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) error

func (*ExtraParams) Start

func (e *ExtraParams) Start() error

func (*ExtraParams) Stop

func (e *ExtraParams) Stop() error

Jump to

Keyboard shortcuts

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