ui

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ui is this module's server-driven UI (module API 5; WittyMediaServer docs/SDUI-MODULES.md): the Game PCs pages every app draws, the Apple TV and Android TV apps among them, which have no web view for the module's web part. Their sources are answered by WittyCouch's service (package api), and every row that does something runs one of WittyCouch's own commands, on its own routes. It carries its theme scope, so it takes the games colours, and an administrator can recolour it.

Index

Constants

View Source
const (
	// PageHosts is a person's Game PCs, and the PCs on this server's network to add.
	PageHosts = Module
	// PageHost is one PC (?item=<its id>&name=<its name>): wake, pair, end what's running, its games.
	PageHost = Module + "-host"
)

Pages.

View Source
const (
	SourceHosts = Module + ".hosts" // the person's PCs, each opening its page
	SourceFound = Module + ".found" // PCs answering on this server's network, each with Add
	SourceHost  = Module + ".host"  // one PC: how it is, and what can be done to it
	SourceApps  = Module + ".apps"  // what one PC offers
)

Sources, answered by the service.

View Source
const (
	CommandAdd        = Module + ".host.add"
	CommandWake       = Module + ".host.wake"
	CommandQuit       = Module + ".host.quit"
	CommandPair       = Module + ".host.pair"
	CommandPairCancel = Module + ".host.pairCancel"
	CommandRemove     = Module + ".host.remove"
)

Commands: WittyCouch's own routes, which check again who is asking.

View Source
const (
	SettingAccess      = "access"      // adults, everyone, admins
	SettingPrivate     = "private"     // PCs on this server's own network
	SettingInternet    = "internet"    // PCs over the internet
	SettingCustomPorts = "customPorts" // ports other than Sunshine's usual one, for people who aren't admins
	SettingMaxStreams  = "maxStreams"
	SettingUDPPort     = "udpPort"
	SettingPublicIP    = "publicIp"
	SettingSTUN        = "stun"
)

Settings keys (the server's; read by the service with the host API's Settings).

View Source
const Module = "wittycouch"

Module is this module's ID.

Variables

This section is empty.

Functions

func Commands added in v0.4.0

func Commands() []core.CommandSpec

Commands are WittyCouch's own commands, as sdui.json declares them.

func UI

func UI() *sdui.Module

UI is the module's SDUI.

Types

This section is empty.

Jump to

Keyboard shortcuts

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