Documentation
¶
Index ¶
- func GetQueryConFilter(in EventApiInputs) string
- func GetSelectConFilter(in EventApiInputs) string
- func Init()
- type EventApiInputs
- type EventCases
- type EventCount
- type EventFaultInfos
- type EventInfo
- type EventReceiver
- type EventStore
- func (store *EventStore) GetEventByID(id uint) (EventInfo, error)
- func (store *EventStore) GetEventCount(in EventApiInputs) (EventCount, error)
- func (store *EventStore) GetEventsFaultsInfo(in EventApiInputs) ([]EventFaultInfos, error)
- func (store *EventStore) GetEventsInfo(in EventApiInputs) ([]EventInfo, error)
- func (store *EventStore) GetFaultsInfo(id uint) ([]FaultInfos, error)
- func (store *EventStore) InsertAlarmEvent(eve *coommonModel.Event) error
- type Events
- type FaultInfos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetQueryConFilter ¶
func GetQueryConFilter(in EventApiInputs) string
func GetSelectConFilter ¶
func GetSelectConFilter(in EventApiInputs) string
Types ¶
type EventApiInputs ¶
type EventApiInputs struct { UserName string `json:"username"` Uic []string `json:"uic"` StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` Priority []int `json:"priority"` Status string `json:"status"` Endpoint string `json:"endpoint"` Counter string `json:"counter"` //是否包含故障,包含则传递fault=have HaveFault bool `json:"have_fault"` //event type, 未恢复报警、历史报警 NowStatus bool `json:"now_event_status"` Limit int `json:"limit"` Offset int `json:"offset"` }
type EventCases ¶
type EventCases struct { gorm.Model EventCaseID string `json:"eventcase_id"` Endpoint string `json:"endpoint"` Counter string `json:"counter"` Func string `json:"func"` Cond string `json:"cond"` Note string `json:"note"` MaxStep int `json:"step"` CurrentStep int `json:"current_step"` Priority int `json:"priority"` Status string `json:"status"` //记录第一次(CURRENT_STEP=1) PROBLEM时间,OK后再PROBLEM被更新 EventTs string `json:"event_ts"` //记录每次被更新的时间 UpdateAt string `json:"update_at"` ClosedAt string `json:"closed_at"` ClosedNote string `json:"closed_note"` UserModified int64 `json:"user_modified"` TplCreator string `json:"tpl_creator"` ActionConfigID int64 `json:"action_config_id"` ExpressionID int `json:"expression_id"` StrategyID int `json:"strategy_id"` TemplateID int `json:"template_id"` ProcessNote int64 `json:"process_note"` ProcessStatus string `json:"process_status"` }
func (EventCases) TableName ¶
func (EventCases) TableName() string
type EventFaultInfos ¶
type EventFaultInfos struct { Event EventInfo `json:"event"` Faults []FaultInfos `json:"faults"` }
type EventInfo ¶
type EventInfo struct { ID uint `json:"event_id"` EventCaseID string `json:"eventcase_id"` Endpoint string `json:"endpoint"` Counter string `json:"counter"` Func string `json:"func"` Cond string `json:"cond"` Note string `json:"note"` MaxStep int `json:"max_step"` CurrentStep int `json:"current_step"` Priority int `json:"priority"` Status string `json:"status"` EventTs string `json:"event_ts"` TplCreator string `json:"template_creator"` ExpressionID int `json:"expression_id"` StrategyID int `json:"strategy_id"` TemplateID int `json:"template_id"` }
告警事件信息
type EventReceiver ¶
type EventReceiver struct { gorm.Model EventID uint `json:"event_id"` ActionConfigID int64 `json:"action_config_id"` Uic string `json:"uic"` User string `json:"user"` EventTs string `json:"event_ts"` }
func (EventReceiver) TableName ¶
func (EventReceiver) TableName() string
type EventStore ¶
var Store *EventStore
func NewEventStore ¶
func NewEventStore(db *gorm.DB) *EventStore
func (*EventStore) GetEventByID ¶
func (store *EventStore) GetEventByID(id uint) (EventInfo, error)
func (*EventStore) GetEventCount ¶
func (store *EventStore) GetEventCount(in EventApiInputs) (EventCount, error)
func (*EventStore) GetEventsFaultsInfo ¶
func (store *EventStore) GetEventsFaultsInfo(in EventApiInputs) ([]EventFaultInfos, error)
func (*EventStore) GetEventsInfo ¶
func (store *EventStore) GetEventsInfo(in EventApiInputs) ([]EventInfo, error)
func (*EventStore) GetFaultsInfo ¶
func (store *EventStore) GetFaultsInfo(id uint) ([]FaultInfos, error)
func (*EventStore) InsertAlarmEvent ¶
func (store *EventStore) InsertAlarmEvent(eve *coommonModel.Event) error
type Events ¶
type FaultInfos ¶
Click to show internal directories.
Click to hide internal directories.