embargo

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckOutput

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

type Client

type Client interface {
	IPCheck(ctx context.Context, input *IPCheckInput) (*pangea.PangeaResponse[CheckOutput], error)
	ISOCheck(ctx context.Context, input *ISOCheckInput) (*pangea.PangeaResponse[CheckOutput], error)
}

type Embargo

type Embargo struct {
	*pangea.Client
}

func New

func New(cfg *pangea.Config) *Embargo

func (*Embargo) IPCheck

@summary Check IP

@description Check this IP against known sanction and trade embargo lists.

@example

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

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

func (*Embargo) ISOCheck

@summary ISO Code Check

@description Check this country against known sanction and trade embargo lists.

@example

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

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

type IPCheckInput

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

type ISOCheckInput

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

type Sanction

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"`
}

Jump to

Keyboard shortcuts

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