apps/og/app.go 499 B raw
1
package main
2
3
import (
4
	"embed"
5
	"html/template"
6
	"log/slog"
7
)
8
9
//go:embed templates/*.html static/*
10
var appFS embed.FS
11
12
type App struct {
13
	Log       *slog.Logger
14
	Templates map[string]*template.Template
15
}
16
17
type tagKV struct {
18
	Key   string
19
	Value string
20
}
21
22
type linkTag struct {
23
	Rel   string
24
	Href  string
25
	Extra string
26
}
27
28
type resultsData struct {
29
	URL         string
30
	Error       string
31
	OGImage     string
32
	Favicon     string
33
	FoundTags   []tagKV
34
	MissingTags []string
35
	LinkTags    []linkTag
36
}