webpage

package
v0.0.0-...-f61d9f4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: AGPL-3.0 Imports: 9 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(catalog stream.ProductCatalog) *WebPage

NewWebPage creates initializes a webpage struct from the given product catalog.

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
	VersionPath          string
	VersionLastBuildDate string
	SupportsContainer    bool
	SupportsVM           bool
}

WebPageImage represents webpage table entries.

Jump to

Keyboard shortcuts

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