Skip to main content

Embargo | Golang SDK

The Pangea Embargo API lets developers quickly check IPs and country codes against known sanction and trade embargo lists.

Check IP

func (e *embargo) IPCheck(ctx context.Context, input *IPCheckRequest) (*pangea.PangeaResponse[CheckResult], error)

Check this IP against known sanction and trade embargo lists.

required parameters

context.Context
input := &embargo.IPCheckInput{
	IP: pangea.String("190.6.64.94"),
}

checkResponse, err := embargocli.IPCheck(ctx, input)

ISO Code Check

func (e *embargo) ISOCheck(ctx context.Context, input *ISOCheckRequest) (*pangea.PangeaResponse[CheckResult], error)

Check this country against known sanction and trade embargo lists.

required parameters

context.Context
input := &embargo.ISOCheckInput{
	ISOCode: pangea.String("CU"),
}

checkResponse, err := embargocli.ISOCheck(ctx, input)

Type CheckResult

type CheckResult struct

required parameters

int `json:"count"`
type CheckResult struct {
	Count		int		`json:"count"`
	Sanctions	[]Sanction	`json:"sanctions"`
}

Type Client

type Client interface

required parameters

func(ctx context.Context, req *IPCheckRequest) (*pangea.PangeaResponse[CheckResult], error)
context.Context
func(ctx context.Context, req *ISOCheckRequest) (*pangea.PangeaResponse[CheckResult], error)
context.Context
pangea.BaseServicer

Base service methods

type Client interface {
	IPCheck(ctx context.Context, req *IPCheckRequest) (*pangea.PangeaResponse[CheckResult], error)
	ISOCheck(ctx context.Context, req *ISOCheckRequest) (*pangea.PangeaResponse[CheckResult], error)

	// Base service methods
	pangea.BaseServicer
}

Type IPCheckRequest

type IPCheckRequest struct

required parameters

string `json:"ip,omitempty"`

Check this IP against the enabled embargo lists. Accepts both IPV4 and IPV6 strings.

type IPCheckRequest struct {
	pangea.BaseRequest

	// Check this IP against the enabled embargo lists.
	// Accepts both IPV4 and IPV6 strings.
	IP	string	`json:"ip,omitempty"`
}

Type ISOCheckRequest

type ISOCheckRequest struct

required parameters

string `json:"iso_code,omitempty"`

Check this two character country ISO-code against the enabled embargo lists.

type ISOCheckRequest struct {
	pangea.BaseRequest

	// Check this two character country ISO-code against the enabled embargo lists.
	ISOCode	string	`json:"iso_code,omitempty"`
}

Type Sanction

type Sanction struct

required parameters

string `json:"embargoed_country_iso_code"`
string `json:"issuing_country"`
string `json:"list_name"`
string `json:"embargoed_country_name"`
map[string]interface{} `json:"annotations"`
type Sanction struct {
	EmbargoedCountryISOCode	string			`json:"embargoed_country_iso_code"`
	IssuingCountry		string			`json:"issuing_country"`
	ListName		string			`json:"list_name"`
	EmbargoedCountryName	string			`json:"embargoed_country_name"`
	Annotations		map[string]interface{}	`json:"annotations"`
}

Type embargo

type embargo struct
type embargo struct {
	pangea.BaseService
}