workspace

package
v3.114.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallPlugin

func InstallPlugin(pluginSpec workspace.PluginSpec, log func(sev diag.Severity, msg string)) (*semver.Version, error)

func ValidateProjectDescription added in v3.84.0

func ValidateProjectDescription(s string) error

ValidateProjectDescription ensures a project description name is valid, if it is not it returns an error with a message suitable for display to an end user.

func ValidateProjectName added in v3.84.0

func ValidateProjectName(s string) error

ValidateProjectName ensures a project name is valid, if it is not it returns an error with a message suitable for display to an end user.

func ValueOrDefaultProjectDescription added in v3.84.0

func ValueOrDefaultProjectDescription(
	description string, projectDescription string, defaultDescription string,
) string

ValueOrDefaultProjectDescription returns the value or defaultDescription.

func ValueOrSanitizedDefaultProjectName added in v3.84.0

func ValueOrSanitizedDefaultProjectName(name string, projectName string, defaultNameToSanitize string) string

ValueOrSanitizedDefaultProjectName returns the value or a sanitized valid project name based on defaultNameToSanitize.

Types

type InstallPluginError

type InstallPluginError struct {
	// The specification of the plugin to install
	Spec workspace.PluginSpec
	// The underlying error that occurred during the download or install.
	Err error
}

InstallPluginError is returned by InstallPlugin if we couldn't install the plugin

func (*InstallPluginError) Error

func (err *InstallPluginError) Error() string

func (*InstallPluginError) Unwrap

func (err *InstallPluginError) Unwrap() error

Jump to

Keyboard shortcuts

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