Sha256: 1303f28489f28afe81c0af0ca07da3103f3aeb5983812a6745daba976ad4177e
Contents?: true
Size: 782 Bytes
Versions: 26
Compression:
Stored size: 782 Bytes
Contents
package flapjack import "errors" // Event is a basic representation of a Flapjack event. // Find more at http://flapjack.io/docs/1.0/development/DATA_STRUCTURES type Event struct { Entity string `json:"entity"` Check string `json:"check"` Type string `json:"type"` State string `json:"state"` Summary string `json:"summary"` Time int64 `json:"time"` } // IsValid performs basic validations on the event data. func (e Event) IsValid() error { // FIXME(auxesis): provide validation errors for each failure if len(e.Entity) == 0 { return errors.New("no entity") } if len(e.Check) == 0 { return errors.New("no check") } if len(e.State) == 0 { return errors.New("no state") } if len(e.Summary) == 0 { return errors.New("no summary") } return nil }
Version data entries
26 entries across 26 versions & 1 rubygems