ipqs

package
v0.0.0-...-887a99a Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName = "ipqs"
	ResultTTL    = 1 * time.Hour
	APIURL       = "https://ipqualityscore.com/api/json/ip"
)

Variables

This section is empty.

Functions

func NewProviderClient

func NewProviderClient(c session.Session) (providers.ProviderClient, error)

Types

type Client

type Client struct {
	session.Session
}

func (*Client) CreateTable

func (c *Client) CreateTable(data []byte) (*table.Writer, error)

func (*Client) Enabled

func (c *Client) Enabled() bool

func (*Client) ExtractThreatIndicators

func (c *Client) ExtractThreatIndicators(findRes []byte) (*providers.ThreatIndicators, error)

func (*Client) FindHost

func (c *Client) FindHost() ([]byte, error)

func (*Client) GetConfig

func (c *Client) GetConfig() *session.Session

func (*Client) Initialise

func (c *Client) Initialise() error

func (*Client) Priority

func (c *Client) Priority() *int32

func (*Client) RateHostData

func (c *Client) RateHostData(findResJSON []byte, ratingConfigJSON []byte) (providers.RateResult, error)

type Config

type Config struct {
	session.Session
	Host   netip.Addr
	APIKey string
	// contains filtered or unexported fields
}

type HostSearchResult

type HostSearchResult struct {
	Raw json.RawMessage `json:"raw,omitempty"`
	// contains filtered or unexported fields
}

type Provider

type Provider interface {
	LoadData() ([]byte, error)
	CreateTable([]byte) (*table.Writer, error)
}

type TransactionDetails

type TransactionDetails struct {
	ValidBillingAddress       bool     `json:"valid_billing_address,omitempty"`
	ValidShippingAddress      bool     `json:"valid_shipping_address,omitempty"`
	ValidBillingEmail         bool     `json:"valid_billing_email,omitempty"`
	ValidShippingEmail        bool     `json:"valid_shipping_email,omitempty"`
	RiskyBillingPhone         bool     `json:"risky_billing_phone,omitempty"`
	RiskyShippingPhone        bool     `json:"risky_shipping_phone,omitempty"`
	BillingPhoneCarrier       string   `json:"billing_phone_carrier,omitempty"`
	ShippingPhoneCarrier      string   `json:"shipping_phone_carrier,omitempty"`
	BillingPhoneLineType      string   `json:"billing_phone_line_type,omitempty"`
	ShippingPhoneLineType     string   `json:"shipping_phone_line_type,omitempty"`
	BillingPhoneCountry       string   `json:"billing_phone_country,omitempty"`
	BillingPhoneCountryCode   string   `json:"billing_phone_country_code,omitempty"`
	ShippingPhoneCountry      string   `json:"shipping_phone_country,omitempty"`
	ShippingPhoneCountryCode  string   `json:"shipping_phone_country_code,omitempty"`
	FraudulentBehavior        bool     `json:"fraudulent_behavior,omitempty"`
	BinCountry                string   `json:"bin_country,omitempty"`
	BinType                   string   `json:"bin_type,omitempty"`
	BinBankName               string   `json:"bin_bank_name,omitempty"`
	RiskScore                 int      `json:"risk_score,omitempty"`
	RiskFactors               []string `json:"risk_factors,omitempty"`
	IsPrepaidCard             bool     `json:"is_prepaid_card,omitempty"`
	RiskyUsername             bool     `json:"risky_username,omitempty"`
	ValidBillingPhone         bool     `json:"valid_billing_phone,omitempty"`
	ValidShippingPhone        bool     `json:"valid_shipping_phone,omitempty"`
	LeakedBillingEmail        bool     `json:"leaked_billing_email,omitempty"`
	LeakedShippingEmail       bool     `json:"leaked_shipping_email,omitempty"`
	LeakedUserData            bool     `json:"leaked_user_data,omitempty"`
	UserActivity              string   `json:"user_activity,omitempty"`
	PhoneNameIdentityMatch    string   `json:"phone_name_identity_match,omitempty"`
	PhoneEmailIdentityMatch   string   `json:"phone_email_identity_match,omitempty"`
	PhoneAddressIdentityMatch string   `json:"phone_address_identity_match,omitempty"`
	EmailNameIdentityMatch    string   `json:"email_name_identity_match,omitempty"`
	NameAddressIdentityMatch  string   `json:"name_address_identity_match,omitempty"`
	AddressEmailIdentityMatch string   `json:"address_email_identity_match,omitempty"`
}

Jump to

Keyboard shortcuts

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