views

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 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",
			"image",
			"port",
			"cpu_request",
			"memory_request",
			"cpu_limit",
			"memory_limit",
			"ready_replicas",
			"container_state",
			"conditions",
			"stopped",
			"created_at",
			"volume_mounts",
		},
	}
)

Functions

func ValidateContainerStateView

func ValidateContainerStateView(result *ContainerStateView) (err error)

ValidateContainerStateView runs the validations defined on ContainerStateView.

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 VolumeMountView

type VolumeMountView struct {
	// Volume/PVC name
	Name *string
	// Mount path in container
	MountPath *string
}

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
	// 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
}

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