Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertManagerEventDAO ¶
type AlertManagerEventDAO interface {
GetMonitorAlertEventById(ctx context.Context, id int) (*model.MonitorAlertEvent, error)
SearchMonitorAlertEventByName(ctx context.Context, name string) ([]*model.MonitorAlertEvent, int64, error)
GetMonitorAlertEventList(ctx context.Context, req *model.GetMonitorAlertEventListReq) ([]*model.MonitorAlertEvent, int64, error)
EventAlertClaim(ctx context.Context, event *model.MonitorAlertEvent) error
GetAlertEventByID(ctx context.Context, id int) (*model.MonitorAlertEvent, error)
UpdateAlertEvent(ctx context.Context, alertEvent *model.MonitorAlertEvent) error
SendMessageToGroup(ctx context.Context, url string, message string) error
GetMonitorAlertEventTotal(ctx context.Context) (int, error)
}
func NewAlertManagerEventDAO ¶
type AlertManagerOnDutyDAO ¶
type AlertManagerOnDutyDAO interface {
// 值班组管理
GetMonitorOnDutyList(ctx context.Context, req *model.GetMonitorOnDutyGroupListReq) ([]*model.MonitorOnDutyGroup, int64, error)
CreateMonitorOnDutyGroup(ctx context.Context, group *model.MonitorOnDutyGroup) error
GetMonitorOnDutyGroupByID(ctx context.Context, id int) (*model.MonitorOnDutyGroup, error)
UpdateMonitorOnDutyGroup(ctx context.Context, group *model.MonitorOnDutyGroup) error
DeleteMonitorOnDutyGroup(ctx context.Context, id int) error
CheckMonitorOnDutyGroupExists(ctx context.Context, group *model.MonitorOnDutyGroup) (bool, error)
// 换班记录管理
CreateMonitorOnDutyGroupChange(ctx context.Context, change *model.MonitorOnDutyChange) error
GetMonitorOnDutyChangesByGroupAndTimeRange(ctx context.Context, groupID int, startTime, endTime string) ([]*model.MonitorOnDutyChange, int64, error)
// 值班历史管理
CreateMonitorOnDutyHistory(ctx context.Context, history *model.MonitorOnDutyHistory) error
GetMonitorOnDutyHistoryByGroupIDAndDay(ctx context.Context, groupID int, day string) (*model.MonitorOnDutyHistory, error)
GetMonitorOnDutyHistoryByGroupIDAndTimeRange(ctx context.Context, groupID int, startTime, endTime string) ([]*model.MonitorOnDutyHistory, error)
GetMonitorOnDutyHistoryList(ctx context.Context, req *model.GetMonitorOnDutyHistoryReq) ([]*model.MonitorOnDutyHistory, int64, error)
ExistsMonitorOnDutyHistory(ctx context.Context, groupID int, day string) (bool, error)
GetMonitorOnDutyGroupChangeList(ctx context.Context, req *model.GetMonitorOnDutyGroupChangeListReq) ([]*model.MonitorOnDutyChange, int64, error)
}
AlertManagerOnDutyDAO 值班组数据访问接口
type AlertManagerPoolDAO ¶
type AlertManagerPoolDAO interface {
GetMonitorAlertManagerPoolList(ctx context.Context, req *model.GetMonitorAlertManagerPoolListReq) ([]*model.MonitorAlertManagerPool, int64, error)
CreateMonitorAlertManagerPool(ctx context.Context, monitorAlertManagerPool *model.MonitorAlertManagerPool) error
UpdateMonitorAlertManagerPool(ctx context.Context, monitorAlertManagerPool *model.MonitorAlertManagerPool) error
DeleteMonitorAlertManagerPool(ctx context.Context, id int) error
GetAlertPoolByID(ctx context.Context, poolID int) (*model.MonitorAlertManagerPool, error)
CheckMonitorAlertManagerPoolExists(ctx context.Context, alertManagerPool *model.MonitorAlertManagerPool) (bool, error)
CheckAlertIpExists(ctx context.Context, req *model.MonitorAlertManagerPool) error
}
func NewAlertManagerPoolDAO ¶
func NewAlertManagerPoolDAO(db *gorm.DB, l *zap.Logger) AlertManagerPoolDAO
type AlertManagerRecordDAO ¶
type AlertManagerRecordDAO interface {
GetMonitorRecordRuleByPoolId(ctx context.Context, poolId int) ([]*model.MonitorRecordRule, int64, error)
GetMonitorRecordRuleList(ctx context.Context, req *model.GetMonitorRecordRuleListReq) ([]*model.MonitorRecordRule, int64, error)
CreateMonitorRecordRule(ctx context.Context, recordRule *model.MonitorRecordRule) error
GetMonitorRecordRuleById(ctx context.Context, id int) (*model.MonitorRecordRule, error)
UpdateMonitorRecordRule(ctx context.Context, recordRule *model.MonitorRecordRule) error
DeleteMonitorRecordRule(ctx context.Context, ruleID int) error
CheckMonitorRecordRuleNameExists(ctx context.Context, recordRule *model.MonitorRecordRule) (bool, error)
}
type AlertManagerRuleDAO ¶
type AlertManagerRuleDAO interface {
GetMonitorAlertRuleByPoolID(ctx context.Context, poolID int) ([]*model.MonitorAlertRule, int64, error)
GetMonitorAlertRuleList(ctx context.Context, req *model.GetMonitorAlertRuleListReq) ([]*model.MonitorAlertRule, int64, error)
CreateMonitorAlertRule(ctx context.Context, monitorAlertRule *model.MonitorAlertRule) error
GetMonitorAlertRuleByID(ctx context.Context, id int) (*model.MonitorAlertRule, error)
UpdateMonitorAlertRule(ctx context.Context, monitorAlertRule *model.UpdateMonitorAlertRuleReq) error
DeleteMonitorAlertRule(ctx context.Context, ruleID int) error
GetAssociatedResourcesBySendGroupID(ctx context.Context, sendGroupID int) ([]*model.MonitorAlertRule, int64, error)
}
func NewAlertManagerRuleDAO ¶
type AlertManagerSendDAO ¶
type AlertManagerSendDAO interface {
GetMonitorSendGroupByPoolID(ctx context.Context, poolID int) ([]*model.MonitorSendGroup, int64, error)
GetMonitorSendGroupByOnDutyGroupID(ctx context.Context, onDutyGroupID int) ([]*model.MonitorSendGroup, int64, error)
GetMonitorSendGroupList(ctx context.Context, req *model.GetMonitorSendGroupListReq) ([]*model.MonitorSendGroup, int64, error)
GetMonitorSendGroupByID(ctx context.Context, id int) (*model.MonitorSendGroup, error)
CreateMonitorSendGroup(ctx context.Context, monitorSendGroup *model.MonitorSendGroup) error
UpdateMonitorSendGroup(ctx context.Context, monitorSendGroup *model.MonitorSendGroup) error
DeleteMonitorSendGroup(ctx context.Context, id int) error
CheckMonitorSendGroupExists(ctx context.Context, sendGroup *model.MonitorSendGroup) (bool, error)
CheckMonitorSendGroupNameExists(ctx context.Context, sendGroup *model.MonitorSendGroup) (bool, error)
GetMonitorSendGroups(ctx context.Context) ([]*model.MonitorSendGroup, int64, error)
}
func NewAlertManagerSendDAO ¶
func NewAlertManagerSendDAO(db *gorm.DB, l *zap.Logger) AlertManagerSendDAO
Click to show internal directories.
Click to hide internal directories.