env

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RuntimeVSCodeExtensions = map[string][]string{
	"go":     {"golang.go"},
	"ruby":   {"rebornix.Ruby"},
	"rust":   {"rust-lang.rust-analyzer"},
	"python": {"ms-python.python"},
	"java":   {"vscjava.vscode-java-pack"},
	"clang":  {"ms-vscode.cpptools-extension-pack"},
	"docker": {"ms-azuretools.vscode-docker"},
}

Functions

func PrepareWorkspace

func PrepareWorkspace(
	agentConfig *Config,
	envName string,
	repositories []*proto.EnvRepository,
) error

func SaveConfigAsFile

func SaveConfigAsFile(
	configFilePath string,
	config *Config,
) error

Types

type Config

type Config struct {
	Workspace            *WorkspaceConfig           `json:"workspace"`
	ServedPorts          ConfigServedPorts          `json:"served_ports"`
	LongRunningProcesses ConfigLongRunningProcesses `json:"long_running_processes"`
}

func LoadConfig

func LoadConfig(
	configFilePath string,
) (*Config, error)

func LoadConfigIfExists

func LoadConfigIfExists(
	configFilePath string,
) (*Config, error)

func NewConfig

func NewConfig() *Config

type ConfigLongRunningProcessCmd

type ConfigLongRunningProcessCmd string

type ConfigLongRunningProcessWD

type ConfigLongRunningProcessWD string

type ConfigServedPort

type ConfigServedPort string

type ConfigServedPorts

type ConfigServedPorts map[ConfigServedPort]bool

type VSCodeWorkspaceConfig

type VSCodeWorkspaceConfig struct {
	Folders  []VSCodeWorkspaceConfigFolder `json:"folders"`
	Settings map[string]interface{}        `json:"settings"`
}

VSCodeWorkspaceConfig matches .code-workspace schema. See: https://code.visualstudio.com/docs/editor/multi-root-workspaces#_workspace-file-schema

type VSCodeWorkspaceConfigFolder

type VSCodeWorkspaceConfigFolder struct {
	Path string `json:"path"`
}

type WorkspaceConfig

type WorkspaceConfig struct {
	Repositories []WorkspaceConfigRepository `json:"repositories"`
	Runtimes     WorkspaceConfigRuntimes     `json:"runtimes"`
	VSCode       WorkspaceConfigVSCode       `json:"vscode"`
	RootDirPath  string                      `json:"root_dir_path"`
}

func (*WorkspaceConfig) SetRuntimes

func (wc *WorkspaceConfig) SetRuntimes(runtimes WorkspaceConfigRuntimes)

type WorkspaceConfigRepository

type WorkspaceConfigRepository struct {
	Owner       string `json:"owner"`
	Name        string `json:"name"`
	RootDirPath string `json:"root_dir_path"`
}

type WorkspaceConfigRuntimes

type WorkspaceConfigRuntimes map[string]string

type WorkspaceConfigVSCode

type WorkspaceConfigVSCode struct {
	Extensions []string `json:"extensions"`
}

Jump to

Keyboard shortcuts

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