Help us shape the future of Go! Take the 2026 Go Developer Survey

render

package
v2.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package render presents the LiveKit Public API's generated types as tables or JSON for the CLI. It maps each oapi type to its columns and delegates the table/JSON mechanics to pkg/util; commands call these functions with the shared Printer and the --json flag value, keeping presentation out of the command layer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessKeys added in v2.19.1

func AccessKeys(p *util.Printer, asJSON bool, keys []oapi.LivekitPublicapiProjectsV1AccessKey) error

AccessKeys prints a list of project API keys.

func ProjectInvite

ProjectInvite prints a single project invite.

func ProjectInvites

func ProjectInvites(p *util.Printer, asJSON bool, invites []oapi.LivekitPublicapiProjectsV1ProjectInvite) error

ProjectInvites prints a list of project invites.

func ProjectMember

ProjectMember prints a single project member.

func ProjectMembers

func ProjectMembers(p *util.Printer, asJSON bool, members []oapi.LivekitPublicapiProjectsV1ProjectMember) error

ProjectMembers prints a list of project members.

func RecordingLabel added in v2.19.1

func RecordingLabel(recording string) string

RecordingLabel names a recording ("audio" or "chat-history") for a sentence.

func RecordingSaved added in v2.19.1

RecordingSaved prints the signed URL a recording was downloaded from on stdout, as RecordingURL does, since it is the command's primary output either way, and says on stderr where the recording was saved and when it started (to line the audio up with the transcript).

func RecordingURL added in v2.19.1

RecordingURL prints a signed recording URL. As text it is the bare URL on stdout, so it pipes into curl, with its expiry as a status line; as JSON it is the API's response, recording start included.

func Session

Session prints a single analytics session.

func SessionDetail added in v2.19.1

SessionDetail prints a session with its detail: the list row, the totals, a summary of each timeline, and the first page of participants. As JSON it emits the API's own {session, detail} response. A nil detail means the server is still finalizing it, so only the row prints.

func SessionEvents added in v2.19.1

func SessionEvents(p *util.Printer, asJSON bool, page public.EventPage, empty string) error

SessionEvents prints a page of a session's events, one line per event with its time, type, participant identity and participant session, and its payload; --json prints the events as the API sent them. empty says why a page has no events, on stderr in both modes so --json output stays parseable.

func SessionLogs added in v2.19.1

func SessionLogs(p *util.Printer, asJSON bool, page public.LogPage, empty string) error

SessionLogs prints a page of a session's agent logs, one line per record with its time, level, logger and message; --json prints the records as the API sent them. empty says why a page has no records, on stderr in both modes so --json output stays parseable.

func SessionMetrics added in v2.19.1

func SessionMetrics(p *util.Printer, asJSON bool, page public.MetricPage, empty string) error

SessionMetrics prints a page of a session's agent metrics, one line per point with its end time, its metric's name and its value or histogram summary; --json prints the points as the API sent them, attributes and buckets included. empty says why a page has no points, on stderr in both modes so --json output stays parseable.

func SessionParticipantsPage added in v2.19.1

func SessionParticipantsPage(p *util.Printer, asJSON bool, participants []oapi.LivekitPublicapiAnalyticsV1ParticipantInfo, nextCursor string) error

SessionParticipantsPage prints a cursor-paginated page of a session's participants and their participant sessions. As JSON it emits a util.Page with the API's rows, participant sessions nested.

func SessionTraces added in v2.19.1

func SessionTraces(p *util.Printer, asJSON bool, page public.TracePage, empty string) error

SessionTraces prints a session's spans as a tree built from their parent ids, one line per span with its start time, duration and name, and a failed span's status message; --json prints the spans as the API sent them. A span whose parent isn't among them prints as a root, as the dashboard shows it. empty says why there are no spans, on stderr in both modes so --json output stays parseable. page.NextCursor is where the read stopped short of the session's last span.

func SessionTranscript added in v2.19.1

func SessionTranscript(p *util.Printer, asJSON bool, page public.TranscriptPage, empty string, lines func([]public.TranscriptItem) []string) error

SessionTranscript prints a page of a session's transcript, as lines renders it; --json prints the items as the API sent them. empty says why a page has no items, on stderr in both modes so --json output stays parseable. lines gets the items as the API sent them, so it must strip what a terminal acts on from their text (see StripControls).

func Sessions

func Sessions(p *util.Printer, asJSON bool, sessions []oapi.LivekitPublicapiAnalyticsV1Session) error

Sessions prints a list of analytics sessions.

func SessionsPage

func SessionsPage(p *util.Printer, asJSON bool, sessions []oapi.LivekitPublicapiAnalyticsV1Session, nextCursor string) error

SessionsPage prints a cursor-paginated page of analytics sessions.

func SimulationRun

func SimulationRun(p *util.Printer, asJSON bool, r oapi.LivekitSimulationRun) error

SimulationRun prints a single simulation run.

func SimulationRuns

func SimulationRuns(p *util.Printer, asJSON bool, runs []oapi.LivekitSimulationRun) error

SimulationRuns prints a list of simulation runs.

func SimulationRunsPage

func SimulationRunsPage(p *util.Printer, asJSON bool, runs []oapi.LivekitSimulationRun, nextCursor string) error

SimulationRunsPage prints a cursor-paginated page of simulation runs.

func StripControls added in v2.19.1

func StripControls(s string) string

StripControls removes the control characters a terminal acts on from untrusted text, such as what a participant, an agent, an LLM or a tool chose: C0 controls except tab and newline, DEL, and C1 controls. Without their ESC (or 8-bit CSI or OSC), escape sequences can't set the window title, clear the screen or restyle what follows; their printable rest stays visible. Invalid UTF-8 becomes U+FFFD, so no lone C1 byte gets through either. --json needs none of this: JSON escapes control characters itself.

func User

User prints a single user.

func Users

func Users(p *util.Printer, asJSON bool, users []oapi.LivekitPublicapiUsersV1User) error

Users prints a list of users.

func UsersPage

func UsersPage(p *util.Printer, asJSON bool, users []oapi.LivekitPublicapiUsersV1User, nextCursor string) error

UsersPage prints a cursor-paginated page of users.

func Webhook added in v2.19.1

Webhook prints a single project webhook.

func Webhooks added in v2.19.1

func Webhooks(p *util.Printer, asJSON bool, webhooks []oapi.LivekitPublicapiProjectsV1Webhook) error

Webhooks prints a list of project webhooks.

func Workspace

Workspace prints a single workspace.

func WorkspaceInvite

WorkspaceInvite prints a single workspace invite.

func WorkspaceInvites

func WorkspaceInvites(p *util.Printer, asJSON bool, invites []oapi.LivekitPublicapiWorkspacesV1WorkspaceInvite) error

WorkspaceInvites prints a list of workspace invites.

func WorkspaceMember

WorkspaceMember prints a single workspace member.

func WorkspaceMembers

func WorkspaceMembers(p *util.Printer, asJSON bool, members []oapi.LivekitPublicapiWorkspacesV1WorkspaceMember) error

WorkspaceMembers prints a list of workspace members.

func Workspaces

func Workspaces(p *util.Printer, asJSON bool, ws []oapi.LivekitPublicapiWorkspacesV1Workspace) error

Workspaces prints a list of workspaces.

func WorkspacesPage

func WorkspacesPage(p *util.Printer, asJSON bool, ws []oapi.LivekitPublicapiWorkspacesV1Workspace, nextCursor string) error

WorkspacesPage prints a cursor-paginated page of workspaces.

Types

type SavedRecording added in v2.19.1

type SavedRecording struct {
	SessionID string
	Recording string
	File      string
	Bytes     int64
}

SavedRecording is a recording downloaded to a file.

Jump to

Keyboard shortcuts

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