-
Notifications
You must be signed in to change notification settings - Fork 0
/
objects.go
62 lines (56 loc) · 1.65 KB
/
objects.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
59
60
61
62
package db
import "time"
// Device pixelpusher object for DB
type Device struct {
ID int64 `sql:"id"`
Name string `sql:"name"`
Project int64 `sql:"project"`
LongID string `sql:"longID"`
Hostname string `sql:"hostname"`
Port int `sql:"port"`
Connector bool `sql:"connector"`
Key string `sql:"key"`
UseKey bool `sql:"use_key"`
}
// Channel pixelpusher object for DB
type Channel struct {
ID int `sql:"id"`
Name string `sql:"name"`
Type int `sql:"type"`
Project int64 `sql:"project"`
Device int64 `sql:"device"`
Color string `sql:"color"`
MaxLength int `sql:"max_length"`
}
// Matrix pixelpusher object for DB
type Matrix struct {
ID int64 `sql:"id"`
Device int64 `sql:"device"`
Channel int64 `sql:"channel"`
Project int64 `sql:"project"`
Width int `sql:"width"`
Height int `sql:"height"`
Type int `sql:"type"`
Coloring string `sql:"coloring"`
Offset int `sql:"offset"`
Brightness int `sql:"brightness"`
}
// Project pixelpusher object for DB
type Project struct {
ID int `sql:"id"`
Name string `sql:"name"`
Created time.Time `sql:"created"`
LastUpdate time.Time `sql:"last_update"`
Client string `sql:"client"`
Active bool `sql:"active"`
FrontendState string `sql:"frontend_state"`
}
// User pixelpusher object for DB
type User struct {
ID int `sql:"id"`
Name string `sql:"name"`
Username string `sql:"username"`
Password string `sql:"password"`
Created time.Time `sql:"created"`
LastLogin time.Time `sql:"last_login"`
}