Documentation
¶
Overview ¶
Package piidetector implements pattern-based PII detection and redaction.
Index ¶
- func NewCompositePIIDetector(detectors ...domain.PIIDetector) domain.PIIDetector
- func NewCreditCardDetector() domain.PIIDetector
- func NewDefaultPIIDetector(cats PIICategories) domain.PIIDetector
- func NewEmailDetector() domain.PIIDetector
- func NewPhoneDetector() domain.PIIDetector
- func NewSSNDetector() domain.PIIDetector
- type CompositePIIDetector
- type CreditCardDetector
- type EmailDetector
- type PIICategories
- type PhoneDetector
- type SSNDetector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCompositePIIDetector ¶
func NewCompositePIIDetector(detectors ...domain.PIIDetector) domain.PIIDetector
NewCompositePIIDetector создаёт композитный детектор из набора под-детекторов.
func NewCreditCardDetector ¶
func NewCreditCardDetector() domain.PIIDetector
NewCreditCardDetector создаёт детектор номеров кредитных карт.
func NewDefaultPIIDetector ¶
func NewDefaultPIIDetector(cats PIICategories) domain.PIIDetector
NewDefaultPIIDetector создаёт CompositePIIDetector из встроенных детекторов согласно включённым категориям.
func NewEmailDetector ¶
func NewEmailDetector() domain.PIIDetector
NewEmailDetector создаёт детектор email-адресов.
func NewPhoneDetector ¶
func NewPhoneDetector() domain.PIIDetector
NewPhoneDetector создаёт детектор телефонных номеров.
func NewSSNDetector ¶
func NewSSNDetector() domain.PIIDetector
NewSSNDetector создаёт детектор SSN (Social Security Number).
Types ¶
type CompositePIIDetector ¶
type CompositePIIDetector struct {
// contains filtered or unexported fields
}
@sk-task pii-guardrails#T1.2: CompositePIIDetector (DEC-002, AC-004)
CompositePIIDetector последовательно применяет набор под-детекторов.
func (*CompositePIIDetector) Detect ¶
func (d *CompositePIIDetector) Detect(text string) string
Detect последовательно применяет все под-детекторы.
type CreditCardDetector ¶
type CreditCardDetector struct{}
@sk-task pii-guardrails#T3.3: CreditCardDetector (RQ-003)
func (*CreditCardDetector) Detect ¶
func (d *CreditCardDetector) Detect(text string) string
Detect заменяет номера кредитных карт на redacted marker.
type EmailDetector ¶
type EmailDetector struct{}
@sk-task pii-guardrails#T1.2: EmailDetector (RQ-003, AC-004)
func (*EmailDetector) Detect ¶
func (d *EmailDetector) Detect(text string) string
Detect заменяет email-адреса на redacted marker.
type PIICategories ¶
PIICategories задаёт набор категорий PII для встроенного детектора.
type PhoneDetector ¶
type PhoneDetector struct{}
@sk-task pii-guardrails#T1.2: PhoneDetector (RQ-003, AC-004)
func (*PhoneDetector) Detect ¶
func (d *PhoneDetector) Detect(text string) string
Detect заменяет телефонные номера на redacted marker.
type SSNDetector ¶
type SSNDetector struct{}
@sk-task pii-guardrails#T1.2: SSNDetector (RQ-003, AC-004)
func (*SSNDetector) Detect ¶
func (d *SSNDetector) Detect(text string) string
Detect заменяет SSN на redacted marker.