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

form

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ParameterTypeBoolean = "boolean"

Variables

This section is empty.

Functions

func ClusterOptions added in v1.24.0

func ClusterOptions(
	ctx context.Context,
	client client.Client,
	project *managementv1.Project,
	cancel CancelFunc,
) []huh.Option[*managementv1.Cluster]

ClusterOptions lists clusters of a project as huh options.

func CreateInstance

func CreateInstance(
	ctx context.Context,
	baseClient client.Client,
	id, uid, source, picture string,
) (*managementv1.DevsyWorkspaceInstance, error)

func ParameterFields added in v1.24.0

func ParameterFields(fieldParameters []*FieldParameter) []huh.Field

func RenderParameters added in v1.24.0

func RenderParameters(fieldParameters []*FieldParameter) (string, error)

func TemplateOptions added in v1.24.0

func TemplateOptions(
	ctx context.Context,
	client client.Client,
	project *managementv1.Project,
	cancel CancelFunc,
) []huh.Option[*managementv1.DevsyWorkspaceTemplate]

TemplateOptions lists templates of a project as huh options, default first.

func TemplateVersionOptions added in v1.24.0

func TemplateVersionOptions(
	template *managementv1.DevsyWorkspaceTemplate,
) []huh.Option[string]

TemplateVersionOptions lists template versions, latest first.

Types

type CancelFunc

type CancelFunc = func()

type FieldParameter

type FieldParameter struct {
	storagev1.AppParameter

	StringValue string
	BoolValue   bool
}

func PrepareParameters added in v1.24.0

func PrepareParameters(parameters []storagev1.AppParameter) []*FieldParameter

type ProjectOption

type ProjectOption = huh.Option[*managementv1.Project]

func ProjectOptions added in v1.24.0

func ProjectOptions(ctx context.Context, client client.Client) ([]ProjectOption, error)

ProjectOptions lists projects as huh options.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL