alarm

package
v4.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alarm

type Alarm struct {
	Id int64 `json:"id"`

	ProductId string `json:"product_id,omitempty" xorm:"index"`
	ProjectId string `json:"project_id,omitempty" xorm:"index"`
	SpaceId   string `json:"space_id,omitempty" xorm:"index"`
	DeviceId  string `json:"device_id,omitempty" xorm:"index"`

	Product string `json:"product,omitempty" xorm:"<-"`
	Project string `json:"project,omitempty" xorm:"<-"`
	Space   string `json:"space,omitempty" xorm:"<-"`
	Device  string `json:"device,omitempty" xorm:"<-"`

	Level   uint   `json:"level,omitempty"`
	Type    string `json:"type,omitempty"`
	Title   string `json:"title,omitempty"`
	Message string `json:"message,omitempty"`

	Read    bool      `json:"read,omitempty"`
	Created time.Time `json:"created,omitempty" xorm:"created"`
}

type Validator

type Validator struct {
	Expression  string `json:"expression"`
	Type        string `json:"type"`
	Title       string `json:"title"`
	Level       uint   `json:"level"`
	Template    string `json:"template"`
	Delay       uint   `json:"delay,omitempty"`        //延迟时间s
	Repeat      bool   `json:"repeat,omitempty"`       //重启报警
	RepeatDelay uint   `json:"repeat_delay,omitempty"` //再次提醒间隔s
	RepeatTotal uint   `json:"repeat_total,omitempty"` //总提醒次数
	// contains filtered or unexported fields
}

func (*Validator) Compile added in v4.0.18

func (v *Validator) Compile() (err error)

func (*Validator) Validate

func (v *Validator) Validate(values map[string]any) bool

Jump to

Keyboard shortcuts

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