templates

package
v0.4.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Categories = []Category{
	{ID: "application", Name: "Applications", Icon: "pi pi-desktop", Priority: 100},
	{ID: "framework", Name: "Frameworks", Icon: "pi pi-code", Priority: 90},
	{ID: "runtime", Name: "Runtimes", Icon: "pi pi-cog", Priority: 80},
	{ID: "infrastructure", Name: "Infrastructure", Icon: "pi pi-server", Priority: 70},
	{ID: "storage", Name: "Storage", Icon: "pi pi-box", Priority: 65},
	{ID: "database", Name: "Databases", Icon: "pi pi-database", Priority: 60},
	{ID: "basic", Name: "Basic", Icon: "pi pi-file", Priority: 50},
}

Functions

func Checksum added in v0.3.0

func Checksum() string

Checksum identifies the embedded template set, so on-disk copies can be detected as stale after an agent upgrade.

func GetCompose

func GetCompose(name string) ([]byte, error)

func GetErrorPage

func GetErrorPage() ([]byte, error)

func GetFile added in v0.1.52

func GetFile(templateID, filename string) ([]byte, error)

func GetMetadata

func GetMetadata(name string) ([]byte, error)

func GetNginxConfig added in v0.1.5

func GetNginxConfig(luaEnabled bool) ([]byte, error)

func GetNginxConfigWithData added in v0.1.5

func GetNginxConfigWithData(luaEnabled bool, data NginxConfigData) ([]byte, error)

func GetNginxSecurityLua added in v0.1.5

func GetNginxSecurityLua() ([]byte, error)

func GetNginxSecurityLuaWithConfig added in v0.1.5

func GetNginxSecurityLuaWithConfig(agentIP string, agentPort int, internalAPIToken string, trustedProxies []string, trustCFHeader bool) ([]byte, error)

GetNginxSecurityLuaWithConfig returns the security.lua template processed with agent config

func GetNginxTrafficLuaWithConfig added in v0.1.5

func GetNginxTrafficLuaWithConfig(agentIP string, agentPort int) ([]byte, error)

GetNginxTrafficLuaWithConfig returns the traffic.lua template processed with agent config

func GetWelcomePage added in v0.1.5

func GetWelcomePage() ([]byte, error)

func List

func List() ([]string, error)

Types

type Category added in v0.1.5

type Category struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Icon     string `json:"icon"`
	Priority int    `json:"priority"`
}

func GetCategories added in v0.1.5

func GetCategories() []Category

type LuaTemplateData added in v0.1.5

type LuaTemplateData struct {
	AgentIP          string
	AgentPort        int
	InternalAPIToken string
	TrustedProxies   string
	TrustCFHeader    bool
}

LuaTemplateData contains the data for Lua template processing

type NginxConfigData added in v0.1.5

type NginxConfigData struct {
	RejectUnknownDomains bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL