api

package
v0.0.0-...-c5be531 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 42 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package api is the HTTP + WebSocket surface of PartyCockpit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoxInfo

type BoxInfo struct {
	Scale float64 `json:"scale"` // shader render scale
}

BoxInfo goes to the stage with the party: defaults tuned for the box.

type PublicParty

type PublicParty struct {
	store.Party
	JoinURL string      `json:"joinUrl"`
	Scene   store.Scene `json:"scene"`
	Clients any         `json:"clients"`
	// IceServers for RTCPeerConnection; empty on a LAN party (host candidates suffice).
	IceServers json.RawMessage `json:"iceServers"`
	// Box: stage defaults on a party box (D20); absent elsewhere.
	Box *BoxInfo `json:"box,omitempty"`
}

type Server

type Server struct {
	Cfg        config.Config
	Store      *store.Store
	Hub        *hub.Hub
	Gallery    *gallery.Client
	DJfy       *djfy.Manager
	Catalog    *providers.Catalog
	Restyler   providers.Restyler
	Animator   providers.Animator
	Subtitles  *subtitles.Client // nil = typed subtitles only
	Glyphs     *glyphs.Set       // nil = notes in a font
	Classifier providers.Classifier
	Web        fs.FS  // built frontend (may be empty in dev)
	Version    string // build version, shown on the box screen
	// contains filtered or unexported fields
}

func (*Server) Init

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

func (*Server) LANURL

func (s *Server) LANURL() string

LANURL is what phones open (startup hint); empty without a LAN address.

func (*Server) Routes

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

func (*Server) StartURL

func (s *Server) StartURL() string

StartURL is the home page on this machine (startup hint).

type Stream

type Stream struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Source    string `json:"source"` // browser | mirrorbooth
	Status    string `json:"status"` // pending | live
	Online    bool   `json:"online"` // the phone's streamer socket is connected
	CreatedAt int64  `json:"createdAt"`
	// contains filtered or unexported fields
}

type Tempo

type Tempo struct {
	BPM    float64 `json:"bpm"`
	Source string  `json:"source"`
	Anchor int64   `json:"anchor"` // ms epoch of a beat
}

Tempo drives every scene's tick(beat). Source: tap | djfy | none; the stage falls back to its own audio analysis when source is none (DECISIONS.md D4).

Jump to

Keyboard shortcuts

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