forked from gerald1248/timeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
74 lines (66 loc) · 2.08 KB
/
types.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
63
64
65
66
67
68
69
70
71
72
73
74
package timeline
import (
"github.com/fogleman/gg"
"image/color"
"time"
)
type Data struct {
Tasks []*Task `json:"tasks"`
MySettings *Settings `json:"settings"`
MyTheme *Theme `json:"theme"`
First, Last time.Time
Days int
FontSize, Scale float64
W, H, LabelW, ChartW, DayW, RowH float64
FrameBorderColor color.Color
FrameFillColor color.Color
StripeColorDark color.Color
StripeColorLight color.Color
GridColor color.Color
}
type Task struct {
Start string `json:"start"`
End string `json:"end"`
Label string `json:"label"`
Recur int `json:"recur"`
Milestones []string `json:"milestones"`
DateStamps []string `json:"dateStamps"`
StartTo []int `json:"startTo"`
EndTo []int `json:"endTo"`
StartTime, EndTime time.Time
BorderColor color.Color
FillColor color.Color
}
type Theme struct {
ColorScheme string `json:"colorScheme"`
BorderColor1 string `json:"borderColor1"`
FillColor1 string `json:"fillColor1"`
BorderColor2 string `json:"borderColor2"`
FillColor2 string `json:"fillColor2"`
FrameBorderColor string `json:"frameBorderColor"`
FrameFillColor string `json:"frameFillColor"`
StripeColorDark string `json:"stripeColorDark"`
StripeColorLight string `json:"stripeColorLight"`
GridColor string `json:"gridColor"`
}
type Settings struct {
Lang string `json:"lang"`
End string `json:"end"`
Zoom int `json:"zoom"`
HideDaysFrom int `json:"hideDaysFrom"`
HideWeeksFrom int `json:"hideWeeksFrom"`
}
type Result struct {
Message string
Code int
Context *gg.Context
}
type ShortResult struct {
Message string
Code int
}
type Locale struct {
Lang string `json:"lang"`
Layout string `json:"layout"`
Months [12]string `json:"months"`
}