2024-05-08 01:56:48 +02:00
|
|
|
package types
|
|
|
|
|
|
|
|
|
|
type Params struct {
|
2024-05-27 13:01:39 +02:00
|
|
|
General General `toml:"general"`
|
|
|
|
|
Url string
|
|
|
|
|
Priority int
|
|
|
|
|
Tags string
|
|
|
|
|
Color int
|
|
|
|
|
Mention string
|
|
|
|
|
WazuhMessage WazuhMessage
|
|
|
|
|
PriorityMap []PriorityMap `toml:"priority_map"`
|
|
|
|
|
MarkdownEmphasis MarkdownEmphasis `toml:"markdown_emphasis"`
|
2024-05-13 14:44:32 +02:00
|
|
|
}
|
|
|
|
|
|
2024-05-27 13:01:39 +02:00
|
|
|
type General struct {
|
|
|
|
|
Targets string `toml:"targets"`
|
|
|
|
|
FullAlert string `toml:"full_alert"`
|
|
|
|
|
ExcludedRules string `toml:"excluded_rules"`
|
|
|
|
|
ExcludedAgents string `toml:"excluded_agents"`
|
|
|
|
|
Sender string `toml:"sender"`
|
|
|
|
|
Click string `toml:"click"`
|
|
|
|
|
}
|
2024-05-13 14:44:32 +02:00
|
|
|
type PriorityMap struct {
|
2024-05-27 13:01:39 +02:00
|
|
|
ThreatMap []int `toml:"threat_map"`
|
|
|
|
|
MentionThreshold int `toml:"mention_threshold"`
|
2024-05-27 13:25:16 +02:00
|
|
|
NotifyThreshold int `toml:"notify_threshold"`
|
2024-05-27 13:01:39 +02:00
|
|
|
Color int `toml:"color"`
|
|
|
|
|
}
|
|
|
|
|
type MarkdownEmphasis struct {
|
|
|
|
|
Slack string `toml:"slack"`
|
|
|
|
|
Ntfy string `toml:"ntfy"`
|
|
|
|
|
Discord string `toml:"discord"`
|
2024-05-08 01:56:48 +02:00
|
|
|
}
|
|
|
|
|
|
2024-05-27 13:48:08 +02:00
|
|
|
// Discord
|
|
|
|
|
type DiscordMessage struct {
|
2024-05-08 01:56:48 +02:00
|
|
|
Username string `json:"username,omitempty"`
|
|
|
|
|
AvatarUrl string `json:"avatar_url,omitempty"`
|
|
|
|
|
Content string `json:"content,omitempty"`
|
|
|
|
|
Embeds []Embed `json:"embeds,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Embed struct {
|
|
|
|
|
Title string `json:"title,omitempty"`
|
|
|
|
|
Description string `json:"description,omitempty"`
|
2024-05-09 17:52:16 +02:00
|
|
|
Color int `json:"color,omitempty"`
|
2024-05-08 01:56:48 +02:00
|
|
|
}
|
2024-05-27 13:48:08 +02:00
|
|
|
|
|
|
|
|
// slack
|
|
|
|
|
type SlackMessage struct {
|
|
|
|
|
Text string `json:"text,omitempty"`
|
|
|
|
|
}
|