Documentation ¶
Index ¶
- func DB() database.Database
- func Samples() error
- func SetDB(database database.Database)
- type ColumnIDInterfacer
- type FailSort
- type Failure
- type Failurer
- func (f Failurer) Count() int
- func (f Failurer) Db() database.Database
- func (f Failurer) DeleteAll() error
- func (f Failurer) First() *Failure
- func (f Failurer) Last() *Failure
- func (f Failurer) LastAmount(amount int) []*Failure
- func (f Failurer) List() []*Failure
- func (f Failurer) Since(t time.Time) []*Failure
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ColumnIDInterfacer ¶
type Failure ¶
type Failure struct { Id int64 `gorm:"primary_key;column:id" json:"id"` Issue string `gorm:"column:issue" json:"issue"` Method string `gorm:"column:method" json:"method,omitempty"` MethodId int64 `gorm:"column:method_id" json:"method_id,omitempty"` ErrorCode int `gorm:"column:error_code" json:"error_code"` Service int64 `gorm:"index;column:service" json:"-"` Checkin int64 `gorm:"index;column:checkin" json:"-"` PingTime int64 `gorm:"column:ping_time" json:"ping"` Reason string `gorm:"column:reason" json:"reason,omitempty"` CreatedAt time.Time `gorm:"column:created_at" json:"created_at"` }
Failure is a failed attempt to check a service. Any a service does not meet the expected requirements, a new Failure will be inserted into Db.
func (*Failure) AfterCreate ¶ added in v0.90.49
func (f *Failure) AfterCreate()
func (*Failure) AfterDelete ¶ added in v0.90.53
func (f *Failure) AfterDelete()
func (*Failure) AfterUpdate ¶ added in v0.90.53
func (f *Failure) AfterUpdate()
type Failurer ¶
type Failurer struct {
// contains filtered or unexported fields
}
func AllFailures ¶
func AllFailures(obj ColumnIDInterfacer) Failurer
func (Failurer) LastAmount ¶
Click to show internal directories.
Click to hide internal directories.