Versions in this module Expand all Collapse all v0 v0.0.17 Aug 24, 2024 v0.0.16 Aug 23, 2024 Changes in this version + const BLACKLIST_ALGO_MASKED + const DEF_CONTEXT_RANGE + const DEF_IDCARD_LEN + const DEF_RESULT_SIZE + const MASKED_CHARLIST + const RESULT_TYPE_KV + const RESULT_TYPE_VALUE + const RULE_TYPE_KV + const RULE_TYPE_VALUE + const VERIFY_ALGO_ABAROUTING + const VERIFY_ALGO_BITCOIN + const VERIFY_ALGO_CREDITCARD + const VERIFY_ALGO_DOMAIN + const VERIFY_ALGO_IDCARD + type ContextVerifyFunc func(*Detector, []byte, *dlpheader.DetectResult) bool + type Detector struct + BAlgo []string + BDict []string + BReg []*regexp.Regexp + CDict []string + CReg []*regexp.Regexp + KDict map[string]struct{} + KReg []*regexp.Regexp + RuleType int + VAlgo []string + VDict []string + VReg []*regexp.Regexp + func (I *Detector) Close() + func (I *Detector) DetectBytes(inputBytes []byte) ([]*dlpheader.DetectResult, error) + func (I *Detector) DetectList(kvList []*KVItem) ([]*dlpheader.DetectResult, error) + func (I *Detector) DetectMap(inputMap map[string]string) ([]*dlpheader.DetectResult, error) + func (I *Detector) GetMaskRuleName() string + func (I *Detector) GetRuleID() int32 + func (I *Detector) GetRuleInfo() string + func (I *Detector) IsKV() bool + func (I *Detector) IsValue() bool + func (I *Detector) UseRegex() bool + type DetectorAPI interface + Close func() + DetectBytes func(inputBytes []byte) ([]*dlpheader.DetectResult, error) + DetectList func(kvList []*KVItem) ([]*dlpheader.DetectResult, error) + DetectMap func(inputMap map[string]string) ([]*dlpheader.DetectResult, error) + GetMaskRuleName func() string + GetRuleID func() int32 + GetRuleInfo func() string + IsKV func() bool + IsValue func() bool + UseRegex func() bool + func NewDetector(ruleItem conf.RuleItem) (DetectorAPI, error) + type KVItem struct + End int + Key string + Start int + Value string