alert

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Action   string
	Settings Settings
}

type AlertPolicy

type AlertPolicy struct {
	Id    string
	Name  string
	Links []models.LinkEntity
}

type CreateReq

type CreateReq struct {
	Name     string `valid:"required"`
	Actions  []Action
	Triggers []Trigger
}

func (*CreateReq) Validate

func (c *CreateReq) Validate() error

type DeleteReq

type DeleteReq struct {
	Policy `argument:"composed" URIParam:"PolicyId" json:"-"`
}

type Entity

type Entity struct {
	Id       string
	Name     string
	Actions  []Action
	Triggers []Trigger
	Links    []models.LinkEntity
}

type GetReq

type GetReq struct {
	Policy `argument:"composed" URIParam:"PolicyId" json:"-"`
}

type ListRes

type ListRes struct {
	Items []Entity
	Links []models.LinkEntity
}

type Policy

type Policy struct {
	PolicyId   string
	PolicyName string
}

func (*Policy) GetNames

func (p *Policy) GetNames(cn base.Connection, property string) ([]string, error)

func (*Policy) InferID

func (p *Policy) InferID(cn base.Connection) error

func (*Policy) Validate

func (p *Policy) Validate() error

type Settings

type Settings struct {
	Recipients []string
}

type Trigger

type Trigger struct {
	Metric    string
	Duration  string
	Threshold float64
}

type UpdateReq

type UpdateReq struct {
	Policy   `argument:"composed" URIParam:"PolicyId" json:"-"`
	Name     string `valid:"required"`
	Actions  []Action
	Triggers []Trigger
}

func (*UpdateReq) Validate

func (u *UpdateReq) Validate() error

Jump to

Keyboard shortcuts

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