Documentation
¶
Index ¶
- Constants
- 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 Auth
- func (a *Auth) CheckSkill(skill string) bool
- func (a *Auth) Destroy()
- func (a *Auth) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err error)
- func (a *Auth) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error
- func (a *Auth) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) error
- func (a *Auth) Start() error
- func (a *Auth) Stop() error
- type Config
- type RedisConfig
Constants ¶
View Source
const (
Name = "auth_interceptor_redis"
)
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(id, name string, conf *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)
Create 初始化插件执行实例
func NewFactory ¶
func NewFactory() eosc.IExtenderDriverFactory
func Register ¶
func Register(register eosc.IExtenderDriverRegister)
Types ¶
type Auth ¶
type Auth struct {
drivers.WorkerBase
// contains filtered or unexported fields
}
func (*Auth) CheckSkill ¶
func (*Auth) DoHttpFilter ¶
func (a *Auth) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error
DoHttpFilter 核心http处理方法
type Config ¶
type Config struct {
SysKey string `json:"sys_key" label:"认证系统在Redis存储中的KEY值"`
AuthKey string `json:"auth_key" label:"认证参数KEY名"`
AuthPosition string `json:"auth_position" enum:"header,query,body" label:"认证参数追加位置"`
RedisConfig *RedisConfig `json:"redis" label:"Redis连接配置"`
RedisConn string `json:"redis_conn" label:"Redis连接名称"`
RetryCount int `json:"retry_count" label:"认证失败重试次数"`
RetryPeriod int `json:"retry_period" label:"认证失败重试间隔"`
}
Config 参数配置属性
Click to show internal directories.
Click to hide internal directories.