detect

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GSE

func GSE(txt string) string

GSE use gse to analyze the most likely data types

Example
fmt.Println(GSE("我叫岳云鹏"))
fmt.Println(GSE("我是张韶涵"))
fmt.Println(GSE("毛阿敏"))
fmt.Println(GSE("敲黑板,划重点"))
fmt.Println(GSE("我住在北京市大兴区庞各庄镇"))
fmt.Println(GSE("我叫伊藤中郎,我住在三重県員弁町石仏北勢町京ヶ野新田"))
Output:

name
name
name

address
name

Types

type BasicDetect

type BasicDetect struct {
	Key   []string `yaml:"key"`   // check column name by regexp
	Value []string `yaml:"value"` // check column value by regexp
}

BasicDetect basic sensitive data detection regexp check rules

type DetectStatus

type DetectStatus struct {
	Header        []common.HeaderColumn // Column Header, include column type info
	Columns       map[string][]string   // detected sensitive columns
	Lines         int                   // lines checked
	QueryTimeCost int64                 // query time cost
	TimeCost      int64                 // time cost
}

DetectStatus ...

type DetectStruct

type DetectStruct struct {
	Config    common.Config
	Sensitive sensitiveConfig
	Status    DetectStatus
}

func NewDetectStruct

func NewDetectStruct(c common.Config) (*DetectStruct, error)

func (*DetectStruct) Detect

func (d *DetectStruct) Detect() error

Detect sensitive data detection

func (*DetectStruct) DetectFile

func (d *DetectStruct) DetectFile() error

DetectFile check data from file

func (*DetectStruct) DetectQuery

func (d *DetectStruct) DetectQuery() error

DetectQuery check data from query result

func (*DetectStruct) ShowStatus

func (d *DetectStruct) ShowStatus() error

ShowStatus print detect status

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL