console

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: EUPL-1.2 Imports: 10 Imported by: 0

Documentation

Overview

Package console provides an encrypted PWA demo server with browser integration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenBrowser

func OpenBrowser(url string) error

OpenBrowser opens the default browser to the specified URL. Supports macOS, Linux, and Windows.

Types

type Server

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

Server serves encrypted STIM content with an optional unlock page.

func NewServer

func NewServer(stimPath, password, port string) (*Server, error)

NewServer creates a new console server. If password is provided, the content is decrypted immediately. If password is empty, an unlock page is shown until the user provides the password.

func (*Server) Port

func (s *Server) Port() string

Port returns the server's port.

func (*Server) Start

func (s *Server) Start() error

Start begins serving HTTP requests.

func (*Server) URL

func (s *Server) URL() string

URL returns the full server URL.

Jump to

Keyboard shortcuts

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