Documentation ¶
Overview ¶
Package cws holds cws test related functions
Index ¶
- Constants
- func WaitAppLogs(apiClient MyAPIClient, query string) (*datadog.LogAttributes, error)
- func WaitAppSignal(apiClient MyAPIClient, query string) (*datadog.SecurityMonitoringSignalAttributes, error)
- type MyAPIClient
- func (c MyAPIClient) CreateCWSAgentRule(name string, msg string, secl string) (*datadog.CloudWorkloadSecurityAgentRuleResponse, error)
- func (c MyAPIClient) CreateCwsSignalRule(name string, msg string, agentRuleID string, tags []string) (*datadog.SecurityMonitoringRuleResponse, error)
- func (c MyAPIClient) DeleteAgentRule(ruleID string) error
- func (c MyAPIClient) DeleteSignalRule(ruleID string) error
- func (c MyAPIClient) GetAppLog(query string) (*datadog.LogsListResponse, error)
- func (c MyAPIClient) GetAppSignal(query string) (*datadog.SecurityMonitoringSignalsListResponse, error)
Constants ¶
View Source
const ( // SecurityStartLog is the log corresponding to a successful start of the security-agent SecurityStartLog = "Successfully connected to the runtime security module" // SystemProbeStartLog is the log corresponding to a successful start of the system-probe SystemProbeStartLog = "runtime security started" // SecurityAgentPath is the path of the security-agent binary SecurityAgentPath = "/opt/datadog-agent/embedded/bin/security-agent" // PoliciesPath is the path of the default runtime security policies PoliciesPath = "/etc/datadog-agent/runtime-security.d/default.policy" )
Variables ¶
This section is empty.
Functions ¶
func WaitAppLogs ¶
func WaitAppLogs(apiClient MyAPIClient, query string) (*datadog.LogAttributes, error)
WaitAppLogs waits for the app log corresponding to the query
func WaitAppSignal ¶
func WaitAppSignal(apiClient MyAPIClient, query string) (*datadog.SecurityMonitoringSignalAttributes, error)
WaitAppSignal waits for the signal corresponding to the query
Types ¶
type MyAPIClient ¶
type MyAPIClient struct {
// contains filtered or unexported fields
}
MyAPIClient represents the datadog API context
func NewAPIClient ¶
func NewAPIClient() MyAPIClient
NewAPIClient initialise a client with the API and APP keys
func (MyAPIClient) CreateCWSAgentRule ¶
func (c MyAPIClient) CreateCWSAgentRule(name string, msg string, secl string) (*datadog.CloudWorkloadSecurityAgentRuleResponse, error)
CreateCWSAgentRule creates a cws agent rule
func (MyAPIClient) CreateCwsSignalRule ¶
func (c MyAPIClient) CreateCwsSignalRule(name string, msg string, agentRuleID string, tags []string) (*datadog.SecurityMonitoringRuleResponse, error)
CreateCwsSignalRule creates a cws signal rule
func (MyAPIClient) DeleteAgentRule ¶
func (c MyAPIClient) DeleteAgentRule(ruleID string) error
DeleteAgentRule deletes an agent rule
func (MyAPIClient) DeleteSignalRule ¶
func (c MyAPIClient) DeleteSignalRule(ruleID string) error
DeleteSignalRule deletes a signal rule
func (MyAPIClient) GetAppLog ¶
func (c MyAPIClient) GetAppLog(query string) (*datadog.LogsListResponse, error)
GetAppLog returns the logs corresponding to the query
func (MyAPIClient) GetAppSignal ¶
func (c MyAPIClient) GetAppSignal(query string) (*datadog.SecurityMonitoringSignalsListResponse, error)
GetAppSignal returns the signal corresponding to the query
Click to show internal directories.
Click to hide internal directories.