extra_params_v2

package
v0.15.12 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JsonBodyType              = "json"
	FormDataBodyType          = "form-data"
	MultipartFormDataBodyType = "multipart-formdata"
)
View Source
const (
	Name = "extra_params_v2"
)

Variables

This section is empty.

Functions

func Check

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

func Create

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:"参数列表"`
	RequestBodyType string        `json:"request_body_type" enum:"form-data,json,multipart-formdata" 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:"参数名"`
	Type     string   `json:"type" label:"参数类型" enum:"string,int,float,bool,$datetime,$md5,$timestamp,$concat,$hmac-sha256"`
	Position string   `json:"position" enum:"header,query,body" label:"参数位置"`
	Value    []string `json:"value" label:"参数值列表"`
	Conflict string   `json:"conflict" label:"参数冲突时的处理方式" enum:"origin,convert,error"`
}

Directories

Path Synopsis
md5

Jump to

Keyboard shortcuts

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