ui

package
v0.0.0-...-fa8958a Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheControlMiddleware

func CacheControlMiddleware(next echo.HandlerFunc) echo.HandlerFunc

CacheControlMiddleware adds Cache-Control headers to static assets so that browsers can cache them for subsequent requests. Note that this should only be used on unique filenames such as those generated by the build process.

func ViteHandler

func ViteHandler(prefix string) echo.HandlerFunc

Types

type CustomLink struct {
	Title  string `json:"title"`
	Href   string `json:"href"`
	NewTab bool   `json:"new_tab"`
}

type CustomLinksCollection

type CustomLinksCollection struct {
	Nodes        []CustomLink
	Environments []CustomLink // Unused, but maybe in the future
	Roles        []CustomLink // Unused, but maybe in the future
	DataBags     []CustomLink // Unused, but maybe in the future
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(config *config.Config, engine *echo.Echo, chef *chef.Service, logger *logging.Logger) *Service
func (s *Service) BuildCustomLinks() error

BuildCustomLinks returns a map of custom links to be displayed in the UI

func (*Service) RegisterRoutes

func (s *Service) RegisterRoutes()

type Vite

type Vite struct {
	HTMLTags string
	// contains filtered or unexported fields
}

func NewVite

func NewVite(cfg ViteConfig) (*Vite, error)

type ViteConfig

type ViteConfig struct {
	Base        string
	Environment string
	Manifest    []byte
	FS          fs.FS
}

type ViteManifest

type ViteManifest struct {
	Files map[string]viteItem
}

Jump to

Keyboard shortcuts

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