Documentation ¶
Index ¶
Constants ¶
View Source
const Version string = "6.2.1"
Version holds the current version of gocron
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCrons ¶
AccountCrons defines all crons for a given account
type BackendVersion ¶
type BackendVersion struct { Version string `json:"version"` Database struct { Type string `json:"type"` Version string `json:"version"` } `json:"database"` }
BackendVersion defines the backend api json response for /version
type Cron ¶
type Cron struct { Cronname string `json:cronname` // Name of the cronjob Account string `json:account` // Account the job belongs to Email string `json:email` // Address to send alerts to Frequency int `json:frequency` // How often a job should check in Site bool `json:site` // Not implemented, required for database backward compatability Ipaddress string // Source IP address Lastruntime int // Unix timestamp Alerted bool // set to true if an alert has already been thrown }
Cron defines a cronjob
func (Cron) CheckLength ¶
CheckLength validates that parameters are present
func (Cron) ValidateParams ¶
ValidateParams validates SQL variables
type Gocron ¶
type Gocron struct { Dbfqdn string `yaml:"dbfqdn"` Dbport string `yaml:"dbport"` Dbuser string `yaml:"dbuser"` Dbpass string `yaml:"dbpass"` Dbdatabase string `yaml:"dbdatabase"` Interval int `yaml:"interval"` SlackHookURL string `yaml:"slackhookurl"` SlackChannel string `yaml:"slackchannel"` }
Gocron defines a global configuration used at runtime
func (Gocron) StartBackend ¶
StartBackend calls checkCronStatus() on a set interval
func (Gocron) StartFrontend ¶
StartFrontend starts the gocron frontend server
Click to show internal directories.
Click to hide internal directories.