greip

package module
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Greip Go Library

The Greip Go library allows you to easily interact with the Greip API to access a variety of services, including IP geolocation, threat intelligence, email validation, and more.

Report Issue · Request Feature · Greip Website · Documentation

GitHub code size in bytes       API Status


Installation

Add the library to your go.mod:

module main

go 1.22.1

require (
    github.com/greipio/go/v2 v2.0.0
)

Then, download the Greip library by running:

go mod download github.com/greipio/go/v2

Usage

To use the Greip library, first import the package and initialize the Greip instance with your API token. Here’s a basic example:

package main

import (
    "fmt"
    "github.com/greipio/go/v2"
)

func main() {
    // Initialize the Greip instance with your API token
    greipInstance := greip.NewGreip("YOUR_API_TOKEN")

    // Example: Lookup IP information
    response, err := greipInstance.Lookup("1.1.1.1", []string{"device", "security"})
    if err != nil {
        fmt.Println("Error:", err)
        return
    }
    fmt.Println(response.IP, response.ContinentName, response.City)
}

Methods

The Greip library provides various methods to interact with the API:

  • Lookup(ip string, params []string, lang ...string): Get geolocation information about an IP address.
  • Threats(ip string): Get threat intelligence related to an IP address.
  • BulkLookup(ips []string, params []string, lang ...string): Get geolocation information for multiple IP addresses.
  • Country(countryCode string, params []string, lang ...string): Get information about a country by its code.
  • Profanity(text string): Check if a given text contains profanity.
  • ASN(asn string): Get information about an ASN (Autonomous System Number).
  • Email(email string): Validate an email address.
  • Phone(phone string, countryCode string): Validate or lookup a phone number.
  • IBAN(iban string): Validate or lookup an IBAN number.
  • Payment(data map[string]interface{}): Check if a payment transaction is fraudulent.

Example of Method Usage

// Lookup country information
countryInfo, err := greipInstance.Country("US")
if err != nil {
    fmt.Println("Error:", err)
    return
}
fmt.Println(countryInfo.CountryName, countryInfo.Population)

Development Mode

If you need to test the integration without affecting your subscription usage, you can set the test attribute to true when initializing the Greip instance:

greipInstance := greip.NewGreip("YOUR_API_TOKEN", true)

[!WARNING] Enabling the test mode returns fake data. Do not use it in production.

Error Handling

The library returns error for invalid parameters and request-related issues. Here’s an example of handling errors:

response, err := greipInstance.Lookup("INVALID_IP", nil)
if err != nil {
    fmt.Println("Error:", err)
    return
}
fmt.Println(response)

Contributing

Contributions are welcome! Please submit a pull request or open an issue for any improvements or bugs.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASNIPv4

type ASNIPv4 struct {
	Total int `json:"total"`
}

type ASNIPv6

type ASNIPv6 struct {
	Total int `json:"total"`
}

type CountryCurrency

type CountryCurrency struct {
	Name   string `json:"currencyName"`
	Code   string `json:"currencyCode"`
	Symbol string `json:"currencySymbol"`
}

type Greip

type Greip struct {
	BaseURL string
	// contains filtered or unexported fields
}

? Greip represents the Greip client

func NewGreip

func NewGreip(apiToken string, test ...bool) *Greip

NewGreip initializes a new Greip instance

func (*Greip) AsnLookup

func (g *Greip) AsnLookup(asn string) (*ResponseASN, error)

Performs an ASN lookup using the Greip API to retrieve details about the specified Autonomous System Number (ASN).

Parameters:

  • asn (string): The ASN to look up.

Returns:

  • *ResponseASN: A pointer to a ResponseASN struct containing the API response data about the ASN. The ResponseASN struct includes fields such as the ASN number, name, country code, description, and other details.

  • error: An error object if any issues occur during the ASN lookup request, such as network failures or invalid responses from the API. It returns nil if the request succeeds.

Example usage:

// Performing an ASN lookup for an ASN number
response, err := greipInstance.AsnLookup("AS13335")
if err != nil {
    log.Fatalf("Error performing ASN lookup: %v", err)
}
fmt.Printf("ASN Lookup Result: %+v\n", response)

Notes:

  • This function uses the provided API token stored in the Greip instance to authorize the request. Ensure that a valid token is set when initializing the Greip instance.
  • It is recommended to handle any errors returned by this function to ensure robust code execution.

Errors:

  • Network-related errors (e.g., timeouts, unreachable server).
  • API-related errors (e.g., invalid API token, empty ASN).

func (*Greip) BulkLookup

func (g *Greip) BulkLookup(ips []string, params []string, lang ...string) (*map[string]ResponseLookup, error)

Performs a bulk IP lookup using the Greip API to retrieve details about multiple IP addresses in a single request. The function takes a list of IP addresses and optional parameters to include in the lookup.

Parameters:

  • ips ([]string): A list of IP addresses to look up. Each IP address can be either an IPv4 or IPv6 address.
  • params ([]string): An optional list of parameters to include in the lookup request. The available parameters are: "location", "security", "timezone", "currency", and "device".
  • lang (string): An optional parameter to specify the language for the response data. The default language is English ("EN"). The supported languages are: "EN", "ES", "FR", "DE", "IT", "PT", "RU".

Returns:

  • *map[string]ResponseLookup: A pointer to a map containing the API response data for each IP address. The map key is the IP address, and the value is a ResponseLookup struct with details about the IP address.

  • error: An error object if any issues occur during the bulk lookup request, such as network failures or invalid responses from the API. It returns nil if the request succeeds.

Example usage:

// Performing a bulk IP lookup without additional parameters
ips := []string{"1.1.1.1", "2.2.2.2"}
response, err := greipInstance.BulkLookup(ips, nil, "EN")
if err != nil {
    log.Fatalf("Error performing bulk IP lookup: %v", err)
}
fmt.Printf("Bulk IP Lookup Result: %+v\n", response)

// Performing a bulk IP lookup with additional parameters
response, err = greipInstance.BulkLookup(ips, []string{"device", "security"}, "EN")
if err != nil {
    log.Fatalf("Error performing bulk IP lookup: %v", err)
}
fmt.Printf("Bulk IP Lookup with Params Result: %+v\n", response)

Notes:

  • This function uses the provided API token stored in the Greip instance to authorize the request. Ensure that a valid token is set when initializing the Greip instance.
  • If the `params` parameter is nil, the API will return the default set of data.
  • It is recommended to handle any errors returned by this function to ensure robust code execution.

Errors:

  • Network-related errors (e.g., timeouts, unreachable server).
  • API-related errors (e.g., invalid API token, malformed IP address).

func (*Greip) Country

func (g *Greip) Country(countryCode string, params []string, lang ...string) (*ResponseCountry, error)

Performs a country lookup using the Greip API to retrieve details about the specified country code, such as the country's language, flag, currency, and timezone.

Parameters:

  • countryCode (string): The ISO 3166-1 alpha-2 country code to look up (e.g., "US" for United States).
  • params ([]string): An optional list of parameters to include in the lookup request. The available parameters are: "language", "flag", "currency", and "timezone".
  • lang (string): An optional parameter to specify the language for the response data. The default language is English ("EN"). The supported languages are: "EN", "ES", "FR", "DE", "IT", "PT", "RU".

Returns:

  • *ResponseCountry: A pointer to a ResponseCountry struct containing the API response data about the country. The ResponseCountry struct includes fields such as the country's name, language, flag URL, currency code, and timezone.

  • error: An error object if any issues occur during the country lookup request, such as network failures or invalid responses from the API. It returns nil if the request succeeds.

Example usage:

// Performing a country lookup without additional parameters
response, err := greipInstance.Country("US", nil, "EN")
if err != nil {
    log.Fatalf("Error performing country lookup: %v", err)
}
fmt.Printf("Country Lookup Result: %+v\n", response)

// Performing a country lookup with additional parameters
response, err = greipInstance.Country("US", []string{"language", "flag"}, "EN")
if err != nil {
    log.Fatalf("Error performing country lookup: %v", err)
}
fmt.Printf("Country Lookup with Params Result: %+v\n", response)

Notes:

  • This function uses the provided API token stored in the Greip instance to authorize the request. Ensure that a valid token is set when initializing the Greip instance.
  • If the `params` parameter is nil, the API will return the default set of data.
  • It is recommended to handle any errors returned by this function to ensure robust code execution.

Errors:

  • Network-related errors (e.g., timeouts, unreachable server).
  • API-related errors (e.g., invalid API token, malformed country code).

func (*Greip) Email

func (g *Greip) Email(email string) (*ResponseEmail, error)

Performs an email validation using the Greip API to check the validity of the specified email address.

Parameters:

  • email (string): The email address to validate.

Returns:

  • *ResponseEmail: A pointer to a ResponseEmail struct containing the API response data about the email validation status. The ResponseEmail struct includes fields such as the email address, domain, validity status, and other details.

  • error: An error object if any issues occur during the email validation request, such as network failures or invalid responses from the API. It returns nil if the request succeeds.

Example usage:

// Performing an email validation for an email address
response, err := greipInstance.Email("
if err != nil {
    log.Fatalf("Error performing email validation: %v", err)
}
fmt.Printf("Email Validation Result: %+v\n", response)

Notes:

  • This function uses the provided API token stored in the Greip instance to authorize the request. Ensure that a valid token is set when initializing the Greip instance.
  • It is recommended to handle any errors returned by this function to ensure robust code execution.

Errors:

  • Network-related errors (e.g., timeouts, unreachable server).
  • API-related errors (e.g., invalid API token, empty email address).

func (*Greip) IBAN

func (g *Greip) IBAN(iban string) (*ResponseIBAN, error)

Performs an IBAN validation & lookup using the Greip API to check the validity of the specified IBAN (International Bank Account Number).

Parameters:

  • iban (string): The IBAN to validate.

Returns:

  • *ResponseIBAN: A pointer to a ResponseIBAN struct containing the API response data about the IBAN validation status and details. The ResponseIBAN struct includes fields such as the IBAN number, country code, validity status, and other details.

  • error: An error object if any issues occur during the IBAN validation request, such as network failures or invalid responses from the API. It returns nil if the request succeeds.

Example usage:

// Performing an IBAN validation for an IBAN number
response, err := greipInstance.IBAN("GB82WEST12345698765432")
if err != nil {
    log.Fatalf("Error performing IBAN validation: %v", err)
}
fmt.Printf("IBAN Validation Result: %+v\n", response)

Notes:

  • This function uses the provided API token stored in the Greip instance to authorize the request. Ensure that a valid token is set when initializing the Greip instance.
  • It is recommended to handle any errors returned by this function to ensure robust code execution.

Errors:

  • Network-related errors (e.g., timeouts, unreachable server).
  • API-related errors (e.g., invalid API token, empty IBAN).

func (*Greip) Lookup

func (g *Greip) Lookup(ip string, params []string, lang ...string) (*ResponseLookup, error)

Lookup performs an IP lookup request to the Greip API to retrieve details about the specified IP address, such as location, security status, and more.

Parameters:

  • ip (string): The IP address to look up. This can be either an IPv4 or IPv6 address.
  • params ([]string): An optional list of parameters to include in the lookup request. The available parameters are: "location", "security", "timezone", "currency", and "device".
  • lang (string): An optional parameter to specify the language for the response data. The default language is English ("EN"). The supported languages are: "EN", "ES", "FR", "DE", "IT", "PT", "RU".

Returns:

  • *ResponseLookup: A pointer to a ResponseLookup struct containing the API response data about the IP address. The ResponseLookup struct includes various fields such as IP type, continent, country, region, city, ASN (Autonomous System Number) details, timezone, security information (e.g., proxy, Tor, hosting), and device details (e.g., browser, OS).

  • error: An error object if any issues occur during the lookup request, such as network failures or invalid responses from the API. It returns nil if the request succeeds.

Example usage:

// Performing an IP lookup without additional parameters
response, err := greipInstance.Lookup("1.1.1.1", nil)
if err != nil {
    log.Fatalf("Error performing IP lookup: %v", err)
}
fmt.Printf("IP Lookup Result: %+v\n", response)

// Performing an IP lookup with additional parameters
response, err = greipInstance.Lookup("1.1.1.1", []string{"device", "security"}, "EN")
if err != nil {
    log.Fatalf("Error performing IP lookup: %v", err)
}
fmt.Printf("IP Lookup with Params Result: %+v\n", response)

Notes:

  • This function uses the provided API token stored in the Greip instance to authorize the request. Ensure that a valid token is set when initializing the Greip instance.
  • If the `params` parameter is nil, the API will return the default set of data.
  • It is recommended to handle any errors returned by this function to ensure robust code execution.

Errors:

  • Network-related errors (e.g., timeouts, unreachable server).
  • API-related errors (e.g., invalid API token, malformed IP address).

func (*Greip) Payment

func (g *Greip) Payment(data map[string]interface{}) (*ResponsePayment, error)

Performs a payment fraud detection using the Greip API to check the payment data for potential fraud indicators.

Parameters:

  • data (map[string]interface{}): A map containing the payment data to check for fraud. The payment data should include fields such as card number, expiry date, CVV, billing address, etc.

Returns:

  • *ResponsePayment: A pointer to a ResponsePayment struct containing the API response data about the payment fraud status. The ResponsePayment struct includes fields such as the payment data, fraud score, risk level, and other details.

  • error: An error object if any issues occur during the payment fraud detection request, such as network failures or invalid responses from the API. It returns nil if the request succeeds.

Example usage:

  // Performing a payment fraud detection for payment data
  paymentData := map[string]interface{}{
      "cardNumber": "4111111111111111",
      "customer_id": "123456",
      "customer_firstname": "John",
      "customer_lastname": "Doe",
	     "customer_email": "name@domain.com",
      "customer_ip": "1.1.1.1"
  }
  response, err := greipInstance.Payment(paymentData)
  if err != nil {
      log.Fatalf("Error performing payment fraud detection: %v", err)
  }
  fmt.Printf("Payment Fraud Detection Result: %+v\n", response)

Notes:

  • This function uses the provided API token stored in the Greip instance to authorize the request. Ensure that a valid token is set when initializing the Greip instance.
  • It is recommended to handle any errors returned by this function to ensure robust code execution.

Errors:

  • Network-related errors (e.g., timeouts, unreachable server).
  • API-related errors (e.g., invalid API token, empty payment data).

func (*Greip) Phone

func (g *Greip) Phone(phone string, countryCode string) (*ResponsePhone, error)

Performs a phone validation using the Greip API to check the validity of the specified phone number.

Parameters:

  • phone (string): The phone number to validate.
  • countryCode (string): The ISO 3166-1 alpha-2 country code for the phone number (e.g., "US" for United States).

Returns:

  • *ResponsePhone: A pointer to a ResponsePhone struct containing the API response data about the phone validation status. The ResponsePhone struct includes fields such as the phone number, country code, validity status, and other details.

  • error: An error object if any issues occur during the phone validation request, such as network failures or invalid responses from the API. It returns nil if the request succeeds.

Example usage:

// Performing a phone validation for a phone number
response, err := greipInstance.Phone("123456789", "US")
if err != nil {
    log.Fatalf("Error performing phone validation: %v", err)
}
fmt.Printf("Phone Validation Result: %+v\n", response)

Notes:

  • This function uses the provided API token stored in the Greip instance to authorize the request. Ensure that a valid token is set when initializing the Greip instance.
  • It is recommended to handle any errors returned by this function to ensure robust code execution.

Errors:

  • Network-related errors (e.g., timeouts, unreachable server).
  • API-related errors (e.g., invalid API token, empty phone number).

func (*Greip) Profanity

func (g *Greip) Profanity(text string) (*ResponseProfanity, error)

Performs a profanity check using the Greip API to detect any profane or inappropriate language in the specified text. The function returns a profanity score indicating the level of profanity detected in the text.

Parameters:

  • text (string): The text to check for profanity.

Returns:

  • *ResponseProfanity: A pointer to a ResponseProfanity struct containing the API response data about the profanity score of the text. The ResponseProfanity struct includes fields such as the profanity score, the list of bad words detected, and the original text.

  • error: An error object if any issues occur during the profanity check request, such as network failures or invalid responses from the API. It returns nil if the request succeeds.

Example usage:

// Performing a profanity check on text
response, err := greipInstance.Profanity("This is a test message with some bad words.")
if err != nil {
    log.Fatalf("Error performing profanity check: %v", err)
}
fmt.Printf("Profanity Check Result: %+v\n", response)

Notes:

  • This function uses the provided API token stored in the Greip instance to authorize the request. Ensure that a valid token is set when initializing the Greip instance.
  • It is recommended to handle any errors returned by this function to ensure robust code execution.

Errors:

  • Network-related errors (e.g., timeouts, unreachable server).
  • API-related errors (e.g., invalid API token, empty text).

func (*Greip) Threats

func (g *Greip) Threats(ip string) (*ResponseThreats, error)

Threats performs a threat lookup using the Greip API to check if the specified IP address is associated with any known threats, such as proxy connection, hosting/cloud, Tor exit node, etc.

Parameters:

  • ip (string): The IP address to check for threats. This can be either an IPv4 or IPv6 address.

Returns:

  • *ResponseThreats: A pointer to a ResponseThreats struct containing the API response data about the threat status of the IP address. The ResponseThreats struct includes fields such as proxy status, Tor status, hosting/cloud status, etc.

  • error: An error object if any issues occur during the threat lookup request, such as network failures or invalid responses from the API. It returns nil if the request succeeds.

Example usage:

// Performing a threat lookup for an IP address
response, err := greipInstance.Threats("1.1.1.1")
if err != nil {
    log.Fatalf("Error performing threat lookup: %v", err)
}
fmt.Printf("Threat Lookup Result: %+v\n", response)

Notes:

  • This function uses the provided API token stored in the Greip instance to authorize the request. Ensure that a valid token is set when initializing the Greip instance.
  • It is recommended to handle any errors returned by this function to ensure robust code execution.

Errors:

  • Network-related errors (e.g., timeouts, unreachable server).
  • API-related errors (e.g., invalid API token, malformed IP address).

type IBANBank

type IBANBank struct {
	Identifier string `json:"identifier"`
	Name       string `json:"name"`
	ShortName  string `json:"short_name"`
	BranchCode string `json:"branch_code"`
	BBAN       string `json:"bban"`
}

type IBANCountry

type IBANCountry struct {
	Name          string                 `json:"name"`
	IANA          string                 `json:"IANA"`
	ISO3166       string                 `json:"ISO3166"`
	Currency      string                 `json:"currency"`
	CentralBank   IBANCountryCentralBank `json:"centralBank"`
	Membership    string                 `json:"membership"`
	IsEU          bool                   `json:"isEU"`
	Length        string                 `json:"length"`
	SampleIBAN    string                 `json:"example_iban"`
	IsSepa        bool                   `json:"isSEPA"`
	SwiftOfficial bool                   `json:"swiftOfficial"`
}

type IBANCountryCentralBank

type IBANCountryCentralBank struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

type IBANFormats

type IBANFormats struct {
	Machine    string `json:"machine"`
	Human      string `json:"human"`
	Obfuscated string `json:"obfuscated"`
}

type LookupASN

type LookupASN struct {
	Number       string `json:"number"`
	Name         string `json:"name"`
	Organization string `json:"org"`
	Phone        string `json:"phone"`
	Email        string `json:"email"`
	Domain       string `json:"domain"`
	Created      string `json:"created"`
	Type         string `json:"type"`
}

type LookupBrowser

type LookupBrowser struct {
	Name         string `json:"name"`
	Version      string `json:"version"`
	VersionMajor string `json:"versionMajor"`
	Title        string `json:"title"`
	UserAgent    string `json:"userAgent"`
}

type LookupDevice

type LookupDevice struct {
	IsMobile bool          `json:"isMobile"`
	Type     string        `json:"type"`
	OS       LookupOS      `json:"OS"`
	Browser  LookupBrowser `json:"browser"`
}

type LookupFlag

type LookupFlag struct {
	Emoji   string        `json:"emoji"`
	Unicode string        `json:"unicode"`
	PNG     LookupFlagPNG `json:"png"`
	SVG     string        `json:"svg"`
}

type LookupFlagPNG

type LookupFlagPNG struct {
	Large  string `json:"1000px"`
	Medium string `json:"250px"`
	Small  string `json:"100px"`
}

type LookupGeo

type LookupGeo struct {
	Continent          string  `json:"continent"`
	ContinentCode      string  `json:"continent_code"`
	ContinentGeoNameID int     `json:"continent_geo_name_id"`
	Country            string  `json:"country"`
	CountryCode        string  `json:"country_code"`
	CountryGeoNameID   int     `json:"country_geo_name_id"`
	Region             string  `json:"region"`
	City               string  `json:"city"`
	Postal             string  `json:"postal"`
	Latitude           float64 `json:"latitude"`
	Longitude          float64 `json:"longitude"`
	Capital            string  `json:"capital"`
	Population         int     `json:"population"`
	Phone              string  `json:"phone"`
	IsEU               bool    `json:"is_eu"`
	Neighbours         string  `json:"neighbours"`
	TLD                string  `json:"tld"`
}

type LookupIP

type LookupIP struct {
	Address string `json:"address"`
	Version int    `json:"version"`
	Numeric int    `json:"numeric"`
	Bogon   bool   `json:"bogon"`
}

type LookupLanguage

type LookupLanguage struct {
	Name       string `json:"name"`
	Code       string `json:"code"`
	NativeName string `json:"native"`
}

type LookupLocation

type LookupLocation struct {
	Capital           string         `json:"capital"`
	Population        int            `json:"population"`
	Language          LookupLanguage `json:"language"`
	Flag              LookupFlag     `json:"flag"`
	PhoneCode         string         `json:"phoneCode"`
	CountryIsEU       bool           `json:"countryIsEU"`
	CountryNeighbours string         `json:"countryNeighbours"`
	TLD               string         `json:"tld"`
}

type LookupOS

type LookupOS struct {
	Type      string `json:"type"`
	Name      string `json:"name"`
	Family    string `json:"family"`
	Version   string `json:"version"`
	Title     string `json:"title"`
	BitMode64 string `json:"64bits_mode"`
}

type LookupSecurity

type LookupSecurity struct {
	IsProxy   bool   `json:"isProxy"`
	ProxyType string `json:"proxyType"`
	IsTor     bool   `json:"isTor"`
	IsBot     bool   `json:"isBot"`
	IsRelay   bool   `json:"isRelay"`
	IsHosting bool   `json:"isHosting"`
}

type LookupSun

type LookupSun struct {
	Sunset                    string `json:"sunset"`
	Sunrise                   string `json:"sunrise"`
	Transit                   string `json:"transit"`
	CivilTwilightBegin        string `json:"civilTwilightBegin"`
	CivilTwilightEnd          string `json:"civilTwilightEnd"`
	NauticalTwilightBegin     string `json:"nauticalTwilightBegin"`
	NauticalTwilightEnd       string `json:"nauticalTwilightEnd"`
	AstronomicalTwilightBegin string `json:"astronomicalTwilightBegin"`
	AstronomicalTwilightEnd   string `json:"astronomicalTwilightEnd"`
	DayLength                 string `json:"dayLength"`
}

type LookupTimezone

type LookupTimezone struct {
	Name            string    `json:"name"`
	Abbreviation    string    `json:"abbreviation"`
	Offset          int       `json:"offset"`
	CurrentTime     string    `json:"currentTime"`
	CurrentTimeUnix int       `json:"currentTimestamp"`
	IsDST           bool      `json:"isDST"`
	Sun             LookupSun `json:"sunInfo"`
}

type PaymentRule

type PaymentRule struct {
	Id          string `json:"id"`
	Description string `json:"description"`
}

type ResponseASN

type ResponseASN struct {
	Number       string  `json:"number"`
	ASN          string  `json:"asn"`
	Name         string  `json:"name"`
	Organization string  `json:"org"`
	Phone        string  `json:"phone"`
	Email        string  `json:"email"`
	Domain       string  `json:"domain"`
	Created      string  `json:"created"`
	Type         string  `json:"type"`
	Registry     string  `json:"registry"`
	TotalIPs     int     `json:"totalIPs"`
	IPv4         ASNIPv4 `json:"IPv4"`
	IPv6         ASNIPv6 `json:"IPv6"`
}

type ResponseCountry

type ResponseCountry struct {
	Geo      LookupGeo       `json:"geo"`
	Language LookupLanguage  `json:"language"`
	Flag     LookupFlag      `json:"flag"`
	Currency CountryCurrency `json:"currency"`
	Timezone LookupTimezone  `json:"timezone"`
}

type ResponseEmail

type ResponseEmail struct {
	Score   int    `json:"score"`
	Reason  string `json:"reason"`
	IsValid bool   `json:"is_valid"`
	Email   string `json:"email"`
}

type ResponseIBAN

type ResponseIBAN struct {
	IsValid bool        `json:"is_valid"`
	IBAN    string      `json:"iban"`
	Formats IBANFormats `json:"formats"`
	Country IBANCountry `json:"country"`
	Bank    IBANBank    `json:"bank"`
}

type ResponseLookup

type ResponseLookup struct {
	IP       LookupIP       `json:"ip"`
	Geo      LookupGeo      `json:"geo"`
	Location LookupLocation `json:"location"`
	ASN      LookupASN      `json:"asn"`
	Timezone LookupTimezone `json:"timezone"`
	Security LookupSecurity `json:"security"`
	Device   LookupDevice   `json:"device"`
}

type ResponsePayment

type ResponsePayment struct {
	Score              float64       `json:"score"`
	Rules              []PaymentRule `json:"rules"`
	TotalRulesChecked  int           `json:"rulesChecked"`
	TotalRulesDetected int           `json:"rulesDetected"`
}

type ResponsePhone

type ResponsePhone struct {
	Carrier     string `json:"carrier"`
	Reason      string `json:"reason"`
	IsValid     bool   `json:"is_valid"`
	Phone       string `json:"phone"`
	CountryCode string `json:"country_code"`
}

type ResponseProfanity

type ResponseProfanity struct {
	Text              string `json:"text"`
	TotalProfaneWords int    `json:"total_bad_words"`
	RiskScore         int    `json:"risk_score"`
	RiskLevel         string `json:"risk_level"`
	Recommendation    string `json:"recommendation"`
}

type ResponseThreats

type ResponseThreats struct {
	IP             LookupIP        `json:"ip"`
	Score          int             `json:"score"`
	RiskLevel      string          `json:"risk_level"`
	Recommendation string          `json:"recommendation"`
	Security       ThreatsSecurity `json:"security"`
}

type Threats

type Threats struct {
	IsProxy   bool   `json:"isProxy"`
	ProxyType string `json:"proxyType"`
	IsTor     bool   `json:"isTor"`
	IsBot     bool   `json:"isBot"`
	IsRelay   bool   `json:"isRelay"`
	IsHosting bool   `json:"isHosting"`
}

type ThreatsSecurity

type ThreatsSecurity struct {
	VpnOrProxy     bool   `json:"vpn_or_proxy"`
	VpnOrProxyType string `json:"vpn_or_proxy_type"`
	Tor            bool   `json:"tor"`
	Bot            bool   `json:"bot"`
	Relay          bool   `json:"relay"`
	Hosting        bool   `json:"hosting"`
	IsBlacklisted  bool   `json:"is_blacklisted"`
}

Directories

Path Synopsis
cmd
livecheck command

Jump to

Keyboard shortcuts

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