server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Overview

Package server is cuxdeck's HTTP surface: the embedded mobile panel, the deck snapshot API, and the allowlisted action endpoint. It binds to 127.0.0.1 only — the outside world reaches it exclusively through the tunnel the tunnel package supervises.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Auth    *auth.Store
	Push    *push.Store
	TG      *telegram.Store
	Usage   *usagelog.Store
	Version string
	// StartAtLogin state + toggle, injected from main (which owns the
	// OS-specific service code). Nil when unavailable.
	StartAtLoginState func() bool
	SetStartAtLogin   func(on bool) error
	// CurrentURL returns the public tunnel URL (or the local one) so the
	// loopback pairing QR points a phone at the right address.
	CurrentURL func() string
	// Name / SetName read and set a custom display name for this
	// machine, overriding the OS hostname in the deck view.
	Name    func() string
	SetName func(string) error
}

Server wires the pieces together.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the full route table.

Jump to

Keyboard shortcuts

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