-
Notifications
You must be signed in to change notification settings - Fork 1
/
models.go
59 lines (47 loc) · 1.05 KB
/
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
59
package crud
// Menu represents a menu item.
type Menu struct {
Order int
Idenifier string
Title string
URL string
FavIcon string
}
// EditData represents the data needed to render the edit template.
type EditData struct {
Title string
Description string
Row Row
EntityName string
EntityID string
IsEdit bool
BaseContextData
}
// ListData represents the data needed to render the list template.
type ListData struct {
Title string
Description string
EntityName string
Columns []string
Rows []Row
BaseContextData
}
// SearchResult represents the search results.
type SearchResult struct {
Title string
Description string
Link string
}
// SearchData represents the data needed to render the search template.
type SearchData struct {
Query string
ResultCount int
BaseContextData
Results []SearchResult
}
// BaseContextData represents the data needed to render the base template.
type BaseContextData struct {
ShowSearchBar bool
BaseURL string
Menus []Menu
}