User Intel | Golang SDK
Look up information about a specific breach
func (e *userIntel) Breach(ctx context.Context, input *BreachRequest) (*pangea.PangeaResponse[BreachResult], error)Given a provider specific breach ID, find details about the breach.
input := &user_intel.BreachRequest{
BreachID: "66111",
}
out, err := userintel.Breach(ctx, input)
Look up breached passwords
func (e *userIntel) PasswordBreached(ctx context.Context, input *UserPasswordBreachedRequest) (*pangea.PangeaResponse[UserPasswordBreachedResult], error)Determine if a password has been exposed in a security breach using a 5 character prefix of the password hash.
input := &user_intel.UserPasswordBreachedRequest{
HashType: user_intel.HTsha265,
HashPrefix: "5baa6",
Raw: true,
Verbose: true,
Provider: "spycloud",
}
out, err := userintel.PasswordBreached(ctx, input)
Look up breached passwords V2
func (e *userIntel) PasswordBreachedBulk(ctx context.Context, input *UserPasswordBreachedBulkRequest) (*pangea.PangeaResponse[UserPasswordBreachedBulkResult], error)Determine if a password has been exposed in a security breach using a 5 character prefix of the password hash.
hashPrefixes := [...]string{"5baa6"}
input := &user_intel.UserPasswordBreachedBulkRequest{
HashType: user_intel.HTsha265,
HashPrefixes: hashPrefixes,
Raw: true,
Verbose: true,
Provider: "spycloud",
}
out, err := userintel.PasswordBreachedBulk(ctx, input)
Look up breached users
func (e *userIntel) UserBreached(ctx context.Context, input *UserBreachedRequest) (*pangea.PangeaResponse[UserBreachedResult], error)Determine if an email address, username, phone number, or IP address was exposed in a security breach.
input := &user_intel.UserBreachedRequest{
PhoneNumber: "8005550123",
Raw: true,
Verbose: true,
Provider: "spycloud",
}
out, err := userintel.UserBreached(ctx, input)
Look up breached users V2
func (e *userIntel) UserBreachedBulk(ctx context.Context, input *UserBreachedBulkRequest) (*pangea.PangeaResponse[UserBreachedBulkResult], error)Determine if an email address, username, phone number, or IP address was exposed in a security breach.
phoneNumbers := [...]string{"8005550123"}
input := &user_intel.UserBreachedBulkRequest{
PhoneNumbers: phoneNumbers,
Raw: true,
Verbose: true,
Provider: "spycloud",
}
out, err := userintel.UserBreachedBulk(ctx, input)
Type BreachRequest
type BreachRequest structtype BreachRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
BreachID string `json:"breach_id,omitempty"` // The ID of a breach returned by a provider.
Verbose *bool `json:"verbose,omitempty"` // Echo the API parameters in the response.
Provider string `json:"provider,omitempty"` // Get breach data from this provider.
Cursor string `json:"cursor,omitempty"` // A token given in the raw response from SpyCloud. Post this back to paginate results
Start string `json:"start,omitempty"` // This parameter allows you to define the starting point for a date range query on the spycloud_publish_date field
End string `json:"end,omitempty"` // This parameter allows you to define the ending point for a date range query on the spycloud_publish_date field
Severity []string `json:"severity,omitempty"` // Filter for records that match one of the given severities
}
Type BreachResult
type BreachResult structtype BreachResult struct {
Found bool `json:"found"` // A flag indicating if the lookup was successful
Data interface{} `json:"data,omitempty"` // Breach details given by the provider
Parameters map[string]any `json:"parameters,omitempty"` // The parameters, which were passed in the request, echoed back
}
Type Client
type Client interfacetype Client interface {
UserBreached(ctx context.Context, req *UserBreachedRequest) (*pangea.PangeaResponse[UserBreachedResult], error)
UserBreachedBulk(ctx context.Context, req *UserBreachedBulkRequest) (*pangea.PangeaResponse[UserBreachedBulkResult], error)
PasswordBreached(ctx context.Context, req *UserPasswordBreachedRequest) (*pangea.PangeaResponse[UserPasswordBreachedResult], error)
PasswordBreachedBulk(ctx context.Context, req *UserPasswordBreachedBulkRequest) (*pangea.PangeaResponse[UserPasswordBreachedBulkResult], error)
// Base service methods
pangea.BaseServicer
}
Type HashType
type HashType stringtype HashType string
Type PasswordStatus
type PasswordStatus inttype PasswordStatus int
Type UserBreachedBulkRequest
type UserBreachedBulkRequest structtype UserBreachedBulkRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
Emails []string `json:"emails,omitempty"`
Usernames []string `json:"usernames,omitempty"`
PhoneNumbers []string `json:"phone_numbers,omitempty"`
IPs []string `json:"ips,omitempty"`
Domains []string `json:"domains,omitempty"`
Start string `json:"start,omitempty"`
End string `json:"end,omitempty"`
Verbose *bool `json:"verbose,omitempty"`
Raw *bool `json:"raw,omitempty"`
Provider string `json:"provider,omitempty"`
Severity []string `json:"severity,omitempty"` // Filter for records that match one of the given severities
}
Type UserBreachedBulkResult
type UserBreachedBulkResult structtype UserBreachedBulkResult struct {
Data map[string]UserBreachedData `json:"data"`
Parameters interface{} `json:"parameters,omitempty"`
RawData interface{} `json:"raw_data,omitempty"`
}
Type UserBreachedData
type UserBreachedData structtype UserBreachedData struct {
FoundInBreach bool `json:"found_in_breach"`
BreachCount int `json:"breach_count,omitempty"`
}
Type UserBreachedRequest
type UserBreachedRequest structtype UserBreachedRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
Email string `json:"email,omitempty"`
Username string `json:"username,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
IP string `json:"ip,omitempty"`
Start string `json:"start,omitempty"`
End string `json:"end,omitempty"`
Verbose *bool `json:"verbose,omitempty"`
Raw *bool `json:"raw,omitempty"`
Provider string `json:"provider,omitempty"`
Cursor string `json:"cursor,omitempty"` // A token given in the raw response from SpyCloud. Post this back to paginate results
Severity []string `json:"severity,omitempty"` // Filter for records that match one of the given severities
}
Type UserBreachedResult
type UserBreachedResult structtype UserBreachedResult struct {
Data UserBreachedData `json:"data"`
Parameters interface{} `json:"parameters,omitempty"`
RawData interface{} `json:"raw_data,omitempty"`
}
Type UserPasswordBreachedBulkRequest
type UserPasswordBreachedBulkRequest structtype UserPasswordBreachedBulkRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
HashType HashType `json:"hash_type,omitempty"`
HashPrefixes []string `json:"hash_prefixes,omitempty"`
Verbose *bool `json:"verbose,omitempty"`
Raw *bool `json:"raw,omitempty"`
Provider string `json:"provider,omitempty"`
}
Type UserPasswordBreachedBulkResult
type UserPasswordBreachedBulkResult structtype UserPasswordBreachedBulkResult struct {
Data map[string]UserPasswordBreachedData `json:"data"`
Parameters map[string]any `json:"parameters,omitempty"`
RawData map[string]any `json:"raw_data,omitempty"`
}
Type UserPasswordBreachedData
type UserPasswordBreachedData structtype UserPasswordBreachedData struct {
FoundInBreach bool `json:"found_in_breach"`
BreachCount int `json:"breach_count,omitempty"`
}
Type UserPasswordBreachedRequest
type UserPasswordBreachedRequest structtype UserPasswordBreachedRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
HashType HashType `json:"hash_type,omitempty"`
HashPrefix string `json:"hash_prefix,omitempty"`
Verbose *bool `json:"verbose,omitempty"`
Raw *bool `json:"raw,omitempty"`
Provider string `json:"provider,omitempty"`
}
Type UserPasswordBreachedResult
type UserPasswordBreachedResult structtype UserPasswordBreachedResult struct {
Data UserPasswordBreachedData `json:"data"`
Parameters map[string]any `json:"parameters,omitempty"`
RawData map[string]any `json:"raw_data,omitempty"`
}
Type userIntel
type userIntel structtype userIntel struct {
pangea.BaseService
}