Refactor all key functions into a service

This commit is contained in:
Christopher LaPointe
2023-05-23 21:06:52 -04:00
parent ffa7ad7ca8
commit fe4ec4cf2c
9 changed files with 391 additions and 218 deletions

21
assets.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"embed"
"path"
"text/template"
"traefik-lazyload/pkg/config"
)
//go:embed assets/*
var httpAssets embed.FS
const httpAssetPrefix = "/__llassets/"
type SplashModel struct {
Name string
WaitForCode int
WaitForPath string
}
var splashTemplate = template.Must(template.ParseFS(httpAssets, path.Join("assets", config.Model.Splash)))