Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface { // Enable 启用脱敏功能 Enable() // Disable 禁用脱敏功能 Disable() // IsEnabled 检查脱敏功能是否已启用 IsEnabled() bool // RegisterStrategy 注册新的脱敏策略 RegisterStrategy(name string, strategy dlp.DesensitizeFunc) }
Config 配置接口定义
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine 实现了 EngineAPI 接口
func (*Engine) Deidentify ¶
Deidentify 对文本进行默认脱敏处理
func (*Engine) DesensitizeStruct ¶
DesensitizeStruct 对结构体进行脱敏处理
func (*Engine) DesensitizeText ¶
DesensitizeText 对文本进行脱敏处理
type EngineAPI ¶
type EngineAPI interface { // Config 获取配置接口 Config() Config // DesensitizeText 对文本内容进行脱敏处理 DesensitizeText(text string) string // DesensitizeStruct 对结构体进行脱敏处理 DesensitizeStruct(data interface{}) error // Mask 使用指定模型对文本进行脱敏 Mask(text string, model string) (string, error) // Deidentify 对文本进行默认脱敏处理 Deidentify(text string) (string, string, error) }
EngineAPI 定义了DLP引擎必须实现的接口
Click to show internal directories.
Click to hide internal directories.