workspace

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProvider

func AddProvider(devPodConfig *config.Config, providerName, providerSourceRaw string, log log.Logger) (*provider2.ProviderConfig, error)

func AddProviderRaw added in v0.3.5

func AddProviderRaw(devPodConfig *config.Config, providerName string, providerSource *provider2.ProviderSource, providerRaw []byte, log log.Logger) (*provider2.ProviderConfig, error)

func DownloadProviderGithub

func DownloadProviderGithub(originalPath string, log log.Logger) ([]byte, *provider2.ProviderSource, error)

func Exists

func Exists(devPodConfig *config.Config, args []string) string

Exists checks if the given workspace already exists

func GetMachine

func GetMachine(devPodConfig *config.Config, args []string, log log.Logger) (client.MachineClient, error)

GetMachine creates a machine client

func GetWorkspace

func GetWorkspace(devPodConfig *config.Config, args []string, changeLastUsed bool, log log.Logger) (client.BaseWorkspaceClient, error)

GetWorkspace tries to retrieve an already existing workspace

func GetWorkspaceName

func GetWorkspaceName(args []string) string

func ListProInstances added in v0.3.5

func ListProInstances(devPodConfig *config.Config, log log.Logger) ([]*provider2.ProInstance, error)

func ListWorkspaces added in v0.0.3

func ListWorkspaces(devPodConfig *config.Config, log log.Logger) ([]*provider2.Workspace, error)

func LoadAllProviders

func LoadAllProviders(devPodConfig *config.Config, log log.Logger) (map[string]*ProviderWithOptions, error)

func MachineExists

func MachineExists(devPodConfig *config.Config, args []string) string

MachineExists checks if the given workspace already exists

func ResolveMachine

func ResolveMachine(devPodConfig *config.Config, args []string, userOptions []string, log log.Logger) (client.Client, error)

func ResolveProvider

func ResolveProvider(providerSource string, log log.Logger) ([]byte, *provider2.ProviderSource, error)

func ResolveProviderSource added in v0.1.10

func ResolveProviderSource(devPodConfig *config.Config, providerName string, log log.Logger) (string, error)

func ResolveWorkspace

func ResolveWorkspace(
	ctx context.Context,
	devPodConfig *config.Config,
	ide string,
	ideOptions []string,
	args []string,
	desiredID,
	desiredMachine string,
	providerUserOptions []string,
	devContainerImage string,
	devContainerPath string,
	source *provider2.WorkspaceSource,
	changeLastUsed bool,
	log log.Logger,
) (client.BaseWorkspaceClient, error)

ResolveWorkspace tries to retrieve an already existing workspace or creates a new one

func SingleMachineName

func SingleMachineName(devPodConfig *config.Config, provider string, log log.Logger) string

func ToID

func ToID(str string) string

func UpdateProvider

func UpdateProvider(devPodConfig *config.Config, providerName, providerSourceRaw string, log log.Logger) (*provider2.ProviderConfig, error)

Types

type ProviderWithOptions

type ProviderWithOptions struct {
	Config *provider2.ProviderConfig `json:"config,omitempty"`
	State  *config.ProviderConfig    `json:"state,omitempty"`
}

func CloneProvider added in v0.1.9

func CloneProvider(devPodConfig *config.Config, providerName, providerSourceRaw string, log log.Logger) (*ProviderWithOptions, error)

func FindProvider

func FindProvider(devPodConfig *config.Config, name string, log log.Logger) (*ProviderWithOptions, error)

func LoadProviders

func LoadProviders(devPodConfig *config.Config, log log.Logger) (*ProviderWithOptions, map[string]*ProviderWithOptions, error)

LoadProviders loads all known providers for the given context and

Jump to

Keyboard shortcuts

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