Documentation
¶
Index ¶
- Variables
- func ValidateContainerStateView(result *ContainerStateView) (err error)
- func ValidateVolumeMountView(result *VolumeMountView) (err error)
- func ValidateWorkspace(result *Workspace) (err error)
- func ValidateWorkspaceConditionView(result *WorkspaceConditionView) (err error)
- func ValidateWorkspaceView(result *WorkspaceView) (err error)
- type ContainerStateView
- type VolumeMountView
- type Workspace
- type WorkspaceConditionView
- type WorkspaceView
Constants ¶
This section is empty.
Variables ¶
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 ¶
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.