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 ¶
- func AccessKeys(p *util.Printer, asJSON bool, keys []oapi.LivekitPublicapiProjectsV1AccessKey) error
- func ProjectInvite(p *util.Printer, asJSON bool, i oapi.LivekitPublicapiProjectsV1ProjectInvite) error
- func ProjectInvites(p *util.Printer, asJSON bool, ...) error
- func ProjectMember(p *util.Printer, asJSON bool, m oapi.LivekitPublicapiProjectsV1ProjectMember) error
- func ProjectMembers(p *util.Printer, asJSON bool, ...) error
- func RecordingLabel(recording string) string
- func RecordingSaved(p *util.Printer, r oapi.LivekitPublicapiObservabilityV1RecordingGetURLResponse, ...) error
- func RecordingURL(p *util.Printer, asJSON bool, ...) error
- func Session(p *util.Printer, asJSON bool, s oapi.LivekitPublicapiAnalyticsV1Session) error
- func SessionDetail(p *util.Printer, asJSON bool, s oapi.LivekitPublicapiAnalyticsV1Session, ...) error
- func SessionEvents(p *util.Printer, asJSON bool, page public.EventPage, empty string) error
- func SessionLogs(p *util.Printer, asJSON bool, page public.LogPage, empty string) error
- func SessionMetrics(p *util.Printer, asJSON bool, page public.MetricPage, empty string) error
- func SessionParticipantsPage(p *util.Printer, asJSON bool, ...) error
- func SessionTraces(p *util.Printer, asJSON bool, page public.TracePage, empty string) error
- func SessionTranscript(p *util.Printer, asJSON bool, page public.TranscriptPage, empty string, ...) error
- func Sessions(p *util.Printer, asJSON bool, ...) error
- func SessionsPage(p *util.Printer, asJSON bool, ...) error
- func SimulationRun(p *util.Printer, asJSON bool, r oapi.LivekitSimulationRun) error
- func SimulationRuns(p *util.Printer, asJSON bool, runs []oapi.LivekitSimulationRun) error
- func SimulationRunsPage(p *util.Printer, asJSON bool, runs []oapi.LivekitSimulationRun, ...) error
- func StripControls(s string) string
- func User(p *util.Printer, asJSON bool, u oapi.LivekitPublicapiUsersV1User) error
- func Users(p *util.Printer, asJSON bool, users []oapi.LivekitPublicapiUsersV1User) error
- func UsersPage(p *util.Printer, asJSON bool, users []oapi.LivekitPublicapiUsersV1User, ...) error
- func Webhook(p *util.Printer, asJSON bool, w oapi.LivekitPublicapiProjectsV1Webhook) error
- func Webhooks(p *util.Printer, asJSON bool, ...) error
- func Workspace(p *util.Printer, asJSON bool, w oapi.LivekitPublicapiWorkspacesV1Workspace) error
- func WorkspaceInvite(p *util.Printer, asJSON bool, ...) error
- func WorkspaceInvites(p *util.Printer, asJSON bool, ...) error
- func WorkspaceMember(p *util.Printer, asJSON bool, ...) error
- func WorkspaceMembers(p *util.Printer, asJSON bool, ...) error
- func Workspaces(p *util.Printer, asJSON bool, ws []oapi.LivekitPublicapiWorkspacesV1Workspace) error
- func WorkspacesPage(p *util.Printer, asJSON bool, ws []oapi.LivekitPublicapiWorkspacesV1Workspace, ...) error
- type SavedRecording
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 ¶
func ProjectInvite(p *util.Printer, asJSON bool, i oapi.LivekitPublicapiProjectsV1ProjectInvite) error
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 ¶
func ProjectMember(p *util.Printer, asJSON bool, m oapi.LivekitPublicapiProjectsV1ProjectMember) error
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
RecordingLabel names a recording ("audio" or "chat-history") for a sentence.
func RecordingSaved ¶ added in v2.19.1
func RecordingSaved(p *util.Printer, r oapi.LivekitPublicapiObservabilityV1RecordingGetURLResponse, s SavedRecording) error
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
func RecordingURL(p *util.Printer, asJSON bool, r oapi.LivekitPublicapiObservabilityV1RecordingGetURLResponse) error
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 SessionDetail ¶ added in v2.19.1
func SessionDetail(p *util.Printer, asJSON bool, s oapi.LivekitPublicapiAnalyticsV1Session, d *oapi.LivekitPublicapiAnalyticsV1SessionDetail) error
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
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
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
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
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 ¶
SimulationRun prints a single simulation run.
func SimulationRuns ¶
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
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 UsersPage ¶
func UsersPage(p *util.Printer, asJSON bool, users []oapi.LivekitPublicapiUsersV1User, nextCursor string) error
UsersPage prints a cursor-paginated page of users.
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 WorkspaceInvite ¶
func WorkspaceInvite(p *util.Printer, asJSON bool, i oapi.LivekitPublicapiWorkspacesV1WorkspaceInvite) error
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 ¶
func WorkspaceMember(p *util.Printer, asJSON bool, m oapi.LivekitPublicapiWorkspacesV1WorkspaceMember) error
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.