Skip to content

Commit

Permalink
added slack settings to customerConfigurations
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Oct 20, 2021
1 parent 15a9072 commit c7b3956
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions armotypes/configtypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type Settings struct {
PostureControlInputs map[string][]string `json:"postureControlInputs"`
PostureScanConfig PostureScanConfig `json:"postureScanConfig"`
VulnerabilityScanConfig VulnerabilityScanConfig `json:"vulnerabilityScanConfig"`
SlackConfigurations SlackSettings `json:"slackConfigurations,omitempty"`
}

type PostureScanConfig struct {
Expand Down
23 changes: 23 additions & 0 deletions armotypes/customerslackconfigurations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package armotypes

type SlackSettings struct {
Token string `json:"token"`
Alert2Channel `json:",inline"`
Notifications `json:"notifications"`
}

type Alert2Channel struct {
Critical []SlackChannel `json:"criticalChannels"`
Error []SlackChannel `json:"errorChannels"`
Info []SlackChannel `json:"infoChannels"`
}

type SlackChannel struct {
ChannelID string `json:"channelID"`
ChannelName string `json:"channelName"`
}

type Notifications struct {
PostureScan []string `json:"postureScan"`
PostureScoreAboveLastScan []string `json:"postureScoreAboveLastScan"`
}

0 comments on commit c7b3956

Please sign in to comment.