File size: 855 Bytes
2196bfe
 
 
 
 
 
bb3cd77
 
2196bfe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package models

import "gorm.io/gorm"

type Monitor struct {
	gorm.Model
	DeletedAt      gorm.DeletedAt `gorm:"index"`
	Name           string         `json:"name"`
	URL            string `json:"url"`
	Interval       uint   `json:"interval"` // Interval in seconds
	Status         string `json:"status"`   // "up", "down", "pending"
	Timeout        uint   `json:"timeout"`
	Retries        uint   `json:"retries"`
	RetryInterval  uint   `json:"retryInterval"`
	IgnoreTLS      bool   `json:"ignoreTls"`
	HttpMethod     string `json:"httpMethod"`
	HttpBody       string `json:"httpBody"`
	HttpHeaders    string `json:"httpHeaders"`
	AuthMethod     string `json:"authMethod"`
	AuthUsername   string `json:"authUsername"`
	AuthPassword   string `json:"authPassword"`
	Delay          uint   `json:"delay"` // Delay in seconds before check
}