Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryEnum ¶
type CategoryEnum string
const ( SECURITY CategoryEnum = "SECURITY" HW_HEALTH CategoryEnum = "HW_HEALTH" SW_HEALTH CategoryEnum = "SW_HEALTH" )
type Notification ¶
type Notification struct { Id string `json:"id,omitempty"` // Generated by the system, users can ignore Slug string `json:"slug"` // A meaningful identifier provided by client Sender string `json:"sender"` Category CategoryEnum `json:"category"` Severity SeverityEnum `json:"severity"` Content string `json:"content"` Description string `json:"description,omitempty"` Status StatusEnum `json:"status,omitempty"` Labels []string `json:"labels,omitempty"` Created int `json:"created,omitempty"` // The creation timestamp Modified int `json:"modified,omitempty"` // The last modification timestamp }
Struct to represent a notification being sent to the notifications service
type NotificationsClient ¶
type NotificationsClient interface {
SendNotification(n Notification, ctx context.Context) error
}
Interface defining behavior for the notifications client
func NewNotificationsClient ¶
func NewNotificationsClient(url string) NotificationsClient
type SeverityEnum ¶
type SeverityEnum string
const ( CRITICAL SeverityEnum = "CRITICAL" NORMAL SeverityEnum = "NORMAL" )
type StatusEnum ¶
type StatusEnum string
const ( NEW StatusEnum = "NEW" PROCESSED StatusEnum = "PROCESSED" ESCALATED StatusEnum = "ESCALATED" )
Click to show internal directories.
Click to hide internal directories.