Documentation ¶
Index ¶
- func ToTime(timestampStr string) (time.Time, error)
- type AlertNotifyIndex
- type AlertNotifyIndexDB
- func (db *AlertNotifyIndexDB) CreateAlertNotifyIndex(alertNotifyIndex *AlertNotifyIndex) (int64, error)
- func (db *AlertNotifyIndexDB) GetAlertNotifyIndex(id int64) (*AlertNotifyIndex, error)
- func (db *AlertNotifyIndexDB) QueryAlertNotifyHistories(queryRequest *model.QueryAlertNotifyIndexRequest) ([]AlertNotifyIndex, int64, error)
- type DB
- type NotifyHistory
- type NotifyHistoryDB
- func (db *NotifyHistoryDB) CreateNotifyHistory(request *NotifyHistory) (*NotifyHistory, error)
- func (db *NotifyHistoryDB) FilterStatus(request *model.FilterStatusRequest) ([]*model.FilterStatusResult, error)
- func (db *NotifyHistoryDB) GetAlertNotifyHistory(id int64) (*NotifyHistory, error)
- func (db *NotifyHistoryDB) NotifyHistoryType(key string, orgId int, scopeId, scopeType string, startTime, endTime int64) ([]*model.NotifyValue, error)
- func (db *NotifyHistoryDB) QueryNotifyHistories(request *model.QueryNotifyHistoriesRequest) ([]NotifyHistory, int64, error)
- func (db *NotifyHistoryDB) QueryNotifyValue(key string, orgId int, scopeId, scopeType string, ...) ([]*model.NotifyValue, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlertNotifyIndex ¶
type AlertNotifyIndex struct { ID int64 `json:"id" gorm:"column:id"` NotifyID int64 `json:"notifyID" gorm:"column:notify_id"` NotifyName string `json:"notifyName" gorm:"column:notify_name"` Status string `json:"status" gorm:"column:status"` Channel string `json:"channel" gorm:"column:channel"` Attributes string `json:"attributes" gorm:"column:attributes"` ScopeType string `json:"scopeType" gorm:"column:scope_type"` ScopeID string `json:"scopeID" gorm:"column:scope_id"` OrgID int64 `json:"org_id" gorm:"column:org_id"` CreatedAt time.Time `json:"created_at" gorm:"column:created_at"` SendTime time.Time `json:"sendTime" gorm:"column:send_time"` AlertId int64 `json:"alertId,gorm:"column:alert_id"` }
func (AlertNotifyIndex) TableName ¶
func (AlertNotifyIndex) TableName() string
type AlertNotifyIndexDB ¶
func (*AlertNotifyIndexDB) CreateAlertNotifyIndex ¶
func (db *AlertNotifyIndexDB) CreateAlertNotifyIndex(alertNotifyIndex *AlertNotifyIndex) (int64, error)
func (*AlertNotifyIndexDB) GetAlertNotifyIndex ¶
func (db *AlertNotifyIndexDB) GetAlertNotifyIndex(id int64) (*AlertNotifyIndex, error)
func (*AlertNotifyIndexDB) QueryAlertNotifyHistories ¶
func (db *AlertNotifyIndexDB) QueryAlertNotifyHistories(queryRequest *model.QueryAlertNotifyIndexRequest) ([]AlertNotifyIndex, int64, error)
type DB ¶
type DB struct { *gorm.DB AlertNotifyIndexDB AlertNotifyIndexDB NotifyHistoryDB NotifyHistoryDB AlertNotifyDB alertdb.AlertNotifyDB }
type NotifyHistory ¶
type NotifyHistory struct { model.BaseModel NotifyName string `gorm:"size:150;index:idx_notify_name"` NotifyItemDisplayName string `gorm:"size:150"` Channel string `gorm:"size:150"` TargetData string `gorm:"type:text"` SourceData string `gorm:"type:text"` Status string `gorm:"size:150"` OrgID int64 `gorm:"index:idx_org_id"` SourceType string `gorm:"size:150"` SourceID string `gorm:"size:150"` ErrorMsg string `gorm:"type:text"` // 模块类型 cdp/workbench/monitor Label string `gorm:"size:150;index:idx_module"` ClusterName string }
func (*NotifyHistory) ToApiData ¶
func (notifyHistory *NotifyHistory) ToApiData() (*pb.NotifyHistory, error)
type NotifyHistoryDB ¶
func (*NotifyHistoryDB) CreateNotifyHistory ¶
func (db *NotifyHistoryDB) CreateNotifyHistory(request *NotifyHistory) (*NotifyHistory, error)
func (*NotifyHistoryDB) FilterStatus ¶
func (db *NotifyHistoryDB) FilterStatus(request *model.FilterStatusRequest) ([]*model.FilterStatusResult, error)
func (*NotifyHistoryDB) GetAlertNotifyHistory ¶
func (db *NotifyHistoryDB) GetAlertNotifyHistory(id int64) (*NotifyHistory, error)
func (*NotifyHistoryDB) NotifyHistoryType ¶
func (db *NotifyHistoryDB) NotifyHistoryType(key string, orgId int, scopeId, scopeType string, startTime, endTime int64) ([]*model.NotifyValue, error)
func (*NotifyHistoryDB) QueryNotifyHistories ¶
func (db *NotifyHistoryDB) QueryNotifyHistories(request *model.QueryNotifyHistoriesRequest) ([]NotifyHistory, int64, error)
func (*NotifyHistoryDB) QueryNotifyValue ¶
func (db *NotifyHistoryDB) QueryNotifyValue(key string, orgId int, scopeId, scopeType string, interval, startTime, endTime int64) ([]*model.NotifyValue, error)
Click to show internal directories.
Click to hide internal directories.