Documentation ¶
Index ¶
- Constants
- type Breach
- type DataClasses
- type HIBPErrorResponse
- type HaveIBeenPwned
- func (o *HaveIBeenPwned) GetBreachedAccount(ctx context.Context, email string, domain string, truncateResponse bool, ...) ([]Breach, error)
- func (o *HaveIBeenPwned) GetBreachedSite(ctx context.Context, site string) (*Breach, error)
- func (o *HaveIBeenPwned) GetBreaches(ctx context.Context, domain string) ([]*Breach, error)
- func (o *HaveIBeenPwned) GetDataClasses(ctx context.Context) (*DataClasses, error)
- func (o *HaveIBeenPwned) GetPastedAccount(ctx context.Context, email string) ([]*Paste, error)
- type Paste
Constants ¶
View Source
const ( UserAgent = "haveibeenpwned-client/v0.1" Accept = "application/json" Endpoint = "https://haveibeenpwned.com/api/v3/" Domain = `^(?:[_\-a-z0-9]+\.)*([\-a-z0-9]+\.)[\-a-z0-9]{2,63}$` DomainUnicode = `^(?:[_\-\p{L}\d]+\.)*([\-\p{L}\d]+\.)[\-\p{L}\d]{2,63}$` )
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 time.Time `json:"AddedDate,omitempty"` ModifiedDate time.Time `json:"ModifiedDate,omitempty"` PwnCount int `json:"PwnCount,omitempty"` Description string `json:"Description,omitempty"` LogoPath string `json:"LogoPath,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"` }
type DataClasses ¶
type DataClasses []string
type HIBPErrorResponse ¶
type HIBPErrorResponse struct { Message string `json:"message"` Description string `json:"-"` Code int `json:"statusCode"` RetryAfter int `json:"-"` }
func (*HIBPErrorResponse) Error ¶
func (e *HIBPErrorResponse) Error() string
type HaveIBeenPwned ¶
type HaveIBeenPwned struct {
// contains filtered or unexported fields
}
func New ¶
func New(accessKey string) *HaveIBeenPwned
func (*HaveIBeenPwned) GetBreachedAccount ¶
func (*HaveIBeenPwned) GetBreachedSite ¶
func (*HaveIBeenPwned) GetBreaches ¶
func (*HaveIBeenPwned) GetDataClasses ¶
func (o *HaveIBeenPwned) GetDataClasses(ctx context.Context) (*DataClasses, error)
func (*HaveIBeenPwned) GetPastedAccount ¶
Click to show internal directories.
Click to hide internal directories.