Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUpsertAllColumns ¶
func GetUpsertAllColumns(value interface{}) []string
GetUpsertAllColumns return all column names
func GetUpsertAppendColumns ¶
GetUpsertAppendColumns return all column names
Types ¶
type Hook ¶
type Hook struct { HookID string `form:"hook_id" json:"hook_id" gorm:"column:hook_id; type:varchar(32) not null default ''; primaryKey"` AlertName string `` /* 131-byte string literal not displayed */ Instance string `` /* 131-byte string literal not displayed */ Job string `form:"job" json:"job" gorm:"column:job; type:varchar(20) not null default ''"` Level string `form:"level" json:"level" gorm:"column:level; type:varchar(20) not null default ''"` Ignored string `` /* 134-byte string literal not displayed */ Status string `form:"status" json:"status" gorm:"column:status; type:varchar(10) not null default ''"` StartsAt *time.Time `` /* 189-byte string literal not displayed */ EndsAt *time.Time `form:"ends_at" json:"ends_at" gorm:"column:ends_at; type:datetime(3) null"` HookDetails []HookDetail `json:"hook_details" gorm:"foreignKey:HookID"` UpdatedAt time.Time `json:"updated_at"` }
Hook Hook
type HookDetail ¶
type HookDetail struct { ID int HookID string `json:"hook_id" gorm:"column:hook_id; type:varchar(32) not null default ''; index:ix_hookid"` Status string `json:"status" gorm:"column:status; type:varchar(10) not null default '';"` ReqJSON string `json:"req_json" gorm:"column:req_json; type:json not null"` Message string `json:"message" gorm:"column:message; type:text not null"` CreatedAt time.Time `json:"created_at"` }
HookDetail hook detail
type HookIgnore ¶
type HookIgnore struct { Instance string `form:"instance" json:"instance" gorm:"column:instance; type:varchar(32) not null default '*'; primaryKey"` AlertName string `form:"alert_name" json:"alert_name" gorm:"column:alert_name; type:varchar(32) not null default '*'; primaryKey"` Job string `form:"job" json:"job" gorm:"column:job; type:varchar(20) not null default '*'"` Status string `form:"status" json:"status" gorm:"column:status; type:varchar(10) not null default '*'; primaryKey"` Forever bool `form:"forever" json:"forever" gorm:"column:forever; type:tinyint not null default false"` StartsAt *time.Time `form:"starts_at" json:"starts_at" gorm:"column:starts_at; type:datetime not null"` EndsAt *time.Time `form:"ends_at" json:"ends_at" gorm:"column:ends_at; type:datetime not null"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
HookIgnore hook ignore target
func (*HookIgnore) GetList ¶
func (o *HookIgnore) GetList() (r []HookIgnore, err error)
func (*HookIgnore) Upsert ¶
func (o *HookIgnore) Upsert() (rows int64, err error)
Upsert insert on duplicate update
type Notification ¶
type Notification struct { Alertname string `form:"alertname" json:"alertname"` Instance string `form:"instance" json:"instance"` Level string `form:"level" json:"level"` Summary string `form:"summary" json:"summary"` Message string `form:"message" json:"message"` }
Notification notification alert - single alert
Click to show internal directories.
Click to hide internal directories.