views

package
v0.3.0 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 (
	// ImageMap is a map indexing the attribute names of Image by view name.
	ImageMap = map[string][]string{
		"default": {
			"cr_name",
			"name",
			"image",
			"description",
			"category",
			"tags",
			"default_port",
			"default_path",
			"proxy_config",
			"icon",
			"default_args",
			"default_env",
			"default_uid",
			"default_shared_memory",
			"privileged",
			"homepage_url",
			"source_url",
			"image_homepage_url",
			"default_user",
			"default_homedir",
			"default_shell",
			"links",
			"default_credentials",
		},
	}
)

Functions

func ValidateImage

func ValidateImage(result *Image) (err error)

ValidateImage runs the validations defined on the viewed result type Image.

func ValidateImageCredentialsView

func ValidateImageCredentialsView(result *ImageCredentialsView) (err error)

ValidateImageCredentialsView runs the validations defined on ImageCredentialsView.

func ValidateImageEnvVarView

func ValidateImageEnvVarView(result *ImageEnvVarView) (err error)

ValidateImageEnvVarView runs the validations defined on ImageEnvVarView.

func ValidateImageLinkView

func ValidateImageLinkView(result *ImageLinkView) (err error)

ValidateImageLinkView runs the validations defined on ImageLinkView.

func ValidateImageProxyConfigView

func ValidateImageProxyConfigView(result *ImageProxyConfigView) (err error)

ValidateImageProxyConfigView runs the validations defined on ImageProxyConfigView.

func ValidateImageView

func ValidateImageView(result *ImageView) (err error)

ValidateImageView runs the validations defined on ImageView using the "default" view.

Types

type Image

type Image struct {
	// Type to project
	Projected *ImageView
	// View to render
	View string
}

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

type ImageCredentialsView

type ImageCredentialsView struct {
	// Default username
	Username *string
	// Default password
	Password *string
}

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

type ImageEnvVarView

type ImageEnvVarView struct {
	// Name of the environment variable
	Name *string
	// Value (supports {{namespace}} and {{name}} placeholders)
	Value *string
}

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

type ImageLinkView

type ImageLinkView struct {
	// Display label for the link
	Title *string
	// Link target URL
	URL *string
}

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

type ImageProxyConfigView

type ImageProxyConfigView struct {
	// Serve a no-op ServiceWorker at /sw.js to prevent SW registration errors
	NeedsNoopSw *bool
	// Paths that use WebSocket (informational, all paths support WS transparently)
	WebsocketPaths []string
	// Rewrite requests with absolute paths that escape the proxy prefix using
	// Referer header
	RewriteHostAbsolutePaths *bool
	// Additional headers to inject into proxied requests
	CustomRequestHeaders map[string]string
	// Inject a <base> tag into HTML responses to fix relative path resolution
	InjectBaseTag *bool
	// Connect to backend over HTTPS with skip-verify (for self-signed certs)
	TLSInsecure *bool
	// Forward the full proxy path (including /proxy/{ns}/{name}) to the pod
	// instead of stripping it. Required for apps configured with a base URL
	// matching the proxy prefix.
	PreservePathPrefix *bool
}

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

type ImageView

type ImageView struct {
	// Kubernetes resource name (metadata.name)
	CrName *string
	// Display name
	Name *string
	// Full image reference
	Image *string
	// Description of the image
	Description *string
	// Category for grouping (e.g. Desktop, IDE, Tool, Game)
	Category *string
	// Tags for filtering/searching images
	Tags []string
	// Default container port
	DefaultPort *int
	// Default URL path for connecting (e.g. /vnc.html?resize=remote)
	DefaultPath *string
	// Proxy behavior configuration for this image
	ProxyConfig *ImageProxyConfigView
	// Icon identifier
	Icon *string
	// Default command-line args injected at workspace creation
	DefaultArgs []string
	// Default environment variables injected at workspace creation
	DefaultEnv []*ImageEnvVarView
	// UID that the main container runs as (sets runAsUser and fsGroup)
	DefaultUID *int64
	// Automatically mount /dev/shm as emptyDir with medium=Memory (required for
	// Selkies streaming, Chrome, ML frameworks)
	DefaultSharedMemory *bool
	// Run container in privileged mode
	Privileged *bool
	// Project homepage or documentation URL
	HomepageURL *string
	// Source code repository URL
	SourceURL *string
	// Container image registry page (e.g. Docker Hub)
	ImageHomepageURL *string
	// Default user for this image
	DefaultUser *string
	// Default home directory for the default user
	DefaultHomedir *string
	// Default shell for exec/console sessions (e.g. /bin/bash)
	DefaultShell *string
	// Additional relevant URLs for this image
	Links []*ImageLinkView
	// Default login credentials for this image
	DefaultCredentials *ImageCredentialsView
}

ImageView 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