-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathconfig.go
32 lines (30 loc) · 1.14 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package config
// Config is the configuration for the screener.
type Config struct {
// AppSecret is the app secret
AppSecret string `yaml:"app-secret"`
// AppID is the app id
AppID string `yaml:"app-id"`
// ChainalysisKey is the api key for chainalysis
ChainalysisKey string `yaml:"chainalysis-key"`
// ChainalysisURL is the url for chainalysis
ChainalysisURL string `yaml:"chainalysis-url"`
// BlacklistURL is the url to the blacklist file
// this is applied to all rules and cannot be overridden
BlacklistURL string `yaml:"blacklist-url"`
// Port is the port to listen on
Port int `yaml:"port"`
// Database is the database configuration
Database DatabaseConfig `yaml:"database"`
// Severities are the severity levels for each address we want to screen
RiskLevels []string `yaml:"risk-levels"`
// Whitelist is a list of addresses to whitelist
Whitelist []string `yaml:"whitelist"`
// Blacklist is a list of addresses to blacklist
Blacklist []string `yaml:"blacklist"`
}
// DatabaseConfig represents the configuration for the database.
type DatabaseConfig struct {
Type string `yaml:"type"`
DSN string `yaml:"dsn"` // Data Source Name
}