Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
gorm.Model
Type ActionType `json:"type"`
TriggerID uint `json:"trigger_id" gorm:"not null"`
}
type AddTriggerDetailRequest ¶
type AddTriggerRequest ¶
type AddTriggerRequest struct {
ContainerId string `json:"container_id" form:"container_id" query:"container_id"`
Triggers []AddTriggerDetailRequest `json:"triggers" form:"triggers" query:"triggers"`
}
type DeleteTriggerRequest ¶
type DeleteTriggerRequest struct {
TriggerId string `json:"trigger_id" form:"trigger_id" query:"trigger_id"`
}
type MonitoredContainer ¶
type MonitoredContainer struct {
gorm.Model
Host string `json:"host"`
ContainerId string `json:"container_id"`
Active bool `json:"active"`
Triggers []Trigger `json:"triggers" gorm:"foreignKey:MonitoredContainerID"`
}
func (MonitoredContainer) TableName ¶
func (MonitoredContainer) TableName() string
type Trigger ¶
type Trigger struct {
gorm.Model
MonitoredContainerID uint `json:"monitored_container_id" gorm:"not null"`
Type string `json:"type"`
Criteria string `json:"criteria" gorm:"not null"`
Active bool `json:"active"`
Actions []Action `json:"actions" gorm:"foreignKey:TriggerID"`
Logs []TriggerLog `json:"logs" gorm:"foreignKey:TriggerID"`
Results []TriggerResult `json:"results" gorm:"foreignKey:TriggerID"`
}
type TriggerLog ¶
func (TriggerLog) TableName ¶
func (TriggerLog) TableName() string
type TriggerResult ¶
type TriggerResult struct {
gorm.Model
TriggerID uint `json:"trigger_id" gorm:"not null"`
OccurrenceCount uint `json:"occurrence_count" gorm:"not null"`
StartDate time.Time `json:"start_date" gorm:"not null"`
EndDate time.Time `json:"end_date" gorm:"not null"`
}
func (TriggerResult) TableName ¶
func (TriggerResult) TableName() string
type TriggerType ¶
type TriggerType string
const ( TriggerTypeLogTypeMatch TriggerType = "log_type_match" TriggerTypeTextMatch TriggerType = "text_match" TriggerTypeObjectMatch TriggerType = "object_match" )
Click to show internal directories.
Click to hide internal directories.