ui

package
v0.2.44 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package ui owns the embedded printer page: what a browser sees at a printer's own address (https://ipp.<zone>/p/<printer> — the https twin of its ipps:// URI, and where a configuration profile's description points).

Like the continuation page it is NOT served from a static route: the ipp head returns it for a GET on a printer that exists, with the printer's details injected at the <!--txco:printer--> marker. The bundle is produced by `cd printer-ui && pnpm run build` (vite + vite-plugin-singlefile inlines all JS/CSS) and baked in via go:embed at compile time. It is an information page and nothing more — no credential, no download: what a product builds around its printers (a setup profile, a name) belongs to the product.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Page

func Page(p Printer) (html []byte, built bool)

Page returns the printer page. built is true when the real Svelte bundle is present; false when it returns the no-build fallback (pnpm absent / UI not built), which says the same things without JavaScript.

Types

type Printer

type Printer struct {
	Name    string `json:"name"`    // the registered display name, else the label
	URI     string `json:"uri"`     // ipps://ipp.<zone>:443/p/<printer>
	Address string `json:"address"` // ipp.<zone>:443 — the port always spelled out
	Queue   string `json:"queue"`   // p/<printer>, or p/<handle>/<printer>
}

Printer is what the page shows: the fields macOS's Add Printer › IP tab asks for, plus the address a client adds the printer by.

Jump to

Keyboard shortcuts

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