model

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

add by vincent.zhang for pigeon

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDatabase

func InitDatabase()

Types

type ExtArg

type ExtArg struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type IM

type IM struct {
	Tos     string `json:"tos"`
	Content string `json:"content"`
}

func (*IM) String

func (this *IM) String() string

type M3Body

type M3Body struct {
	Metric       string `json:"metric"`
	DatasourceID int    `json:"datasourceId"`
	From         int64  `json:"from"`
	Step         int    `json:"step"`
	Source       string `json:"source"`
	To           int64  `json:"to"`
	Type         string `json:"type"`
}

type M3Chart

type M3Chart struct {
	Legend string `json:"legend"`
	Title  string `json:"title"`
}

type M3Value

type M3Value struct {
	Body  string  `json:"body"`
	Chart M3Chart `json:"chart"`
	URL   string  `json:"url"`
}

type Mail

type Mail struct {
	Tos     string `json:"tos"`
	Subject string `json:"subject"`
	Content string `json:"content"`
}

func (*Mail) String

func (this *Mail) String() string

type Pigeon

type Pigeon struct {
	Fid       int64     `json:"fid"`
	AlarmCode string    `json:"alarm_code"`
	Status    string    `json:"status"` // OK or PROBLEM
	Value     string    `json:"value"`
	Subject   string    `json:"subject"`
	Sms       string    `json:"sms"`
	Message   string    `json:"message"`
	Priority  int       `json:"priority"`
	Host      string    `json:"host"`
	HostName  string    `json:"hostname"`
	Domain    string    `json:"domain"`
	Transfer  string    `json:"transfer"`
	AlarmTime string    `json:"alarm_time"`
	ExtArgs   []*ExtArg `json:"ext_args"`
}

Event in redis, prepare to send to pigeon

func (*Pigeon) String

func (this *Pigeon) String() (string, error)

type PigeonAlarm

type PigeonAlarm struct {
	Fid       string    `json:"fid"`
	AlarmCode string    `json:"alarm_code"`
	Value     string    `json:"value"`
	Subject   string    `json:"subject"`
	Sms       string    `json:"sms"`
	Message   string    `json:"message"`
	Priority  string    `json:"priority"`
	Host      string    `json:"host"`
	HostName  string    `json:"hostname"`
	Domain    string    `json:"domain"`
	Transfer  string    `json:"transfer"`
	AlarmTime string    `json:"alarm_time"`
	ExtArgs   []*ExtArg `json:"ext_args"`
}

alarm event

type PigeonAlarmsData

type PigeonAlarmsData struct {
	PigeonElem *PigeonAlarmsElement `json:"pigeon"`
}

type PigeonAlarmsElement

type PigeonAlarmsElement struct {
	Alarms []*PigeonAlarm `json:"alarms"`
	App    *PigeonApp     `json:"app"`
}

type PigeonAlarmsSend

type PigeonAlarmsSend struct {
	Data        *PigeonAlarmsData `json:"data"`
	RequestType string            `json:"requestType"`
}

func (*PigeonAlarmsSend) String

func (this *PigeonAlarmsSend) String() (string, error)

type PigeonApp

type PigeonApp struct {
	Source string `json:"source"`
	Key    string `json:"key"`
}

type PigeonOK

type PigeonOK struct {
	Fid     string `json:"fid"`
	Status  string `json:"status"`
	Domain  string `json:"domain"`
	Host    string `json:"host"`
	EndTime string `json:"end_time"`
}

OK event

type PigeonOKData

type PigeonOKData struct {
	PigeonElem *PigeonOKElement `json:"pigeon"`
}

func (*PigeonOKData) String

func (this *PigeonOKData) String() (string, error)

type PigeonOKElement

type PigeonOKElement struct {
	Alarms []*PigeonOK `json:"alarms"`
	App    *PigeonApp  `json:"app"`
}

type Sms

type Sms struct {
	Tos     string `json:"tos"`
	Content string `json:"content"`
}

func (*Sms) String

func (this *Sms) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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