workspace_config

package
v0.0.0-...-560f09a Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTerraformTemplate

func FormatTerraformTemplate(wsConfig *GigoWorkspaceConfig) (string, error)

Types

type GigoExecConfig

type GigoExecConfig struct {
	Name    string `yaml:"name" json:"name"`
	Init    bool   `yaml:"init" json:"init"`
	Command string `yaml:"command" json:"command"`
}

type GigoPortForwardConfig

type GigoPortForwardConfig struct {
	Name string `yaml:"name"`
	Port uint16 `yaml:"port"`
}

type GigoVSCodeConfig

type GigoVSCodeConfig struct {
	Enabled    bool     `yaml:"enabled"`
	Extensions []string `yaml:"extensions"`
}

type GigoWorkspaceConfig

type GigoWorkspaceConfig struct {
	Version   float64 `yaml:"version"`
	Resources struct {
		CPU  int `yaml:"cpu"`
		Mem  int `yaml:"mem"`
		Disk int `yaml:"disk"`
		GPU  struct {
			Count int    `yaml:"count"`
			Class string `yaml:"class"`
		} `yaml:"gpu"`
	} `yaml:"resources"`
	BaseContainer    string                  `yaml:"base_container"`
	WorkingDirectory string                  `yaml:"working_directory"`
	Environment      map[string]string       `yaml:"environment"`
	Containers       map[string]interface{}  `yaml:"containers"`
	VSCode           GigoVSCodeConfig        `yaml:"vscode"`
	PortForward      []GigoPortForwardConfig `yaml:"port_forward"`
	Exec             []GigoExecConfig        `yaml:"exec"`
}

func ParseWorkspaceConfig

func ParseWorkspaceConfig(dir string) (*GigoWorkspaceConfig, error)

func (GigoWorkspaceConfig) ToAgent

type GigoWorkspaceConfigAgent

type GigoWorkspaceConfigAgent struct {
	Version          float64                 `yaml:"version"`
	WorkingDirectory string                  `json:"working_directory"`
	Environment      map[string]string       `json:"environment"`
	Containers       map[string]interface{}  `json:"containers"`
	VSCode           GigoVSCodeConfig        `yaml:"vscode"`
	PortForward      []GigoPortForwardConfig `json:"port_forward"`
	Exec             []GigoExecConfig        `json:"exec"`
}

Jump to

Keyboard shortcuts

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