Documentation
¶
Index ¶
- func CreateConfigFile(devcontainerPath string, workspaceFolder string, ...) (string, error)
- func Down(args []string, devcontainerPath string, configDirForDevcontainer string) error
- func Execute(devcontainerFilePath string, args ...string) (string, error)
- func ExecuteCombineOutput(devcontainerFilePath string, args ...string) (string, error)
- func GetConfigFilePath(readConfigurationCommandResult string) (string, error)
- func GetConfigurationFilePath(devcontainerFilePath string, workspaceFolder string) (string, error)
- func GetContainerID(upCommandResult string) (string, error)
- func ReadConfiguration(devcontainerFilePath string, readConfiguration ...string) (string, error)
- func Run(args []string, noCdr bool, noPf bool, cdrPath string, vimInstallDir string, ...) error
- func Start(services DevcontainerStartUseService, args []string, devcontainerPath string, ...) error
- func Stop(args []string, devcontainerPath string, configDirForDevcontainer string) error
- func Templates(devcontainerFilePath string, workspaceFolder string, templateID string) (string, error)
- type ChmodError
- type ConfigFilePath
- type Configuration
- type ContainerStartError
- type DefaultDevcontainerStartUseService
- type DevcontainerJSON
- type DevcontainerStartUseService
- type ForwardConfig
- type ReadConfigurationCommandResult
- type ReadConfigurationError
- type UnknownTypeError
- type UpCommandResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConfigFile ¶ added in v3.4.3
func CreateConfigFile(devcontainerPath string, workspaceFolder string, configDirForDevcontainer string) (string, error)
devcontainer.vim 起動時に使用する設定ファイルを作成する 設定ファイルは、 devcontainer.vim のキャッシュ内の `config` ディレクトリに、 ワークスペースフォルダのパスを md5 ハッシュ化した名前のディレクトリに格納する.
func ExecuteCombineOutput ¶
func GetConfigFilePath ¶
func GetContainerID ¶
func ReadConfiguration ¶
func Run ¶ added in v3.1.0
func Run( args []string, noCdr bool, noPf bool, cdrPath string, vimInstallDir string, nvim bool, shell string, configDirForDocker string, vimrc string, defaultRunargs []string) error
docker run で、ワンショットでコンテナを立ち上げる
func Start ¶
func Start( services DevcontainerStartUseService, args []string, devcontainerPath string, noCdr bool, noPf bool, cdrPath string, vimInstallDir string, nvim bool, shell string, configFilePath string, vimrc string) error
devcontainer でコンテナを立ち上げ、 Vim を転送し、実行する。 既存実装の都合上、configFilePath から configDirForDevcontainer を抽出している
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 {
ForwardPorts []any `json:"forwardPorts"`
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 DefaultDevcontainerStartUseService ¶ added in v3.4.3
type DefaultDevcontainerStartUseService struct{}
type DevcontainerJSON ¶
type DevcontainerJSON struct {
DockerComposeFile interface{} `json:"dockerComposeFile"`
}
devcontainer.json のスキーマ(の一部)
func UnmarshalDevcontainerJSON ¶
func UnmarshalDevcontainerJSON(data []byte) (DevcontainerJSON, error)
type DevcontainerStartUseService ¶ added in v3.4.3
type ForwardConfig ¶ added in v3.4.0
func GetForwardPorts ¶ added in v3.4.0
func GetForwardPorts(readConfigurationCommandResult string) ([]ForwardConfig, error)
readConfigurationCommandResult から forwardPorts の情報を取得します。
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)
Click to show internal directories.
Click to hide internal directories.