ofactest

package
v0.50.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindEntity

func FindEntity(tb testing.TB, entityID string) search.Entity[search.Value]

Types

type Client added in v0.50.4

type Client interface {
	Search(ctx context.Context, params SearchParams) ([]SearchResult, error)
}

Client is an HTTP client which makes calls to the OFAC Sanctions List Search application ("Sanctions List Search") hosted at https://sanctionslist.ofac.treas.gov/Home/index.html

This client is mostly used for comparison of Watchman against the official OFAC tool.

func NewClient added in v0.50.4

func NewClient() Client

type ErrorResponse added in v0.50.4

type ErrorResponse struct {
	Name          string        `json:"name"`
	City          string        `json:"city"`
	IDNumber      string        `json:"idNumber"`
	StateProvince string        `json:"stateProvince"`
	NameScore     int           `json:"nameScore"`
	Success       bool          `json:"success"`
	ErrorMessage  string        `json:"errorMessage"`
	Country       string        `json:"country"`
	Programs      []interface{} `json:"programs"`
	Type          string        `json:"type"`
	Address       string        `json:"address"`
	List          string        `json:"list"`
}

func (ErrorResponse) Error added in v0.50.4

func (er ErrorResponse) Error() string

type SearchParams added in v0.50.4

type SearchParams struct {
	Name          string   `json:"name"`
	City          string   `json:"city"`
	IDNumber      string   `json:"idNumber"`
	StateProvince string   `json:"stateProvince"`
	NameScore     int      `json:"nameScore"`
	Country       string   `json:"country"`
	Programs      []string `json:"programs"`
	Type          string   `json:"type"`
	Address       string   `json:"address"`
	List          string   `json:"list"`
}

type SearchResult added in v0.50.4

type SearchResult struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Address   string `json:"address"`
	Type      string `json:"type"`
	Programs  string `json:"programs"`
	Lists     string `json:"lists"`
	NameScore int    `json:"nameScore"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL