extra_params

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 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 ConvertHeaderKey

func ConvertHeaderKey(header string) string

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
}

func (*Driver) Check

func (d *Driver) Check(v interface{}, workers map[eosc.RequireId]eosc.IWorker) error

func (*Driver) ConfigType

func (d *Driver) ConfigType() reflect.Type

func (*Driver) Create

func (d *Driver) Create(id, name string, v interface{}, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

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 {
	*Driver
	// 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) Id

func (e *ExtraParams) Id() string

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

type Factory

type Factory struct {
}

func NewFactory

func NewFactory() *Factory

func (*Factory) Create

func (f *Factory) Create(profession string, name string, label string, desc string, params map[string]interface{}) (eosc.IExtenderDriver, error)

func (*Factory) Render added in v0.6.0

func (f *Factory) Render() interface{}

Jump to

Keyboard shortcuts

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