Documentation
¶
Index ¶
- func CopyTemplateToFolder(templatePath string, targetFolder string, devcontainerName string) error
- func ExecInDevContainer(containerID string, workDir string, args []string) error
- func FindDevContainerInAncestorPaths(folderPath string) (string, error)
- func GetDefaultDevcontainerNameForFolder(folderPath string) (string, error)
- func GetDevContainerURI(folderPath string, subFolder string) (string, error)
- func GetDevContainerUserName(devContainerJsonPath string) (string, error)
- func GetLocalFolderFromDevContainer(containerIDOrName string) (string, error)
- func GetWorkspaceMountPath(folderPath string) (string, error)
- func SetDevcontainerName(devContainerJsonPath string, name string) error
- type DevcontainerInfo
- type DevcontainerTemplate
- type DockerMount
- type SourceInfo
- type SubstitutionValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyTemplateToFolder ¶ added in v0.1.858116614
func ExecInDevContainer ¶ added in v0.1.816111590
func FindDevContainerInAncestorPaths ¶ added in v0.1.21758829476
func GetDefaultDevcontainerNameForFolder ¶ added in v0.1.259948365
func GetDevContainerURI ¶ added in v0.1.158565981
GetDevContainerURI gets the devcontainer URI for a folder to launch using the VS Code --folder-uri switch If subFolder is specified, it is appended to the workspaceMountPath
func GetDevContainerUserName ¶ added in v0.1.310713546
"remoteUser": "vscode"
func GetLocalFolderFromDevContainer ¶ added in v0.1.163415964
GetLocalFolderFromDevContainer looks up the local (host) folder name from the container labels
func GetWorkspaceMountPath ¶ added in v0.1.163415964
GetWorkspaceMountPath returns the devcontainer mount path for the devcontainer in the specified folder
func SetDevcontainerName ¶ added in v0.1.259948365
Types ¶
type DevcontainerInfo ¶
type DevcontainerInfo struct {
ContainerID string `json:"containerID"`
ContainerName string `json:"containerName"`
DevcontainerName string `json:"devcontainerName"`
FolderPath string `json:"folderPath"`
LocalFolderPath string `json:"localFolderPath"`
}
DevcontainerInfo holds details about a devcontainer
func GetClosestPathMatchForPath ¶ added in v0.1.901789955
func GetClosestPathMatchForPath(devContainers []DevcontainerInfo, devcontainerPath string) (DevcontainerInfo, error)
GetClosestPathMatchForPath returns the dev container with the closes match to the specified path
func ListDevcontainers ¶
func ListDevcontainers() ([]DevcontainerInfo, error)
ListDevcontainers returns a list of devcontainers
type DevcontainerTemplate ¶ added in v0.1.114116943
type DevcontainerTemplate struct {
Name string
// Path is the path including the .devcontainer folder
Path string
}
DevcontainerTemplate holds info on templates for list/add etc
func GetTemplateByName ¶ added in v0.1.114116943
func GetTemplateByName(name string) (*DevcontainerTemplate, error)
GetTemplateByName returns the template with the specified name or nil if not found
func GetTemplates ¶ added in v0.1.114116943
func GetTemplates() ([]DevcontainerTemplate, error)
GetTemplates returns a list of discovered templates
type DockerMount ¶ added in v0.1.901789955
DockerMount represents mount info from Docker output
type SourceInfo ¶ added in v0.1.968022249
type SourceInfo struct {
DevcontainerFolder string
DockerMount DockerMount
}
SourceInfo holds properties about the source mounted in a dev container
func GetSourceInfoFromDevContainer ¶ added in v0.1.968022249
func GetSourceInfoFromDevContainer(containerIDOrName string) (SourceInfo, error)
GetSourceInfoFromDevContainer inspects the specified container and returns the SourceInfo