Documentation
¶
Overview ¶
Package gopwned implements the REST api of haveibeenpwned.com for easy querying
Index ¶
- Constants
- type Breach
- type Client
- func (c *Client) GetAllBreachedSites(domain string) ([]*Breach, error)
- func (c *Client) GetAllBreachesForAccount(email, domain, truncateResponse string) ([]*Breach, error)
- func (c *Client) GetAllPastesForAccount(account string) ([]*Paste, error)
- func (c *Client) GetBreachedSite(site string) ([]*Breach, error)
- func (c *Client) GetDataClasses() (*DataClasses, error)
- type DataClasses
- type Paste
Constants ¶
View Source
const ( Version = "0.1" UserAgent = "gopwned-api-client-" + Version MediaTypeV2 = "application/vnd.haveibeenpwned.v2+json" Endpoint = "https://haveibeenpwned.com/api/v2/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Breach ¶
type Breach struct {
Name string `json:"Name,omitempty"`
Title string `json:"Title,omitempty"`
Domain string `json:"Domain,omitempty"`
BreachDate string `json:"BreachDate,omitempty"`
AddedDate string `json:"AddedDate,omitempty"`
PwnCount int `json:"PwnCount,omitempty"`
Description string `json:"Description,omitempty"`
DataClasses *DataClasses `json:"DataClasses,omitempty"`
IsVerified bool `json:"IsVerified,omitempty"`
IsFabricated bool `json:"IsFabricated,omitempty"`
IsSensitive bool `json:"IsSensitive,omitempty"`
IsRetired bool `json:"IsRetired,omitempty"`
IsSpamList bool `json:"IsSpamList,omitempty"`
LogoType string `json:"LogoType,omitempty"`
}
func GetAllBreachedSites ¶
func GetBreachedSite ¶
type Client ¶
type Client struct {
UserAgent string
// contains filtered or unexported fields
}
func (*Client) GetAllBreachedSites ¶
func (*Client) GetAllBreachesForAccount ¶
func (*Client) GetAllPastesForAccount ¶
func (*Client) GetDataClasses ¶
func (c *Client) GetDataClasses() (*DataClasses, error)
type DataClasses ¶
type DataClasses []string
func GetDataClasses ¶
func GetDataClasses() (*DataClasses, error)
Click to show internal directories.
Click to hide internal directories.