Documentation
¶
Index ¶
- Constants
- Variables
- func ExportAddresses(s string) (matches []string)
- func ExportBankInfos(s string) (matches []string)
- func ExportCreditCards(s string) (matches []string)
- func ExportEmails(s string) (matches []string)
- func ExportIPs(s string) (matches []string)
- func ExportLinks(s string) (matches []string)
- func ExportPhones(s string) (matches []string)
- func ExportSSNs(s string) (matches []string)
- func ExportUUIDs(s string) (matches []string)
- func ExportVINs(s string) (matches []string)
- type Exporter
- type Matcher
- func Address() Matcher
- func All(funcs ...Matcher) Matcher
- func And(a, b Matcher) Matcher
- func Any(funcs ...Matcher) Matcher
- func AtLeastN(n int, funcs ...Matcher) Matcher
- func BankInfo() Matcher
- func CreditCard() Matcher
- func Email() Matcher
- func HaltLangDetect() Matcher
- func IP() Matcher
- func Link() Matcher
- func Not(f Matcher) Matcher
- func Or(a, b Matcher) Matcher
- func Phone() Matcher
- func SSN() Matcher
- func UUID() Matcher
- func VIN() Matcher
- type Rule
- type RuleSet
Constants ¶
const Version = `0.0.1`
Version represents the version of the PII library
Variables ¶
var ( // DefaultRuleSet provides a rule set of default PII rules DefaultRuleSet = RuleSet{ "phone_number": defaultPhoneRule, "ssn": defaultSSNRule, "email_address": defaultEmailRule, "ip_address": defaultIPRule, "credit_card": defaultCreditCardRule, "street_address": defaultAddressRule, "banking_info": defaultBankInfoRule, "uuid": defaultUUIDRule, "vin": defaultVINRule, } )
Functions ¶
func ExportAddresses ¶
ExportAddresses is not really working - disregard for the meantime.
func ExportBankInfos ¶
ExportBankInfos attempts to extract all bank info matches from a string
func ExportCreditCards ¶
ExportCreditCards attempts to extract all credit card numbers from a string
func ExportEmails ¶
ExportEmails attempts to extract all email address matches from a string
func ExportLinks ¶
ExportLinks attempts to grab all links and URLs from a string
func ExportPhones ¶
ExportPhones attempts to extract all phone matches from a string
func ExportSSNs ¶
ExportSSNs attempts to extract all SSN and India PAN number matches from a string
func ExportUUIDs ¶
ExportUUIDs attempts to extract all UUID matches from a string
func ExportVINs ¶
ExportVINs attempts to extract all VIN matches from a string
Types ¶
type Matcher ¶
Matcher is an evaluation type
func Address ¶
func Address() Matcher
Address returns a matcher for identifying street address, po boxes, and zip codes
func BankInfo ¶
func BankInfo() Matcher
BankInfo returns a matcher for identifying either IBANs or US Routing #s
func CreditCard ¶
func CreditCard() Matcher
CreditCard returns a matcher for identifying major credit card numbers
func HaltLangDetect ¶
func HaltLangDetect() Matcher
HaltLangDetect is a special matcher for preventing language detection from running
func Link ¶
func Link() Matcher
Link returns a matcher for identifying URLs and links that are not emails
