v0.0.0-...-689a9a2 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2020 License: Apache-2.0 Imports: 12 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type AlarmServer

type AlarmServer struct {
	// contains filtered or unexported fields

func NewAlarmServer

func NewAlarmServer(confFileName string, pgConnInfo string,
	notifyChannel string) (*AlarmServer, error)

func (*AlarmServer) Debug

func (as *AlarmServer) Debug(format string, args ...interface{})

func (*AlarmServer) DispatchMessage

func (as *AlarmServer) DispatchMessage(rcpt Contact) []DispatchResult

func (*AlarmServer) GetContact

func (as *AlarmServer) GetContact(id int) (Contact, error)

func (*AlarmServer) ProcessDispatcherStatus

func (as *AlarmServer) ProcessDispatcherStatus(
	status []DispatchResult,
) (string, string)

func (*AlarmServer) ProcessNotifications

func (as *AlarmServer) ProcessNotifications()

func (*AlarmServer) SendFax

func (as *AlarmServer) SendFax(to, subject, body string) error

func (*AlarmServer) SendSms

func (as *AlarmServer) SendSms(to, body string) error

func (*AlarmServer) SendVoicemail

func (as *AlarmServer) SendVoicemail(to, body string) error

func (*AlarmServer) UpdateMsgStatus

func (as *AlarmServer) UpdateMsgStatus(id int, status, comment string)

type Contact

type Contact struct {
	Recipient, Body, Subject, Email string
	Sms, Phone, Fax, Mqtt           string
	RawData                         RawData `json:"raw_data"`
	Logonly                         bool

type DispatchResult

type DispatchResult struct {
	// contains filtered or unexported fields

type RawData

type RawData struct {
	Type      string  `json:"type"`
	Time      string  `json:"time"`
	Lan       float32 `json:"lat"`
	Lon       float32 `json:"lon"`
	AlarmArea string  `json:"alarmarea"`
	Group     string  `json:"group"`
	Radius    float32 `json:"radius"`
	Threshold int     `json:"threshold"`
	Count     int     `json:"count"`
	Density   float32 `json:"density"`
	Minutes   int     `json:"minutes"`

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL