web

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package web provides an embedded HTTP server for browsing doomsday backups.

The server binds to localhost only, picks a free port, and includes a random auth token in the URL for security. All assets (HTML, CSS, JS) are embedded in the binary via go:embed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is the web UI HTTP server.

func New

func New(session *views.Session, configName string) (*Server, error)

New creates a new web server. It picks a free port on localhost.

func (*Server) OpenBrowser

func (s *Server) OpenBrowser()

OpenBrowser attempts to open the URL in the user's default browser.

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

Serve starts serving HTTP requests. Blocks until context is cancelled.

func (*Server) URL

func (s *Server) URL() string

URL returns the full URL including auth token.

Jump to

Keyboard shortcuts

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