Debian Codegraph @

pkg/detectors/mailchimp/mailchimp_detector.go

raw symbols SCIP
1 package mailchimp
2
3 import (
4 "github.com/DefangLabs/secret-detector/pkg/detectors/helpers"
5 "github.com/DefangLabs/secret-detector/pkg/secrets"
6 )
7
8 const (
9 Name = "mailchimp"
10 secretType = "Mailchimp API Key"
11 apiKeyRegex = `[0-9a-f]{32}-us[0-9]{1,2}`
12 )
13
14 func init() {
15 secrets.GetDetectorFactory().Register(Name, NewDetector)
16 }
17
18 type detector struct {
19 secrets.Detector
20 }
21
22 func NewDetector(config ...string) secrets.Detector {
23 return &detector{
24 Detector: helpers.NewRegexDetectorBuilder(secretType, apiKeyRegex).Build(),
25 }
26 }