Documentation
¶
Index ¶
- Variables
- func AddNewRule(c *fiber.Ctx) error
- func AssignNewRule(c *fiber.Ctx) error
- func CheckRules(c *fiber.Ctx, user_id uint) bool
- func CompileAllRegexRules()
- func InitStaticTypesDB()
- func ListAllRules(c *fiber.Ctx) error
- func ListAssignedRules(c *fiber.Ctx) error
- func ReCacheUserRules()
- func RuleSetDump(c *fiber.Ctx) error
- func RuleSetFile(c *fiber.Ctx) error
- func RuleSetYamlParser(file []byte) error
- func RulseSetYamlDump() []byte
- type CacheManager
- type CachedUserRules
- type RuleSets
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MetaLocationQuery uint = 1 MetaLocationBody uint = 2 MetaLocationUrl uint = 3 )
View Source
var ( HTTPMethodGET uint = 1 HTTPMethodHEAD uint = 2 HTTPMethodPOST uint = 3 HTTPMethodPUT uint = 4 HTTPMethodDELETE uint = 5 HTTPMethodCONNECT uint = 6 HTTPMethodOPTIONS uint = 7 HTTPMethodTRACE uint = 8 HTTPMethodPATCH uint = 9 )
View Source
var Cached_user_rules = CachedUserRules{CacheManager: CacheManager{LastModifiedTimeKey: "user_rules_ts_", LastModifiedTime: time.Now().Unix()}, Cache: make(map[uint][]userRules)}
View Source
var HttpMethodIDMap = map[string]uint{
"GET": 1,
"HEAD": 2,
"POST": 3,
"PUT": 4,
"DELETE": 5,
"CONNECT": 6,
"OPTIONS": 7,
"TRACE": 8,
"PATCH": 9,
}
View Source
var MetaLocationIDMap = map[string]uint{
"query": 1,
"body": 2,
"url": 3,
}
View Source
var Rule_regex_compiled = make(map[uint]*regexp.Regexp)
Functions ¶
func AddNewRule ¶
func AddNewRule(c *fiber.Ctx) error
func AssignNewRule ¶
func AssignNewRule(c *fiber.Ctx) error
func CheckRules ¶
func CompileAllRegexRules ¶
func CompileAllRegexRules()
func InitStaticTypesDB ¶
func InitStaticTypesDB()
func ListAllRules ¶
func ListAllRules(c *fiber.Ctx) error
func ListAssignedRules ¶
func ListAssignedRules(c *fiber.Ctx) error
func ReCacheUserRules ¶
func ReCacheUserRules()
func RuleSetDump ¶
func RuleSetDump(c *fiber.Ctx) error
func RuleSetFile ¶
func RuleSetFile(c *fiber.Ctx) error
func RuleSetYamlParser ¶
func RulseSetYamlDump ¶
func RulseSetYamlDump() []byte
Types ¶
type CacheManager ¶
type CachedUserRules ¶
type CachedUserRules struct { CacheManager Cache map[uint][]userRules }
Click to show internal directories.
Click to hide internal directories.