Documentation ¶
Overview ¶
Package client provides a client for the screener-api.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSignature ¶ added in v0.4.0
GenerateSignature generates a signature for the request.
Types ¶
type BlackListBody ¶ added in v0.4.0
type BlackListBody struct { Type string `json:"type"` ID string `json:"id"` Data string `json:"data"` Address string `json:"address"` Network string `json:"network"` Tag string `json:"tag"` Remark string `json:"remark"` }
BlackListBody is the json payload that represents a blacklisted address.
type ScreenerClient ¶
type ScreenerClient interface { ScreenAddress(ctx context.Context, ruleset, address string) (blocked bool, err error) BlacklistAddress(ctx context.Context, appsecret string, appid string, body BlackListBody) (string, error) }
ScreenerClient is an interface for the Screener API.
func NewClient ¶
func NewClient(metricHandler metrics.Handler, screenerURL string) (ScreenerClient, error)
NewClient creates a new client for the Screener API.
func NewNoOpClient ¶ added in v0.0.13
func NewNoOpClient() (ScreenerClient, error)
NewNoOpClient creates a new no-op client for the Screener API. it returns false for every address.
Click to show internal directories.
Click to hide internal directories.