mirror of
https://github.com/tinyauthapp/tinyauth.git
synced 2026-09-22 02:13:31 +08:00
28 lines
697 B
Go
28 lines
697 B
Go
package proxies
|
|
|
|
import (
|
|
_ "embed"
|
|
"html/template"
|
|
)
|
|
|
|
// Bundle the templates
|
|
|
|
//go:embed caddy.yaml.tmpl
|
|
var caddyTemplateSource string
|
|
|
|
//go:embed envoy.yaml.tmpl
|
|
var envoyTemplateSource string
|
|
|
|
//go:embed nginx.yaml.tmpl
|
|
var nginxTemplateSource string
|
|
|
|
//go:embed traefik.yaml.tmpl
|
|
var traefikTemplateSource string
|
|
|
|
// Compile them and export them
|
|
|
|
var CaddyTemplate = template.Must(template.New("caddy").Parse(caddyTemplateSource))
|
|
var EnvoyTemplate = template.Must(template.New("envoy").Parse(envoyTemplateSource))
|
|
var NginxTemplate = template.Must(template.New("nginx").Parse(nginxTemplateSource))
|
|
var TraefikTemplate = template.Must(template.New("traefik").Parse(traefikTemplateSource))
|