Documentation
¶
Index ¶
- Constants
- func NewLoggingHTTPClient() *http.Client
- type AgentRealtimeInfo
- type Client
- func (c *Client) CheckViewer() (ok bool, err error)
- func (c *Client) Do(req *http.Request) (res *http.Response, err error)
- func (c *Client) GetJSONItems(request *http.Request) (items []json.RawMessage, err error)
- func (c *Client) GetJSONResponse(req *http.Request) (data *ResponseBody, err error)
- func (c *Client) GetSites(values url.Values) (data []*Site, err error)
- func (c *Client) GetThreats(values url.Values) (threats []*Threat, err error)
- func (c *Client) NewRequest(method, url string, body io.Reader) (req *http.Request, err error)
- type JSONError
- type JSONErrorObject
- type LoggingRoundTripper
- type Pagination
- type ResponseBody
- type Site
- type SiteResult
- type SuccessMessage
- type Threat
- type ThreatInfo
- type UserInfo
Constants ¶
View Source
const DefaultTimeout = 5
Variables ¶
This section is empty.
Functions ¶
func NewLoggingHTTPClient ¶
Prepare custom client that using a logging transport.
Types ¶
type AgentRealtimeInfo ¶
type AgentRealtimeInfo struct {
AccountID string `json:"accountId"`
AccountName string `json:"accountName"`
SiteID string `json:"siteId"`
SiteName string `json:"siteName"`
GroupID string `json:"groupId"`
GroupName string `json:"groupName"`
AgentComputerName string `json:"agentComputerName"`
AgentDomain string `json:"AgentDomain"`
}
type Client ¶
type Client struct {
AuthConfig *clientcredentials.Config
HTTPClient *http.Client
ManagementURL string
AuthToken string
}
func (*Client) CheckViewer ¶
func (*Client) GetJSONItems ¶
func (*Client) GetJSONResponse ¶
func (c *Client) GetJSONResponse(req *http.Request) (data *ResponseBody, err error)
func (*Client) GetThreats ¶
type JSONErrorObject ¶
type JSONErrorObject struct {
Errors []JSONError `json:"errors"`
}
type LoggingRoundTripper ¶
type LoggingRoundTripper struct {
Base http.RoundTripper
}
type Pagination ¶
type ResponseBody ¶
type ResponseBody struct {
Data json.RawMessage `json:"data"`
Pagination *Pagination `json:"pagination"`
// Seems to be only used with errors.
Name string `json:"name"`
// Seems to be only used with errors.
Message string `json:"message"`
Error *JSONErrorObject `json:"error"`
Errors []JSONError `json:"errors"`
}
type SiteResult ¶
type SiteResult struct {
// Only license info
AllSites json.RawMessage `json:"allSites"`
Sites []*Site
}
type SuccessMessage ¶
type SuccessMessage struct {
Success bool `json:"success"`
}
type Threat ¶
type Threat struct {
AgentRealtimeInfo AgentRealtimeInfo `json:"agentRealtimeInfo"`
ThreatInfo ThreatInfo `json:"threatInfo"`
}
type ThreatInfo ¶
type ThreatInfo struct {
ThreatName string `json:"threatName"`
Classification string `json:"classification"`
ClassificationSource string `json:"classificationSource"`
CreatedAt time.Time `json:"createdAt"`
Engines []string `json:"engines"`
AnalystVerdict string `json:"analystVerdict"`
AnalystVerdictDescription string `json:"analystVerdictDescription"`
IncidentStatus string `json:"incidentStatus"`
IncidentStatusDescription string `json:"incidentStatusDescription"`
MitigationStatus string `json:"mitigationStatus"`
MitigationStatusDescription string `json:"mitigationStatusDescription"`
}
Click to show internal directories.
Click to hide internal directories.