// Package constants define constant variable package constants // EvenvtType define event type type EvenvtType int const ( // EventGeneralHard define gereral hard event type EventGeneralHard EvenvtType = iota // EventGeneralPlatformSoft define gereral platform soft event type EventGeneralPlatformSoft // EventGeneralApplicationSoft define gereral application soft event type EventGeneralApplicationSoft // EventWarnHard define warn hard event type EventWarnHard // EventWarnPlatformSoft define warn platform soft event type EventWarnPlatformSoft // EventWarnApplicationSoft define warn application soft event type EventWarnApplicationSoft // EventCriticalHard define critical hard event type EventCriticalHard // EventCriticalPlatformSoft define critical platform soft event type EventCriticalPlatformSoft // EventCriticalApplicationSoft define critical application soft event type EventCriticalApplicationSoft ) // IsGeneral define fucn to check event type is general func IsGeneral(eventType EvenvtType) bool { return eventType < 3 } // IsWarning define fucn to check event type is warn func IsWarning(eventType EvenvtType) bool { return eventType >= 3 && eventType <= 5 } // IsCritical define fucn to check event type is critical func IsCritical(eventType EvenvtType) bool { return eventType >= 6 } const ( // EventFromStation define event from station type EventFromStation = "station" // EventFromPlatform define event from platform type EventFromPlatform = "platform" // EventFromOthers define event from others type EventFromOthers = "others" )