Documentation
¶
Index ¶
- type AuditRequestedPayload
- type BanCreatedPayload
- type BanRemovedPayload
- type Client
- type Handlers
- type ImportRequestedPayload
- type MalwareScanRequestedPayload
- type RuleCreatedPayload
- type RuleRemovedPayload
- type ScanRequestedPayload
- type SyncRequestedPayload
- type UpdateRequestedPayload
- type YaraInstallRequestedPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditRequestedPayload ¶ added in v0.3.0
type AuditRequestedPayload struct {
AuditID int64 `json:"audit_id"`
}
AuditRequestedPayload matches the broadcastWith() from AuditRequested event.
type BanCreatedPayload ¶
type BanCreatedPayload struct {
ID int64 `json:"id"`
IPAddress string `json:"ip_address"`
Reason string `json:"reason"`
AgentID *int64 `json:"agent_id"`
ExpiresAt *string `json:"expires_at"`
}
BanCreatedPayload matches the broadcastWith() from BanCreated event.
type BanRemovedPayload ¶
type BanRemovedPayload struct {
ID int64 `json:"id"`
IPAddress string `json:"ip_address"`
AgentID *int64 `json:"agent_id"`
}
BanRemovedPayload matches the broadcastWith() from BanRemoved event.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages the WebSocket connection to Reverb.
type Handlers ¶
type Handlers struct {
OnBanCreated func(BanCreatedPayload)
OnBanRemoved func(BanRemovedPayload)
OnRuleCreated func(RuleCreatedPayload)
OnRuleRemoved func(RuleRemovedPayload)
OnScanRequested func(ScanRequestedPayload)
OnImportRequested func(ImportRequestedPayload)
OnAuditRequested func(AuditRequestedPayload)
OnSyncRequested func(SyncRequestedPayload)
OnUpdateRequested func(UpdateRequestedPayload)
OnMalwareScanRequested func(MalwareScanRequestedPayload)
OnYaraInstallRequested func(YaraInstallRequestedPayload)
}
Handlers called when events are received from the server.
type ImportRequestedPayload ¶ added in v0.2.0
type ImportRequestedPayload struct {
AgentID int64 `json:"agent_id"`
}
ImportRequestedPayload matches the broadcastWith() from ImportRequested event.
type MalwareScanRequestedPayload ¶ added in v0.9.93
type MalwareScanRequestedPayload struct {
AgentID int64 `json:"agent_id"`
Intensity string `json:"intensity"` // "low", "medium", "high"
}
MalwareScanRequestedPayload matches the broadcastWith() from MalwareScanRequested event.
type RuleCreatedPayload ¶
type RuleCreatedPayload struct {
ID int64 `json:"id"`
Type string `json:"type"`
Protocol string `json:"protocol"`
IPAddress *string `json:"ip_address"`
IPRange *string `json:"ip_range"`
Port *int `json:"port"`
Status string `json:"status"`
AgentID *int64 `json:"agent_id"`
}
RuleCreatedPayload matches the broadcastWith() from RuleCreated event.
type RuleRemovedPayload ¶
RuleRemovedPayload matches the broadcastWith() from RuleRemoved event.
type ScanRequestedPayload ¶
type ScanRequestedPayload struct {
ScanID int64 `json:"scan_id"`
}
ScanRequestedPayload matches the broadcastWith() from ScanRequested event.
type SyncRequestedPayload ¶ added in v0.9.16
type SyncRequestedPayload struct {
AgentID int64 `json:"agent_id"`
}
SyncRequestedPayload matches the broadcastWith() from SyncRequested event.
type UpdateRequestedPayload ¶ added in v0.6.1
type UpdateRequestedPayload struct {
AgentID int64 `json:"agent_id"`
}
UpdateRequestedPayload matches the broadcastWith() from UpdateRequested event.
type YaraInstallRequestedPayload ¶ added in v0.9.100
type YaraInstallRequestedPayload struct {
AgentID int64 `json:"agent_id"`
}
YaraInstallRequestedPayload matches the broadcastWith() from YaraInstallRequested event.