Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LocationServersNotifyBody string JobResultNotifyBody string )
notify template string
Functions ¶
This section is empty.
Types ¶
type APIEndPoint ¶
APIEndPoint is exported
func (*APIEndPoint) DoEvent ¶
func (endpoint *APIEndPoint) DoEvent(event *Event, data interface{})
DoEvent is exported
type EndPoint ¶
type EndPoint struct { Name string `yaml:"name"` URL string `yaml:"url"` Enabled bool `yaml:"enabled"` Sender string `yaml:"sender"` Host string `yaml:"host"` Port int `yaml:"port"` User string `yaml:"user"` Password string `yaml:"password"` }
EndPoint is exported
type Event ¶
type Event struct { ID string Type EventType Name string Error error ContactInfo []string Endpoints []IEndPoint // contains filtered or unexported fields }
Event is exported
type IEndPoint ¶
type IEndPoint interface {
DoEvent(event *Event, data interface{})
}
IEndPoint is exported sender endPoint interface
func NewSMTPEndpoint ¶
NewSMTPEndpoint is exported
type INotifyEndPointFactory ¶
type INotifyEndPointFactory interface { CreateAPIEndPoint(endpoint EndPoint) IEndPoint CreateSMTPEndPoint(endpoint EndPoint) IEndPoint }
INotifyEndPointFactory is exported
type JobResult ¶
type JobResult struct { JobName string Directory string Location string Server string Execat string IsSuccessd bool Content string Stdout string Errout string Execerr string }
JobResult is exported
type Notifications ¶
type Notifications struct {
EndPoints []EndPoint `yaml:"endpoints,omitempty"`
}
Notifications is exported
type NotifyEndPointFactory ¶
type NotifyEndPointFactory struct {
INotifyEndPointFactory
}
NotifyEndPointFactory is exported
func (*NotifyEndPointFactory) CreateAPIEndPoint ¶
func (factory *NotifyEndPointFactory) CreateAPIEndPoint(endpoint EndPoint) IEndPoint
CreateAPIEndPoint is exported
func (*NotifyEndPointFactory) CreateSMTPEndPoint ¶
func (factory *NotifyEndPointFactory) CreateSMTPEndPoint(endpoint EndPoint) IEndPoint
CreateSMTPEndPoint is exported
type NotifySender ¶
NotifySender is exported
func NewNotifySender ¶
func NewNotifySender(endPoints []EndPoint) *NotifySender
NewNotifySender is exported
func (*NotifySender) AddJobNotifyEvent ¶
func (sender *NotifySender) AddJobNotifyEvent(description string, watchJobNotify *WatchJobNotify)
AddJobNotifyEvent is exported
func (*NotifySender) AddLocationServersEvent ¶
func (sender *NotifySender) AddLocationServersEvent(description string, watchLocation *WatchLocation)
AddLocationServersEvent is exported
type SMTPEndPoint ¶
SMTPEndPoint is exported
func (*SMTPEndPoint) DoEvent ¶
func (endpoint *SMTPEndPoint) DoEvent(event *Event, data interface{})
DoEvent is exported
type WatchJobNotify ¶
WatchJobNotify is exported
type WatchLocation ¶
WatchLocation is exported
func (*WatchLocation) AddContactInfo ¶
func (location *WatchLocation) AddContactInfo(value string)
AddContactInfo is exported
Click to show internal directories.
Click to hide internal directories.