body_check

package
v0.14.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Name = "body_check"
)

Variables

This section is empty.

Functions

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 BodyCheck

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

func (*BodyCheck) CheckSkill

func (b *BodyCheck) CheckSkill(skill string) bool

func (*BodyCheck) Destroy

func (b *BodyCheck) Destroy()

func (*BodyCheck) DoFilter

func (b *BodyCheck) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err error)

func (*BodyCheck) DoHttpFilter

func (b *BodyCheck) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error

func (*BodyCheck) Reset

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

func (*BodyCheck) Start

func (b *BodyCheck) Start() error

func (*BodyCheck) Stop

func (b *BodyCheck) Stop() error

type Config

type Config struct {
	IsEmpty            bool `json:"is_empty" label:"是否允许为空"`
	AllowedPayloadSize int  `json:"allowed_payload_size" label:"允许的最大请求体大小"`
}

Jump to

Keyboard shortcuts

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