-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
58 lines (48 loc) · 832 Bytes
/
models.go
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
55
56
57
58
package bellbox
import "time"
type Message struct {
Target string
Title string
Message string
Timestamp time.Time
Priority string
Sender string
}
type User struct {
User string
Password string
Admin bool `json:"-"` // ignored when submitted by clients
}
type UserToken struct {
User string
Token string
Timestamp time.Time
}
type Bell struct {
Id string // ignore clients but allow it to be returned
User string `json:"-"` // ignore clients
Name string
Type string
Key string
Enabled bool `json:"-"` // ignore clients
}
type UserReply struct {
Token string
}
type Id struct {
Id string
}
type DeleteBellRequest struct {
Id string
Secret string
}
type Bellringer struct {
Target string
Name string
Token string `json:"-"`
Urgent bool
RequestState int
}
type FilterRequest struct {
Type string
}