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 (
	// VolumeMap is a map indexing the attribute names of Volume by view name.
	VolumeMap = map[string][]string{
		"default": {
			"name",
			"namespace",
			"size",
			"storage_class",
			"access_mode",
			"phase",
			"created_at",
			"labels",
		},
	}
)

Functions

func ValidateVolume

func ValidateVolume(result *Volume) (err error)

ValidateVolume runs the validations defined on the viewed result type Volume.

func ValidateVolumeView

func ValidateVolumeView(result *VolumeView) (err error)

ValidateVolumeView runs the validations defined on VolumeView using the "default" view.

Types

type Volume

type Volume struct {
	// Type to project
	Projected *VolumeView
	// View to render
	View string
}

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

type VolumeView

type VolumeView struct {
	// PVC name
	Name *string
	// Kubernetes namespace
	Namespace *string
	// Storage size
	Size *string
	// Storage class
	StorageClass *string
	// Access mode
	AccessMode *string
	// PVC phase (Bound, Pending, etc.)
	Phase *string
	// Creation timestamp
	CreatedAt *string
	// Kubernetes labels on the PVC
	Labels map[string]string
}

VolumeView 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