Documentation ¶
Overview ¶
Package internal provides internal functionality for the screener-api.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CallerRuler ¶
type CallerRuler struct {
// contains filtered or unexported fields
}
CallerRuler implements the RuleSet interface for a specific caller type.
func NewRuleset ¶
func NewRuleset(riskRules map[string]bool) *CallerRuler
NewRuleset creates a new CallerRuler with the given risk rules.
func (*CallerRuler) HasAddressIndicators ¶
func (cr *CallerRuler) HasAddressIndicators(thresholds []config.VolumeThreshold, riskIndicators ...trmlabs.AddressRiskIndicator) (bool, error)
HasAddressIndicators returns a list of addressRiskIndicator.
func (*CallerRuler) HasRisk ¶
func (cr *CallerRuler) HasRisk(riskType string) bool
HasRisk checks if the specified risk type is present.
type RuleSet ¶
type RuleSet interface { HasRisk(riskType string) bool HasAddressIndicators(thresholds []config.VolumeThreshold, riskIndicators ...trmlabs.AddressRiskIndicator) (bool, error) }
RuleSet interface defines methods to work with risk rules.
type RulesetManager ¶
type RulesetManager interface { // GetRuleset returns a RuleSet for the specified caller type. GetRuleset(rulesetName string) RuleSet // AddRuleset adds a new ruleset to the manager. AddRuleset(rulesetName string, rules map[string]bool) error }
RulesetManager interface defines methods to work with rulesets.
func NewRulesetManager ¶
func NewRulesetManager(rulesets map[string]map[string]bool) RulesetManager
NewRulesetManager creates a new rulesetManager with the given rulesets.
Click to show internal directories.
Click to hide internal directories.