Documentation ¶
Overview ¶
Package base provides a base store for the screener-api.
Index ¶
- func GetAllModels() (allModels []interface{})
- type Store
- func (s *Store) DeleteBlacklistedAddress(ctx context.Context, id string) error
- func (s *Store) GetAddressIndicators(ctx context.Context, address string, since time.Time) ([]trmlabs.AddressRiskIndicator, error)
- func (s *Store) GetBlacklistedAddress(ctx context.Context, address string) (*db.BlacklistedAddress, error)
- func (s *Store) PutAddressIndicators(ctx context.Context, address string, ...) error
- func (s *Store) PutBlacklistedAddress(ctx context.Context, body db.BlacklistedAddress) error
- func (s *Store) UpdateBlacklistedAddress(ctx context.Context, id string, body db.BlacklistedAddress) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllModels ¶
func GetAllModels() (allModels []interface{})
GetAllModels gets all models to migrate. see: https://medium.com/@SaifAbid/slice-interfaces-8c78f8b6345d for an explanation of why we can't do this at initialization time
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a store that implements an underlying gorm db.
func (*Store) DeleteBlacklistedAddress ¶ added in v0.4.0
DeleteBlacklistedAddress deletes the blacklisted address from the underlying db.
func (*Store) GetAddressIndicators ¶
func (s *Store) GetAddressIndicators(ctx context.Context, address string, since time.Time) ([]trmlabs.AddressRiskIndicator, error)
GetAddressIndicators gets the address indicators for the given address.
func (*Store) GetBlacklistedAddress ¶ added in v0.4.0
func (s *Store) GetBlacklistedAddress(ctx context.Context, address string) (*db.BlacklistedAddress, error)
GetBlacklistedAddress queries the db for the blacklisted address. Returns true if the address is blacklisted, false otherwise. Not used currently.
func (*Store) PutAddressIndicators ¶
func (s *Store) PutAddressIndicators(ctx context.Context, address string, riskIndicator []trmlabs.AddressRiskIndicator) error
PutAddressIndicators puts the address indicators for the given address.
func (*Store) PutBlacklistedAddress ¶ added in v0.4.0
PutBlacklistedAddress puts the blacklisted address in the underlying db.
func (*Store) UpdateBlacklistedAddress ¶ added in v0.4.0
func (s *Store) UpdateBlacklistedAddress(ctx context.Context, id string, body db.BlacklistedAddress) error
UpdateBlacklistedAddress updates the blacklisted address in the underlying db.