blob: f9a79b2c19bf9032e9fb2ae0de06a17462251667 (
plain)
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
|
package grilist
import (
"database/sql"
"fagott.pw/charakterin"
"fagott.pw/grilist/frontend"
"github.com/julienschmidt/httprouter"
_ "github.com/lib/pq"
)
// Grilist struct
type Grilist struct {
Config Config
Renderer *frontend.Renderer
Charakterin *charakterin.Charakterin
DB *sql.DB
Modules map[string]Module
Router *httprouter.Router
}
// Module ist ein Modul für Grilist.
type Module interface {
Init(*Grilist)
Name() string
ProvideDashboardData(*charakterin.User) []DashboardCategory
}
// DashboardCategory ist eine Kategorie mit Karten, die auf dem Dashboard angezeigt werden.
type DashboardCategory struct {
Title string
Cards []frontend.Card
}
|