failures

package
v0.90.74 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB() database.Database

func Samples

func Samples() error

func SetDB

func SetDB(database database.Database)

Types

type ColumnIDInterfacer

type ColumnIDInterfacer interface {
	FailuresColumnID() (string, int64)
}

type FailSort

type FailSort []Failure

func (FailSort) Len

func (s FailSort) Len() int

func (FailSort) Less

func (s FailSort) Less(i, j int) bool

func (FailSort) Swap

func (s FailSort) Swap(i, j int)

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 Example added in v0.90.51

func Example() Failure

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) AfterFind added in v0.90.53

func (f *Failure) AfterFind()

func (*Failure) AfterUpdate added in v0.90.53

func (f *Failure) AfterUpdate()

func (*Failure) Create

func (f *Failure) Create() error

func (*Failure) Delete

func (f *Failure) Delete() error

func (*Failure) Update

func (f *Failure) Update() error

type Failurer

type Failurer struct {
	// contains filtered or unexported fields
}

func AllFailures

func AllFailures(obj ColumnIDInterfacer) Failurer

func Since

func Since(t time.Time, obj ColumnIDInterfacer) Failurer

func (Failurer) Count

func (f Failurer) Count() int

func (Failurer) Db

func (f Failurer) Db() database.Database

func (Failurer) DeleteAll

func (f Failurer) DeleteAll() error

func (Failurer) First

func (f Failurer) First() *Failure

func (Failurer) Last

func (f Failurer) Last() *Failure

func (Failurer) LastAmount

func (f Failurer) LastAmount(amount int) []*Failure

func (Failurer) List

func (f Failurer) List() []*Failure

func (Failurer) Since

func (f Failurer) Since(t time.Time) []*Failure

Jump to

Keyboard shortcuts

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