summaryrefslogtreecommitdiff
path: root/app/struct.go
blob: fdbbcedd817f8e3f31debd28195565aff89fce34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package main

import (
	"time"
)

/* Maybe worth saving uptime history? */

type Host struct {
	Id   int64
	Host string
	Url  string
	//	Protocoll  string // e.g. http
	Monitored   bool // disable monitoring on error
	Private     bool
	Status      string
	StatusCode  int64
	Success     bool
	Reason      string // Connection failure
	Description string
	/*
		Date      time.Time
		Include   string // Website must include this string
		Except    string // Website must not include this string
		Alert     bool   // True to send alert on failure
		DeletedAt time.Time
	*/
	CreatedAt time.Time
	UpdatedAt time.Time
	Class     string
}

type User struct {
	Id        int64
	Name      string
	Email     string
	Password  string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Sticky struct {
	Id     int64
	Sticky string
}

type Messages struct {
	Success     []interface{}
	Error       []interface{}
	Hosts       []Host
	moreScripts []string
	NextRun     time.Time
	Sticky      string
}