Documentation ¶
Overview ¶
Package config provides configuration for the screener-api.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // AppSecret is the app secret AppSecret string `yaml:"app-secret"` // AppID is the app id AppID string `yaml:"app-id"` // TRMKey is the api key for trmlabs TRMKey string `yaml:"trm-key"` // Rules of [caller_type]->risk_type Rulesets map[string]RulesetConfig `yaml:"rulesets"` // BlacklistURL is the url to the blacklist file // this is appplied to all rules and cannot be overridden BlacklistURL string `yaml:"blacklist-url"` // CacheTime is the time to cache results for (in seconds) // can be overridden per rulesets CacheTime int `yaml:"cache-time"` // Port is the port to listen on Port int `yaml:"port"` // Database is the database configuration Database DatabaseConfig `yaml:"database"` // VolumeThresholds is the volume thresholds for each risk type VolumeThresholds []VolumeThreshold `yaml:"volumeThresholds"` // TODO: This HAS to be re-structured somehow // Whitelist is a list of addresses to whitelist Whitelist []string `yaml:"whitelist"` }
Config is the configuration for the screener.
type DatabaseConfig ¶
type DatabaseConfig struct { Type string `yaml:"type"` DSN string `yaml:"dsn"` // Data Source Name }
DatabaseConfig represents the configuration for the database.
type RulesetConfig ¶
type RulesetConfig struct { // Filename is the filename of the ruleset Filename string `json:"filename"` // CacheTime (in seconds) CacheTime *int `json:"cache-time"` }
RulesetConfig is the config for each given ruleset.
Click to show internal directories.
Click to hide internal directories.