Versions in this module Expand all Collapse all v0 v0.0.8 Jan 29, 2016 v0.0.7 Jan 28, 2016 Changes in this version + const MaxProjectNameLen + const MaxRulePatternLen + const MaxUserNameLen + var ErrProjectNameEmpty = errors.New("project name is empty") + var ErrProjectNameTooLong = errors.New("project name is too long") + var ErrRulePatternContainsSpace = errors.New("rule pattern contains spaces") + var ErrRulePatternEmpty = errors.New("rule pattern is empty") + var ErrRulePatternFormat = errors.New("rule pattern format is invalid") + var ErrRulePatternTooLong = errors.New("rule pattern is too long") + var ErrUserEmailEmpty = errors.New("user email is empty") + var ErrUserEmailFormat = errors.New("user email format is invalid") + var ErrUserNameEmpty = errors.New("user name is empty") + var ErrUserNameTooLong = errors.New("user name is too long") + var ErrUserPhoneFormat = errors.New("user phone should contains 10 or 11 numbers") + var ErrUserPhoneLen = errors.New("user phone length should be 10 or 11") + func ValidateProjectName(name string) error + func ValidateRulePattern(pattern string) error + func ValidateUserEmail(email string) error + func ValidateUserName(name string) error + func ValidateUserPhone(phone string) error type Rule + NumMetrics int + TrendDown bool + TrendUp bool + func (rule *Rule) SetNumMetrics(n int) v0.0.6 Jan 26, 2016 v0.0.5 Jan 22, 2016 v0.0.4 Jan 21, 2016 Changes in this version + const WhenTrendDown + const WhenTrendDownAndValueLt + const WhenTrendUp + const WhenTrendUpAndValueGt + const WhenValueGt + const WhenValueLt + type Index struct + Average float64 + Name string + Score float64 + Stamp uint32 + func (c *Index) Lock() + func (c *Index) RLock() + func (c *Index) RUnlock() + func (c *Index) Share() + func (c *Index) Unlock() + func (idx *Index) Copy() *Index + func (idx *Index) CopyTo(i *Index) + func (idx *Index) Equal(i *Index) bool + func (idx *Index) WriteMetric(m *Metric) + type Metric struct + Average float64 + Name string + Score float64 + Stamp uint32 + TestedRules []*Rule + Value float64 + func (m *Metric) IsAnomalous() bool + func (m *Metric) IsAnomalousTrendDown() bool + func (m *Metric) IsAnomalousTrendUp() bool + func (m *Metric) IsTrendDown() bool + func (m *Metric) IsTrendUp() bool + type Project struct + ID int + Name string + Rules []*Rule + Users []*User + type Rule struct + ID int + Pattern string + ProjectID int + Repr string + ThresholdMax float64 + ThresholdMin float64 + TrustLine float64 + When int + func (c *Rule) Lock() + func (c *Rule) RLock() + func (c *Rule) RUnlock() + func (c *Rule) Share() + func (c *Rule) Unlock() + func (rule *Rule) BuildRepr() + func (rule *Rule) Copy() *Rule + func (rule *Rule) CopyTo(r *Rule) + func (rule *Rule) Equal(r *Rule) bool + func (rule *Rule) IsValid() bool + func (rule *Rule) Test(m *Metric, cfg *config.Config) bool + type State struct + Average float64 + Count uint32 + StdDev float64 + type User struct + Email string + EnableEmail bool + EnablePhone bool + ID int + Name string + Phone string + Projects []*Project + Universal bool v0.0.3 Jan 18, 2016 v0.0.2 Jan 13, 2016 v0.0.1 Jan 7, 2016