ofac

package
v0.50.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(ctx context.Context, logger log.Logger, initialDir string) (download.Files, error)

func GroupIntoEntities added in v0.50.0

func GroupIntoEntities(sdns []SDN, addresses map[string][]Address, comments map[string][]SDNComments, altIds map[string][]AlternateIdentity) []search.Entity[search.Value]

func ToEntity added in v0.50.0

func ToEntity(sdn SDN, addresses []Address, comments []SDNComments, altIds []AlternateIdentity) search.Entity[search.Value]

Types

type Address

type Address struct {
	// EntityID (ent_num) is the unique record identifier/unique listing identifier
	EntityID string `json:"entityID"`
	// AddressID (add_num) is the unique record identifier for the address
	AddressID string `json:"addressID"`
	// Address is the street address of the specially designated national
	Address string `json:"address"`
	// CityStateProvincePostalCode is the city, state/province, zip/postal code for the address of the
	// specially designated national
	CityStateProvincePostalCode string `json:"cityStateProvincePostalCode"`
	// Country is the country for the address of the specially designated national
	Country string `json:"country"`
	//AddressRemarks (Add_remarks) is remarks on the address
	AddressRemarks string `json:"addressRemarks"`
}

Address is OFAC SDN Addresses

type AlternateIdentity

type AlternateIdentity struct {
	// EntityID (ent_num) is the unique record identifier/unique listing identifier
	EntityID string `json:"entityID"`
	// AlternateID (alt_num) is the unique record identifier for the alternate identity
	AlternateID string `json:"alternateID"`
	// AlternateIdentityType (alt_type) is the type of alternate identity (aka, fka, nka)
	AlternateType string `json:"alternateType"`
	// AlternateIdentityName (alt_name) is the alternate identity name of the specially designated national
	AlternateName string `json:"alternateName"`
	// AlternateIdentityRemarks (alt_remarks) is remarks on alternate identity of the specially designated national
	AlternateRemarks string `json:"alternateRemarks"`
}

AlternateIdentity is OFAC SDN Alternate Identity object

type DigitalCurrencyAddress added in v0.28.0

type DigitalCurrencyAddress struct {
	// Currency is the name of the digital currency.
	// Examples: XBT (Bitcoin), ETH (Ethereum)
	Currency string

	// Address is a digital wallet address
	Address string
}

type Results

type Results struct {
	// SDNs returns an array of OFAC Specially Designated Nationals
	SDNs []SDN `json:"sdn"`

	// Addresses returns an array of OFAC Specially Designated National Addresses
	Addresses map[string][]Address `json:"address"`

	// AlternateIdentities returns an array of OFAC Specially Designated National Alternate Identity
	AlternateIdentities map[string][]AlternateIdentity `json:"alternateIdentity"`

	// SDNComments returns an array of OFAC Specially Designated National Comments
	SDNComments map[string][]SDNComments `json:"sdnComments"`

	ListHash string
}

func Read

func Read(files download.Files) (*Results, error)

Read will consume the file at path and attempt to parse it was a CSV OFAC file.

For more details on the raw OFAC files see https://moov-io.github.io/watchman/file-structure.html

type SDN

type SDN struct {
	// EntityID (ent_num) is the unique record identifier/unique listing identifier
	EntityID string `json:"entityID"`
	// SDNName (SDN_name)  is the name of the specially designated national
	SDNName string `json:"sdnName"`
	// SDNType (SDN_Type) is the type of SDN
	SDNType string `json:"sdnType"`
	// Programs is the sanction programs this SDN was added from
	Programs []string `json:"program"`
	// Title is the title of an individual
	Title string `json:"title"`
	// CallSign (Call_Sign) is vessel call sign
	CallSign string `json:"callSign"`
	// VesselType (Vess_type) is the vessel type
	VesselType string `json:"vesselType"`
	// Tonnage is the vessel tonnage
	Tonnage string `json:"tonnage"`
	// GrossRegisteredTonnage (GRT) is gross registered tonnage
	GrossRegisteredTonnage string `json:"grossRegisteredTonnage"`
	// VesselFlag (Vess_flag) is vessel flag
	VesselFlag string `json:"vesselFlag"`
	// VesselOwner  (Vess_owner) is vessel owner
	VesselOwner string `json:"vesselOwner"`
	//  Remarks is remarks on specially designated national
	Remarks string `json:"remarks"`
}

SDN is a specially Designated National

type SDNComments

type SDNComments struct {
	// EntityID (ent_num) is the unique record identifier/unique listing identifier
	EntityID string `json:"entityID"`
	// RemarksExtended is remarks extended on a Specially Designated National
	RemarksExtended string `json:"remarksExtended"`
	// DigitalCurrencyAddresses are wallet addresses for digital currencies
	DigitalCurrencyAddresses []DigitalCurrencyAddress `json:"digitalCurrencyAddresses"`
}

SDNComments is OFAC SDN Additional Comments

Jump to

Keyboard shortcuts

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