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

views

package
v0.10.0 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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// WorkspaceMap is a map indexing the attribute names of Workspace by view name.
	WorkspaceMap = map[string][]string{
		"default": {
			"name",
			"namespace",
			"type",
			"image",
			"port",
			"cpu_request",
			"memory_request",
			"cpu_limit",
			"memory_limit",
			"ready_replicas",
			"container_state",
			"conditions",
			"stopped",
			"created_at",
			"volume_mounts",
			"remote_desktop",
			"vm_profile",
			"provisioned",
		},
	}
)

Functions

func ValidateContainerStateView

func ValidateContainerStateView(result *ContainerStateView) (err error)

ValidateContainerStateView runs the validations defined on ContainerStateView.

func ValidateImageRemoteDesktopView added in v0.5.0

func ValidateImageRemoteDesktopView(result *ImageRemoteDesktopView) (err error)

ValidateImageRemoteDesktopView runs the validations defined on ImageRemoteDesktopView.

func ValidateVolumeMountView

func ValidateVolumeMountView(result *VolumeMountView) (err error)

ValidateVolumeMountView runs the validations defined on VolumeMountView.

func ValidateWorkspace

func ValidateWorkspace(result *Workspace) (err error)

ValidateWorkspace runs the validations defined on the viewed result type Workspace.

func ValidateWorkspaceConditionView

func ValidateWorkspaceConditionView(result *WorkspaceConditionView) (err error)

ValidateWorkspaceConditionView runs the validations defined on WorkspaceConditionView.

func ValidateWorkspaceView

func ValidateWorkspaceView(result *WorkspaceView) (err error)

ValidateWorkspaceView runs the validations defined on WorkspaceView using the "default" view.

Types

type ContainerStateView

type ContainerStateView struct {
	// Current state: running, waiting, terminated
	State *string
	// Reason for the state
	Reason *string
	// Details about the state
	Message *string
	// Time the container started
	StartedAt *string
}

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

type ImageRemoteDesktopView added in v0.5.0

type ImageRemoteDesktopView struct {
	// Protocol name: "selkies" (Linux in-guest agent) or "agent" (cross-platform
	// kw-agent)
	Protocol *string
	// Guest port the agent listens on
	Port *int
	// Path relative to the agent's base URL
	Path *string
}

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

type VolumeMountView

type VolumeMountView struct {
	// Volume/PVC name
	Name *string
	// Mount path in container
	MountPath *string
	// Volume mount type for VMs: 'disk' (virtio disk) or 'cdrom' (optical disc).
	// Empty/omitted defaults to 'disk' for VM volume mounts.
	Type *string
	// Disk bus type for VMs when type is 'cdrom' (e.g. 'sata', 'ide'). Ignored for
	// 'disk' type.
	Bus *string
	// Whether the disk is read-only (for CD-ROMs, typically true).
	Readonly *bool
}

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

type Workspace

type Workspace struct {
	// Type to project
	Projected *WorkspaceView
	// View to render
	View string
}

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

type WorkspaceConditionView

type WorkspaceConditionView struct {
	// Condition type
	Type *string
	// Condition status
	Status *string
	// Brief reason
	Reason *string
	// Detailed message
	Message *string
	// Last transition time
	LastTransitionTime *string
}

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

type WorkspaceView

type WorkspaceView struct {
	// Workspace name
	Name *string
	// Kubernetes namespace
	Namespace *string
	// Workspace type: container, vm, or scratch
	Type *string
	// Container image
	Image *string
	// Container port
	Port *int
	// CPU request
	CPURequest *string
	// Memory request
	MemoryRequest *string
	// CPU limit
	CPULimit *string
	// Memory limit
	MemoryLimit *string
	// Number of ready replicas
	ReadyReplicas *int
	// Container state
	ContainerState *ContainerStateView
	// Workspace conditions
	Conditions []*WorkspaceConditionView
	// Whether the workspace is stopped
	Stopped *bool
	// Creation timestamp
	CreatedAt *string
	// Attached volumes
	VolumeMounts []*VolumeMountView
	// Remote desktop agent configuration (Tier 1)
	RemoteDesktop *ImageRemoteDesktopView
	// Resolved guest profile; windows11-amd64-v1 uses display-only native
	// provisioning
	VMProfile *string
	// Windows native setup and bootstrap removal have completed
	Provisioned *bool
}

WorkspaceView 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