views

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DisplayCapabilityMap is a map indexing the attribute names of
	// DisplayCapability by view name.
	DisplayCapabilityMap = map[string][]string{
		"default": {
			"enabled",
			"protocol",
			"transports",
			"max_participants",
			"max_width",
			"max_height",
			"handshake_timeout_ms",
			"participant_ttl_ms",
			"participants",
			"controller_present",
		},
	}
	// DisplayStatusMap is a map indexing the attribute names of DisplayStatus by
	// view name.
	DisplayStatusMap = map[string][]string{
		"default": {
			"enabled",
			"protocol",
			"epoch",
			"controller",
			"observers",
			"participants",
		},
	}
	// DisplayJoinMap is a map indexing the attribute names of DisplayJoin by view
	// name.
	DisplayJoinMap = map[string][]string{
		"default": {
			"participant",
			"capability",
		},
	}
	// DisplayControlMap is a map indexing the attribute names of DisplayControl by
	// view name.
	DisplayControlMap = map[string][]string{
		"default": {
			"controller",
			"was_held",
			"released",
		},
	}
)

Functions

func ValidateDisplayCapability

func ValidateDisplayCapability(result *DisplayCapability) (err error)

ValidateDisplayCapability runs the validations defined on the viewed result type DisplayCapability.

func ValidateDisplayCapabilityView

func ValidateDisplayCapabilityView(result *DisplayCapabilityView) (err error)

ValidateDisplayCapabilityView runs the validations defined on DisplayCapabilityView using the "default" view.

func ValidateDisplayControl

func ValidateDisplayControl(result *DisplayControl) (err error)

ValidateDisplayControl runs the validations defined on the viewed result type DisplayControl.

func ValidateDisplayControlView

func ValidateDisplayControlView(result *DisplayControlView) (err error)

ValidateDisplayControlView runs the validations defined on DisplayControlView using the "default" view.

func ValidateDisplayJoin

func ValidateDisplayJoin(result *DisplayJoin) (err error)

ValidateDisplayJoin runs the validations defined on the viewed result type DisplayJoin.

func ValidateDisplayJoinView

func ValidateDisplayJoinView(result *DisplayJoinView) (err error)

ValidateDisplayJoinView runs the validations defined on DisplayJoinView using the "default" view.

func ValidateDisplayStatus

func ValidateDisplayStatus(result *DisplayStatus) (err error)

ValidateDisplayStatus runs the validations defined on the viewed result type DisplayStatus.

func ValidateDisplayStatusView

func ValidateDisplayStatusView(result *DisplayStatusView) (err error)

ValidateDisplayStatusView runs the validations defined on DisplayStatusView using the "default" view.

func ValidateParticipantView

func ValidateParticipantView(result *ParticipantView) (err error)

ValidateParticipantView runs the validations defined on ParticipantView.

Types

type DisplayCapability

type DisplayCapability struct {
	// Type to project
	Projected *DisplayCapabilityView
	// View to render
	View string
}

DisplayCapability is the viewed result type that is projected based on a view.

type DisplayCapabilityView

type DisplayCapabilityView struct {
	// Whether shared display sessions are available for this workspace
	Enabled *bool
	// Display protocol/API revision
	Protocol *int
	// Supported display transports
	Transports []string
	// Maximum simultaneous participants (controller + observers)
	MaxParticipants *int
	// Maximum advertised guest framebuffer width
	MaxWidth *int
	// Maximum advertised guest framebuffer height
	MaxHeight *int
	// Display stream handshake timeout in milliseconds
	HandshakeTimeoutMs *int
	// Idle membership lifetime in milliseconds
	ParticipantTTLMs *int
	// Current participant count
	Participants *int
	// Whether a controller is currently attached
	ControllerPresent *bool
}

DisplayCapabilityView is a type that runs validations on a projected type.

type DisplayControl

type DisplayControl struct {
	// Type to project
	Projected *DisplayControlView
	// View to render
	View string
}

DisplayControl is the viewed result type that is projected based on a view.

type DisplayControlView

type DisplayControlView struct {
	// Controller after the transition, if any
	Controller *ParticipantView
	// Whether a controller was present before the transition
	WasHeld *bool
	// True when release cleared the controller
	Released *bool
}

DisplayControlView is a type that runs validations on a projected type.

type DisplayJoin

type DisplayJoin struct {
	// Type to project
	Projected *DisplayJoinView
	// View to render
	View string
}

DisplayJoin is the viewed result type that is projected based on a view.

type DisplayJoinView

type DisplayJoinView struct {
	// The joined participant record
	Participant *ParticipantView
	// Current capability state, including the live participant count
	Capability *DisplayCapabilityView
}

DisplayJoinView is a type that runs validations on a projected type.

type DisplayStatus

type DisplayStatus struct {
	// Type to project
	Projected *DisplayStatusView
	// View to render
	View string
}

DisplayStatus is the viewed result type that is projected based on a view.

type DisplayStatusView

type DisplayStatusView struct {
	// Whether shared display sessions are available for this workspace
	Enabled *bool
	// Display protocol/API revision
	Protocol *int
	// Capture/broker generation. Changes when a new capture owner is elected
	Epoch *string
	// Current controller, if any
	Controller *ParticipantView
	// Current observers
	Observers []*ParticipantView
	// Total participant count (controller + observers)
	Participants *int
}

DisplayStatusView is a type that runs validations on a projected type.

type ParticipantView

type ParticipantView struct {
	// Opaque server-side participant identifier. A capability, not a credential;
	// never sent to the guest or logged
	ID *string
	// Current role: observer (view-only) or controller. Server-enforced; a
	// client-side viewOnly flag is not an authorization boundary
	Role *string
	// Whether the participant is attached to a display stream
	Connected *bool
	// RFC 3339 timestamp when the participant joined
	JoinedAt *string
}

ParticipantView is a type that runs validations on a projected type.

Jump to

Keyboard shortcuts

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