Documentation ¶
Index ¶
- Constants
- Variables
- func Check(v *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 IPFilter
- type IPHandler
- func (I *IPHandler) CheckSkill(skill string) bool
- func (I *IPHandler) Destroy()
- func (I *IPHandler) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err error)
- func (I *IPHandler) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error
- func (I *IPHandler) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) error
- func (I *IPHandler) Start() error
- func (I *IPHandler) Stop() error
Constants ¶
View Source
const (
Name = "ip_restriction"
)
Variables ¶
View Source
var ( ErrorConfigTypeError = errors.New("unknown ip list type") ErrorIpIllegal = errors.New("[ip_restriction] Illegal IP!") )
Functions ¶
func NewFactory ¶
func NewFactory() eosc.IExtenderDriverFactory
func Register ¶
func Register(register eosc.IExtenderDriverRegister)
Types ¶
type IPHandler ¶
type IPHandler struct { drivers.WorkerBase // contains filtered or unexported fields }
func (*IPHandler) CheckSkill ¶
func (*IPHandler) DoHttpFilter ¶ added in v0.8.0
func (I *IPHandler) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error
Click to show internal directories.
Click to hide internal directories.