devcontainer

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const CONTAINER_COMMAND = "docker"

Variables

View Source
var DEVCONTAINRE_ARGS_PREFIX = []string{"up"}

Functions

func Down added in v0.4.0

func Down(args []string, devcontainerPath string, configDirForDevcontainer string)

func Execute added in v0.5.0

func Execute(devcontainerFilePath string, args ...string) (string, error)

func ExecuteCombineOutput added in v0.6.0

func ExecuteCombineOutput(devcontainerFilePath string, args ...string) (string, error)

func ExecuteDevcontainer

func ExecuteDevcontainer(args []string, devcontainerPath string, vimFilePath string, cdrPath, configFilePath string, vimrc string)

devcontainer でコンテナを立ち上げ、 Vim を転送し、実行する。 既存実装の都合上、configFilePath から configDirForDevcontainer を抽出している

func GetConfigFilePath added in v0.5.0

func GetConfigFilePath(readConfigurationCommandResult string) (string, error)

func GetConfigurationFilePath added in v0.5.0

func GetConfigurationFilePath(devcontainerFilePath string, workspaceFolder string) (string, error)

func GetContainerId

func GetContainerId(upCommandResult string) (string, error)

func ReadConfiguration added in v0.5.0

func ReadConfiguration(devcontainerFilePath string, readConfiguration ...string) (string, error)

func Templates added in v0.6.0

func Templates(devcontainerFilePath string, templatesArgs ...string) (string, error)

Types

type ConfigFilePath added in v0.5.0

type ConfigFilePath struct {
	FsPath string `json:"fsPath"`
}

type Configuration added in v0.5.0

type Configuration struct {
	ConfigFilePath ConfigFilePath `json:"configFilePath"`
}

type ReadConfigurationCommandResult added in v0.5.0

type ReadConfigurationCommandResult struct {
	Configuration Configuration `json:"configuration"`
}

`devcontainers read-configuration` コマンドの実行結果スキーマ

Example:	{
						"configuration":{
							"name":"development environment",
							"dockerComposeFile":[
								"../docker-compose.yaml"
							],
							"service":"app",
							"workspaceFolder":"/work",
							"remoteUser":"root",
							"configFilePath": {
								"$mid":1,
								"fsPath":"/home/mikoto/project/oasiz-mqtt-client/.devcontainer/devcontainer.json",
								"path":"/home/mikoto/project/oasiz-mqtt-client/.devcontainer/devcontainer.json",
								"scheme":"vscode-fileHost"
							}
						},
						"workspace": {
							"workspaceFolder":"/work"
						}
					}

func UnmarshalReadConfigurationCommandResult added in v0.5.0

func UnmarshalReadConfigurationCommandResult(data []byte) (ReadConfigurationCommandResult, error)

type UpCommandResult

type UpCommandResult struct {
	Outcome               string `json:"outcome"`
	ContainerId           string `json:"containerId"`
	ComposeProjectName    string `json:"composeProjectName"`
	RemoteUser            string `json:"remoteUser"`
	RemoteWorkspaceFolder string `json:"remoteWorkspaceFolder"`
}

`devcontainers up` コマンドの実行結果スキーマ

Example: {"outcome":"success","containerId":"7278c789a975c34177e0b77d00477d5518c4fae4e66e6f0f9196561d5f895740","composeProjectName":"oasiz-mqtt-client","remoteUser":"root","remoteWorkspaceFolder":"/work"}

func UnmarshalUpCommandResult

func UnmarshalUpCommandResult(data []byte) (UpCommandResult, error)

Jump to

Keyboard shortcuts

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