webpage

package
v0.0.0-...-a745769 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebPage

type WebPage struct {
	FaviconURL      string
	LogoURL         string
	Title           string
	Paragraphs      []template.HTML
	FooterCopyright string
	FooterUpdatedAt string

	Images []WebPageImage
}

WebPage represents the data that will be used to populate the webpage template.

func NewWebPage

func NewWebPage(rootDir string, catalog stream.ProductCatalog) (*WebPage, error)

NewWebPage creates initializes a webpage struct from the given product catalog. If the image paths from the catalog are detected in the provided rootDir, the files are inspected and their metadata is included in the image version details.

func (WebPage) Write

func (p WebPage) Write(rootDir string) error

Write parses the webpage template, populates it, and writes it to index.html in the rootDir. File is first written to a temporary file and then moved to the final destination to avoid partial writes in case of errors.

type WebPageImage

type WebPageImage struct {
	Distribution string
	Release      string
	Architecture string
	Variant      string
	IsStale      bool
	Aliases      []string
	Requirements map[string]string

	Versions []WebPageImageVersion
}

WebPageImage represents webpage table entries.

type WebPageImageFile

type WebPageImageFile struct {
	Name      string
	Path      string
	Date      string
	Size      string
	SizeBytes int64
}

WebPageImageFile represents a file related to a specific image. Used for file listings in image details.

type WebPageImageVersion

type WebPageImageVersion struct {
	Name                 string
	Path                 string
	BuildDate            string
	IsStale              bool
	FingerprintContainer string
	FingerprintVM        string

	Files []WebPageImageFile
}

WebPageImageVersion represents a version of an image.

Jump to

Keyboard shortcuts

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