pairing

package
v0.69.40 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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

This section is empty.

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