devcontainer

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Down

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

func Execute

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

func ExecuteCombineOutput

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

func GetConfigFilePath

func GetConfigFilePath(readConfigurationCommandResult string) (string, error)

func GetConfigurationFilePath

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

func GetContainerID

func GetContainerID(upCommandResult string) (string, error)

func ReadConfiguration

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

func Run added in v3.1.0

func Run(args []string, vimFilePath string, cdrPath string, configDirForDocker string, vimrc string, defaultRunargs []string) error

docker run で、ワンショットでコンテナを立ち上げる

func Start

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

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

func Stop

func Stop(args []string, devcontainerPath string, configDirForDevcontainer string) error

func Templates

func Templates(
	devcontainerFilePath string,
	workspaceFolder string,
	templateID string) (string, error)

Types

type ChmodError added in v3.1.0

type ChmodError struct {
	// contains filtered or unexported fields
}

func (*ChmodError) Error added in v3.1.0

func (e *ChmodError) Error() string

type ConfigFilePath

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

type Configuration

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

type ContainerStartError added in v3.1.0

type ContainerStartError struct {
	// contains filtered or unexported fields
}

func (*ContainerStartError) Error added in v3.1.0

func (e *ContainerStartError) Error() string

type DevcontainerJSON

type DevcontainerJSON struct {
	DockerComposeFile interface{} `json:"dockerComposeFile"`
}

devcontainer.json のスキーマ(の一部)

func UnmarshalDevcontainerJSON

func UnmarshalDevcontainerJSON(data []byte) (DevcontainerJSON, error)

type ReadConfigurationCommandResult

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

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

type ReadConfigurationError

type ReadConfigurationError struct {
	// contains filtered or unexported fields
}

func (*ReadConfigurationError) Error

func (e *ReadConfigurationError) Error() string

type UnknownTypeError

type UnknownTypeError struct {
	// contains filtered or unexported fields
}

func (*UnknownTypeError) Error

func (e *UnknownTypeError) Error() string

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