Versions in this module Expand all Collapse all v0 v0.1.0 Apr 10, 2023 Changes in this version + const Encrpt_SubType_Cover_ByPos + const Encrpt_SubType_Cover_ByStr + const Encrpt_SubType_Cover_Full + const Encrpt_SubType_Hash_Hmac + const Encrpt_SubType_Hash_Sha1 + const Encrpt_SubType_Hash_Sha256 + const Encrpt_SubType_Replace_ByStr + const Encrpt_SubType_Replace_FPE + const Encrpt_SubType_Replace_Full + const Encrpt_SubType_Transform_ForDate + const Encrpt_SubType_Transform_ForFloat + const Encrpt_SubType_Transform_ForStr + const Encrpt_Type_Cover + const Encrpt_Type_Hash + const Encrpt_Type_Replace + const Encrpt_Type_Transform + type CoverByPositionEncrypter struct + Locs [][2]int16 + RandomSelect bool + Replacer string + func (h *CoverByPositionEncrypter) Handle(input interface{}) (interface{}, error) + func (h *CoverByPositionEncrypter) Init() + type CoverByStrEncrypter struct + RandomSelect bool + Replacer string + Strings []string + func (h *CoverByStrEncrypter) Handle(input interface{}) (interface{}, error) + func (h *CoverByStrEncrypter) Init() + type CoverFullEncrypter struct + RandomSelect bool + Replacer string + func (h *CoverFullEncrypter) Handle(input interface{}) (interface{}, error) + func (h *CoverFullEncrypter) Init() + type DecrptHandler interface + HandleVersa func(input interface{}) (interface{}, error) + type EncrypHandler interface + Handle func(input interface{}) (interface{}, error) + Init func() + type EncryptRule struct + Description string + Disabled bool + Encrypter *Encrypter + Id int64 + Matcher string + Name string + Title string + func (e *EncryptRule) Handle(value interface{}) (interface{}, error) + func (e *EncryptRule) HandleVersa(value interface{}) (interface{}, error) + func (e *EncryptRule) Init() + func (e *EncryptRule) Match(value interface{}) bool + func (e *EncryptRule) SupportDecrpt() bool + type Encrypter struct + Decrypter DecrptHandler + Encrypter EncrypHandler + Type int32 + func (s *Encrypter) MarshalJSON() ([]byte, error) + func (s *Encrypter) UnmarshalJSON(data []byte) error + func (s *Encrypter) UnmarshalYAML(value *yaml.Node) error + func (s *Encrypter) Valid() bool + func (s *Encrypter) ViseVersa() bool + type FpeEncrypter struct + Key string + Tweak string + func (h *FpeEncrypter) Handle(input interface{}) (interface{}, error) + func (h *FpeEncrypter) HandleVersa(input interface{}) (interface{}, error) + func (h *FpeEncrypter) Init() + type HashHMACEncrypter struct + Mechenism string + Secret string + func (h *HashHMACEncrypter) Handle(input interface{}) (interface{}, error) + func (h *HashHMACEncrypter) Init() + type HashSHA1Encrypter struct + func (h *HashSHA1Encrypter) Handle(input interface{}) (interface{}, error) + func (h *HashSHA1Encrypter) Init() + type HashSHA256Encrypter struct + func (h *HashSHA256Encrypter) Handle(input interface{}) (interface{}, error) + func (h *HashSHA256Encrypter) Init() + type QpsManager struct + QMap sync.Map + func (q *QpsManager) Init() + func (q *QpsManager) Request(path string, targetQps int64) bool + type ReplacerByStrEncrypter struct + Strings map[string]string + func (h *ReplacerByStrEncrypter) Handle(input interface{}) (interface{}, error) + func (h *ReplacerByStrEncrypter) Init() + type ReplacerFullEncrypter struct + Replacer string + func (h *ReplacerFullEncrypter) Handle(input interface{}) (interface{}, error) + func (h *ReplacerFullEncrypter) Init() + type SmartEncrypter struct + Rules map[string]*EncryptRule + func (g *SmartEncrypter) HandleByRule(name string, value interface{}) (interface{}, error) + func (g *SmartEncrypter) HandleVersaByRule(name string, value interface{}) (interface{}, error) + func (g *SmartEncrypter) Match(value interface{}) string + func (s *SmartEncrypter) AddOrUpdate(rule *EncryptRule) + func (s *SmartEncrypter) DeleteById(id int64) + func (s *SmartEncrypter) DisableById(id int64) + func (s *SmartEncrypter) EnableById(id int64) + func (s *SmartEncrypter) Init(rules []*EncryptRule) + type SourceIPRange struct + CIDR *net.IPNet + Denied bool + Id int64 + Mark byte + SourceId int64 + type TransformForDate struct + Formate string + Origin string + func (h *TransformForDate) Handle(input interface{}) (interface{}, error) + func (h *TransformForDate) Init() + type TransformForFloat struct + Fixed int + func (h *TransformForFloat) Handle(input interface{}) (interface{}, error) + func (h *TransformForFloat) Init() + type TransformForString struct + Formate []int + Locs [][2]int16 + func (h *TransformForString) Handle(input interface{}) (interface{}, error) + func (h *TransformForString) Init()