aboutsummaryrefslogtreecommitdiff
path: root/grilist/grilist.go
blob: baff81c2fc9c8de1b0431ebba25b7dcaf86b715a (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
35
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)
	Interface() interface{}
	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
}