api

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Breaches

type Breaches struct {
	AddedDate    string   `json:"AddedDate"`
	BreachDate   string   `json:"BreachDate"`
	DataClasses  []string `json:"DataClasses"`
	Description  string   `json:"Description"`
	Domain       string   `json:"Domain"`
	IsActive     bool     `json:"IsActive"`
	IsFabricated bool     `json:"IsFabricated"`
	IsRetired    bool     `json:"IsRetired"`
	IsSensitive  bool     `json:"IsSensitive"`
	IsSpamList   bool     `json:"IsSpamList"`
	IsVerified   bool     `json:"IsVerified"`
	LogoType     string   `json:"LogoType"`
	Name         string   `json:"Name"`
	PwnCount     int64    `json:"PwnCount"`
	Title        string   `json:"Title"`
}

Breaches contains the details for each breach

type Client

type Client struct {
	APIKey string
}

Client stores the API key

func NewClient

func NewClient(key string) *Client

NewClient creates a new client object configured with our API key

func (*Client) LookupEmailBreaches

func (c *Client) LookupEmailBreaches(email string) (breaches []Breaches, err error)

LookupEmailBreaches returns the breach information for a given email address from HIBP.

func (*Client) LookupEmailPastes

func (c *Client) LookupEmailPastes(email string) (pastes []Pastes, err error)

LookupEmailPastes returns the pastes from haveibeenpwned for a given

type Pastes

type Pastes struct {
	Date       string `json:"Date"`
	EmailCount int64  `json:"EmailCount"`
	ID         string `json:"Id"`
	Source     string `json:"Source"`
	Title      string `json:"Title,omitempty"`
}

Pastes contains the details for each past

Jump to

Keyboard shortcuts

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