static

package
v0.0.0-...-1c7db09 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UIIndexFilePath string = "build/index.html"
	UIRootFilePath  string = "build"
)

Variables

Functions

This section is empty.

Types

type GetManifestJsonResp

type GetManifestJsonResp struct {
	ManifestVersion int                `json:"manifest_version"`
	Version         string             `json:"version"`
	Revision        string             `json:"revision"`
	ShortName       string             `json:"short_name"`
	Name            string             `json:"name"`
	Icons           []ManifestJsonIcon `json:"icons"`
	StartUrl        string             `json:"start_url"`
	Display         string             `json:"display"`
	ThemeColor      string             `json:"theme_color"`
	BackgroundColor string             `json:"background_color"`
}

type Handler

type Handler interface {
	GetFaviconIco(buildFS fs.FS) echo.HandlerFunc
	GetManifestJson() echo.HandlerFunc
	SPAHandler(buildFS fs.FS) echo.HandlerFunc
}

func NewStaticHandler

func NewStaticHandler() Handler

type ManifestJsonIcon

type ManifestJsonIcon struct {
	Src   string `json:"src"`
	Sizes string `json:"sizes"`
	Type  string `json:"type"`
}

func CreateManifestJsonIcons

func CreateManifestJsonIcons(icon string) []ManifestJsonIcon

type Routes

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

func NewStaticRoute

func NewStaticRoute(
	h Handler,
) *Routes

func (*Routes) RegisterStatic

func (r *Routes) RegisterStatic(e *echo.Echo, buildFS fs.FS)

Jump to

Keyboard shortcuts

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