Documentation
¶
Overview ¶
Package api is used to communicate with SecurityCenter's REST JSON API, in the context of a command line application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
Keys map[string]string
Data map[string]interface{}
// contains filtered or unexported fields
}
Request to be sent to SecurityCenter API
func NewRequest ¶
NewRequest forms a new request to send to the SecurityCenter API
func (*Request) WithAuth ¶
WithAuth loads the authentication keys given into the request for the request to be authenticated as a user. As of SecurityCenter v5, this requires a "session" key with the value of the TNS_SESSION cookie, and a "token" key with the value of the X-SecurityCenter request header.
type Result ¶
type Result struct {
// Status code of the HTTP request made
Status int
// URL of the HTTP request made
URL string
// Data response from the API in simplejson/json format
Data *simplejson.Json
// HTTPRes is the raw net/http request for easy request customizations
HTTPRes *http.Response
}
Result from SecurityCenter API
Click to show internal directories.
Click to hide internal directories.