entity

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	CountryCode        string   `json:"country"`
	Name               string   `json:"name"`
	Organization       string   `json:"organization"`
	StreetAddress      []string `json:"street_address"`
	Locality           string   `json:"locality"`
	AdministrativeArea string   `json:"admin_area"`
	PostalCode         string   `json:"postal_code"`
}

type Domain

type Domain struct {
	CreatedDate    string `json:"created_at"`
	ExpirationDate string `json:"expiration_date,omitempty"`
}

type DomainAnalysis

type DomainAnalysis struct {
	Domain string
	Type   string
	Score  int
	Lists  []string // list of websites where it was found
}

type EmailResponse

type EmailResponse struct {
	Success    bool    `json:"success"`
	Valid      bool    `json:"valid"`
	Disposable bool    `json:"disposable"`
	RecentSpam bool    `json:"recent_spam"`
	Free       bool    `json:"free"`
	CatchAll   bool    `json:"catch_all,omitempty"`
	SMTPScore  uint8   `json:"smtp_score,omitempty"`
	Generic    bool    `json:"generic"`
	Score      int8    `json:"score"`
	Leaked     bool    `json:"leaked,omitempty"`
	Domain     *Domain `json:"domain,omitempty"`
	DNSValid   bool    `json:"dns_valid,omitempty"`
	HoneyPot   bool    `json:"honeypot,omitempty"`
}

type Expression

type Expression struct {
	Name       string `json:"name"`
	Expression string `json:"expression"`
	Type       string `json:"type"`
}

type Feed

type Feed struct {
	Name          string         `json:"name"`
	URL           string         `json:"url"`
	Type          string         `json:"type"`
	Format        string         `json:"format"`
	Timeout       time.Duration  `json:"timeout"`
	FeedAnalyzers []FeedAnalyzer `json:"feed"`
	Logger        logrus.FieldLogger
}

func (Feed) FetchIP

func (feed Feed) FetchIP() (map[string]IPAnalysis, map[string]SUBNETAnalysis, error)

func (Feed) FetchString

func (feed Feed) FetchString() (map[string]DomainAnalysis, error)

func (Feed) GetExpressions

func (feed Feed) GetExpressions() ([]string, error)

func (Feed) ReadFile

func (feed Feed) ReadFile(filename ...string) ([]*Feed, error)

type FeedAnalyzer

type FeedAnalyzer struct {
	Score      int    `json:"score"`
	Expression string `json:"expression"`
}

type IPAddressResponse

type IPAddressResponse struct {
	Success         bool    `json:"success"`
	Proxy           bool    `json:"proxy"`
	ISP             string  `json:"ISP"`
	Organization    string  `json:"organization"`
	ASN             uint    `json:"ASN"`
	Hostname        string  `json:"hostname"`
	CountryCode     string  `json:"country_code"`
	City            string  `json:"city"`
	PostalCode      string  `json:"postal_code"`
	IsCrawler       bool    `json:"is_crawler,omitempty"`
	ConnectionType  string  `json:"connection_type,omitempty"`
	Latitude        float64 `json:"latitude"`
	Longitude       float64 `json:"longitude"`
	Timezone        string  `json:"timezone"`
	Vpn             bool    `json:"vpn"`
	Tor             bool    `json:"tor"`
	RecentAbuse     bool    `json:"recent_abuse"`
	Mobile          bool    `json:"mobile,omitempty"`
	Score           int8    `json:"score"`
	OperatingSystem string  `json:"operating_system,omitempty"`
	Browser         string  `json:"browser,omitempty"`
	DeviceModel     string  `json:"device_model,omitempty"`
	DeviceBrand     string  `json:"device_brand,omitempty"`
}

type IPAnalysis

type IPAnalysis struct {
	IP    string
	Score int
	Type  string
	Lists []string // list of websites where it was found
}

type SUBNETAnalysis

type SUBNETAnalysis struct {
	IP           string
	SUBNET       string
	Type         string
	PrefixLength uint8
	Score        int
	Lists        []string // list of websites where it was found
}

Jump to

Keyboard shortcuts

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