Help us shape the future of Go! Take the 2026 Go Developer Survey

web

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 64 Imported by: 0

Documentation

Overview

Package web is pogi's console: server-rendered HTML with htmx, mounted at /_pogi/.

Index

Constants

This section is empty.

Variables

View Source
var Favicon = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Content-Type", "image/svg+xml")
	w.Header().Set("Cache-Control", "max-age=86400")
	io.WriteString(w, `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="8" fill="#ff8cc6"/><text x="16" y="23" font-size="20" text-anchor="middle" fill="#3d0a26" font-family="sans-serif" font-weight="700">p</text></svg>`)
})

Favicon answers browsers' automatic /favicon.ico so it never reaches S3.

Functions

func New

func New(hub *core.Hub) http.Handler

New builds the console handler.

func ServiceCount added in v0.2.0

func ServiceCount(running []core.ServiceStatus) int

ServiceCount is serviceCount for all three clouds, for the start banner, so the banner and the console show the same number.

func TerraformSVG added in v0.2.0

func TerraformSVG(cfg *terraform.Config, est *cost.Estimate, network bool) string

TerraformSVG draws the diagram as a standalone SVG file, for `pogi tf diagram -o`. It is the same drawing the Terraform page exports. network groups by network instead of by module.

Types

type UI

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

UI serves the console.

Jump to

Keyboard shortcuts

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