embargo

package
v3.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckResult

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

type Client

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
}

func New

func New(cfg *pangea.Config) Client

type IPCheckRequest

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 {
	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 {
	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