about summary refs log tree commit diff
path: root/nix/templates/goapp/frontend/src/templates.go
blob: 5ae9397509b963b398266f04211e4b1f9639dddf (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
36
37
38
39
40
41
42
package main

import (
	"html/template"
	"strings"
)

var (
	templateFuncMap = template.FuncMap{
		"stringsJoin":      strings.Join,
		"stringsEqualFold": strings.EqualFold,
		"isStringInSlice":  isStringInSlice,
	}
)

type indexTplData struct {
	Title, Description, RawToken string

	Breadcrumbs []Breadcrumb
	NextLinks   []Link

	Error            string
	LoggedIn         bool
	Claims           tplClaims
	Groups           []string
	AuthorizeCodeURL string
}

type Link struct {
	Name   string
	Target string
}

type Breadcrumb struct {
	Main    Link
	Options []Link
}

type tplClaims struct {
	IDToken  Claims
	UserInfo Claims
}