pairing

package
v0.72.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: Apache-2.0 Imports: 5 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 pairing is the speechkit.pairing.v1 payload a homelab client consumes into a stored self_host session. DNS-SD announcements stay credential-free; this JSON is how a token leaves /setup.

Index

Constants

View Source
const (
	Version    = "speechkit.pairing.v1"
	AuthBearer = "bearer"
)

Variables

This section is empty.

Functions

func QRSVG added in v0.69.41

func QRSVG(content string) (string, error)

QRSVG encodes content as a monochrome SVG QR. The pairing JSON is the usual input; DNS-SD TXT must never carry this.

Types

type Payload

type Payload struct {
	V         string `json:"v"`
	ServerURL string `json:"server_url"`
	Auth      string `json:"auth"`
	Token     string `json:"token"`
	Name      string `json:"name,omitempty"`
}

Payload is the operator-facing pairing card. Token is a bearer secret; it must never appear in `_speechkit._tcp` TXT.

func New

func New(serverURL, token, name string) (Payload, error)

New builds a v1 bearer payload. Missing URL or token is not a session.

func Parse

func Parse(raw []byte) (Payload, error)

Parse reads a v1 payload. Wrong version, non-bearer auth, or a missing URL/token is rejected so callers cannot persist Cloud or tester mode.

Jump to

Keyboard shortcuts

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