Documentation ¶
Overview ¶
Package intel provides a client to interact with the Intel API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAssetDoesNotExist is returned by the [Client] when there is no info // about the asset in the Security Graph. ErrAssetDoesNotExist = errors.New("asset does not exist in the Security Graph") )
Functions ¶
This section is empty.
Types ¶
type BlastRadiusRequest ¶
type BlastRadiusRequest struct { AssetIdentifier string `json:"asset_identifier" validate:"required" urlquery:"asset_identifier"` AssetType string `json:"asset_type" validate:"required" urlquery:"asset_type"` }
BlastRadiusRequest defines the parameters required by the blast radius endpoint.
type BlastRadiusResponse ¶
type BlastRadiusResponse struct { // Score contains the blast radius score for a given asset. Score float64 `json:"score"` // Metadata contains information about how a blast radius was calculated. Metadata string `json:"metadata"` }
BlastRadiusResponse defines the output of a blast radius calculation.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client allows to communicates with Intel API exposed by the Security Graph.
func (*Client) BlastRadius ¶
func (i *Client) BlastRadius(req BlastRadiusRequest) (BlastRadiusResponse, error)
BlastRadius calls the blast radius endpoint of the Intel API using the given parameters.
type Config ¶
type Config struct { IntelAPI string `mapstructure:"intel_api"` InsecureTLS string `mapstructure:"insecure_tls"` }
Config defines the config parameters needed by an [IntelAPIClient].
type HTTPStatusError ¶
HTTPStatusError is returned by the method [IntelAPIClient.BlastRadius] when it receives a response with a status code different to 200.
func (HTTPStatusError) Error ¶
func (h HTTPStatusError) Error() string
Click to show internal directories.
Click to hide internal directories.