-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
127 lines (112 loc) · 2.34 KB
/
types.go
File metadata and controls
127 lines (112 loc) · 2.34 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
package main
import (
"html/template"
"time"
)
type LinkListElem struct {
Pretty string
Link string
}
type CommitListElem struct {
Link string
Msg string
Name string
Date time.Time
AbbrevHash string
}
type FileListElem struct {
Name string
Link string
IsFile bool
Mode string
Size int
LastModified time.Time
LastCommitMsg string
LastCommitLink string
}
type TreeItem struct {
Name string
Link string
IsFile bool
Path string
Children []TreeItem
}
type FlatTreeItem struct {
Name string
Link string
IsFile bool
Depth int
}
type Contributor struct {
Name string
Email string
}
type IndexRenderData struct {
GlobalData *GlobalRenderData
ReadmeFile FileViewRenderData
ReadmeFound bool
ReadmeIsMarkdown bool
ReadmeHTML template.HTML
LicenseFile FileViewRenderData
LicenseFound bool
LatestCommit CommitListElem
CommitFound bool
RootTree []FileListElem
TreeFound bool
Contributors []Contributor
ContributorsCt int
Branches []RefListElem
Tags []RefListElem
}
type LogRenderData struct {
GlobalData *GlobalRenderData
Commits []CommitListElem
}
type TreeRenderData struct {
GlobalData *GlobalRenderData
Files []FileListElem
CurrentPath string
ParentPath string
HasParent bool
LatestCommit CommitListElem
CommitFound bool
FullTree []FlatTreeItem
}
type FileViewRenderData struct {
Name string
Lines []template.HTML
LastCommitMsg string
LastCommitLink string
LastCommitDate time.Time
LastCommitAuthor string
RepoName string
CurrentPath string
}
type FileRenderData struct {
GlobalData *GlobalRenderData
FileViewData FileViewRenderData
FullTree []FlatTreeItem
CurrentPath string
}
type CommitRenderData struct {
GlobalData *GlobalRenderData
Id string
Author string
Mail string
Parents []string
HasAnyParents bool
Date time.Time
MsgLines []string
DiffStatLines []template.HTML
}
type RefListElem struct {
Name string
Type string // "branch" or "tag"
CommitHash string
LogLink string
}
type RefsRenderData struct {
GlobalData *GlobalRenderData
Branches []RefListElem
Tags []RefListElem
}