Documentation ¶
Index ¶
- Constants
- Variables
- func AuthRequestRuleCheck(authRequestRuleFile *AuthRequestRuleFile) error
- type AuthRequestRule
- type AuthRequestRuleConf
- type AuthRequestRuleFile
- type AuthRequestRuleList
- type AuthRequestRuleRaw
- type AuthRequestRuleTable
- type ConfModAuthRequest
- type ModuleAuthRequest
- type ModuleAuthRequestState
- type ProductRuleList
- type ProductRuleRawList
- type RuleRawList
Constants ¶
View Source
const ( ModAuthRequest = "mod_auth_request" DiffInterval = 20 // interval for diff counter (in seconds) DelayConterInterval = 60 // interval for moving current to past (in s) DelayCounterBucketSize = 1 // size of delay counter bucket (in ms) DelayCounterBucketNum = 20 // number of delay counter bucket XForwardedMethod = "X-Forwarded-Method" XForwardedURI = "X-Forwarded-Uri" )
Variables ¶
View Source
var (
ErrAuthRequest = errors.New("AUTH_REQ_FORBIDDEN")
)
Functions ¶
func AuthRequestRuleCheck ¶
func AuthRequestRuleCheck(authRequestRuleFile *AuthRequestRuleFile) error
Types ¶
type AuthRequestRule ¶
type AuthRequestRuleConf ¶
type AuthRequestRuleConf struct { Version string Config ProductRuleList // product => rule list }
func AuthRequestRuleFileLoad ¶
func AuthRequestRuleFileLoad(filename string) (*AuthRequestRuleConf, error)
type AuthRequestRuleFile ¶
type AuthRequestRuleFile struct { Version string Config ProductRuleRawList // product => raw rule list }
type AuthRequestRuleList ¶
type AuthRequestRuleList []AuthRequestRule // rule list
type AuthRequestRuleRaw ¶
type AuthRequestRuleTable ¶
type AuthRequestRuleTable struct {
// contains filtered or unexported fields
}
func NewAuthRequestRuleTable ¶
func NewAuthRequestRuleTable() *AuthRequestRuleTable
func (*AuthRequestRuleTable) Search ¶
func (t *AuthRequestRuleTable) Search(product string) (AuthRequestRuleList, bool)
func (*AuthRequestRuleTable) Update ¶
func (t *AuthRequestRuleTable) Update(ruleConf *AuthRequestRuleConf)
type ConfModAuthRequest ¶
type ConfModAuthRequest struct { Basic struct { DataPath string // path of rule data AuthAddress string // address of auth server AuthTimeout int // timeout for auth request (in ms) } Log struct { OpenDebug bool } }
func (*ConfModAuthRequest) Check ¶
func (cfg *ConfModAuthRequest) Check(confRoot string) error
type ModuleAuthRequest ¶
type ModuleAuthRequest struct {
// contains filtered or unexported fields
}
func NewModuleAuthRequest ¶
func NewModuleAuthRequest() *ModuleAuthRequest
func (*ModuleAuthRequest) Init ¶
func (m *ModuleAuthRequest) Init(cbs *bfe_module.BfeCallbacks, whs *web_monitor.WebHandlers, cr string) error
func (*ModuleAuthRequest) Name ¶
func (m *ModuleAuthRequest) Name() string
type ModuleAuthRequestState ¶
type ProductRuleList ¶
type ProductRuleList map[string]AuthRequestRuleList // product => rule list
type ProductRuleRawList ¶
type ProductRuleRawList map[string]RuleRawList // product => raw rule list
type RuleRawList ¶
type RuleRawList []AuthRequestRuleRaw // raw rule list
Click to show internal directories.
Click to hide internal directories.