Documentation ¶
Index ¶
- Constants
- func GetContainerCreateConfig(project *project.Project) *container.Config
- type CreateDevcontainerOptions
- type CreateProjectOptions
- type DevcontainerPaths
- type DockerClient
- func (d *DockerClient) CreateFromDevcontainer(opts CreateDevcontainerOptions) (string, RemoteUser, error)
- func (d *DockerClient) CreateProject(opts *CreateProjectOptions) error
- func (d *DockerClient) CreateWorkspace(workspace *workspace.Workspace, workspaceDir string, logWriter io.Writer, ...) error
- func (d *DockerClient) DeleteImage(imageName string, force bool, logWriter io.Writer) error
- func (d *DockerClient) DestroyProject(project *project.Project, projectDir string, sshClient *ssh.Client) error
- func (d *DockerClient) DestroyWorkspace(workspace *workspace.Workspace, workspaceDir string, sshClient *ssh.Client) error
- func (d *DockerClient) ExecSync(containerID string, config container.ExecOptions, outputWriter io.Writer) (*ExecResult, error)
- func (d *DockerClient) GetContainerLogs(containerName string, logWriter io.Writer) error
- func (d *DockerClient) GetProjectContainerName(project *project.Project) string
- func (d *DockerClient) GetProjectInfo(p *project.Project) (*project.ProjectInfo, error)
- func (d *DockerClient) GetProjectVolumeName(project *project.Project) string
- func (d *DockerClient) GetWorkspaceInfo(ws *workspace.Workspace) (*workspace.WorkspaceInfo, error)
- func (d *DockerClient) PullImage(imageName string, cr *containerregistry.ContainerRegistry, logWriter io.Writer) error
- func (d *DockerClient) PushImage(imageName string, cr *containerregistry.ContainerRegistry, logWriter io.Writer) error
- func (d *DockerClient) RemoveContainer(containerName string) error
- func (d *DockerClient) StartProject(opts *CreateProjectOptions, daytonaDownloadUrl string) error
- func (d *DockerClient) StopProject(p *project.Project, logWriter io.Writer) error
- type DockerClientConfig
- type ExecResult
- type IDockerClient
- type RemoteUser
Constants ¶
View Source
const ContainerNotFoundMetadata = "{\"state\": \"container not found\"}"
View Source
const UPDATE_UID_GID_SCRIPT = `` /* 1140-byte string literal not displayed */
View Source
const WorkspaceMetadataFormat = "{\"networkId\": \"%s\"}"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateDevcontainerOptions ¶ added in v0.26.0
type CreateDevcontainerOptions struct { ProjectDir string // Name of the project inside the devcontainer ProjectName string BuildConfig *buildconfig.BuildConfig LogWriter io.Writer SshClient *ssh.Client ContainerRegistry *containerregistry.ContainerRegistry Prebuild bool EnvVars map[string]string IdLabels map[string]string }
type CreateProjectOptions ¶ added in v0.21.0
type CreateProjectOptions struct { Project *project.Project ProjectDir string Cr *containerregistry.ContainerRegistry LogWriter io.Writer Gpc *gitprovider.GitProviderConfig SshClient *ssh.Client }
type DevcontainerPaths ¶ added in v0.22.0
type DockerClient ¶
type DockerClient struct {
// contains filtered or unexported fields
}
func (*DockerClient) CreateFromDevcontainer ¶ added in v0.26.0
func (d *DockerClient) CreateFromDevcontainer(opts CreateDevcontainerOptions) (string, RemoteUser, error)
func (*DockerClient) CreateProject ¶
func (d *DockerClient) CreateProject(opts *CreateProjectOptions) error
func (*DockerClient) CreateWorkspace ¶
func (*DockerClient) DeleteImage ¶ added in v0.26.0
func (*DockerClient) DestroyProject ¶
func (*DockerClient) DestroyWorkspace ¶
func (*DockerClient) ExecSync ¶
func (d *DockerClient) ExecSync(containerID string, config container.ExecOptions, outputWriter io.Writer) (*ExecResult, error)
func (*DockerClient) GetContainerLogs ¶
func (d *DockerClient) GetContainerLogs(containerName string, logWriter io.Writer) error
func (*DockerClient) GetProjectContainerName ¶
func (d *DockerClient) GetProjectContainerName(project *project.Project) string
func (*DockerClient) GetProjectInfo ¶
func (d *DockerClient) GetProjectInfo(p *project.Project) (*project.ProjectInfo, error)
func (*DockerClient) GetProjectVolumeName ¶ added in v0.17.0
func (d *DockerClient) GetProjectVolumeName(project *project.Project) string
func (*DockerClient) GetWorkspaceInfo ¶
func (d *DockerClient) GetWorkspaceInfo(ws *workspace.Workspace) (*workspace.WorkspaceInfo, error)
func (*DockerClient) PullImage ¶ added in v0.17.0
func (d *DockerClient) PullImage(imageName string, cr *containerregistry.ContainerRegistry, logWriter io.Writer) error
func (*DockerClient) PushImage ¶ added in v0.17.0
func (d *DockerClient) PushImage(imageName string, cr *containerregistry.ContainerRegistry, logWriter io.Writer) error
func (*DockerClient) RemoveContainer ¶ added in v0.26.0
func (d *DockerClient) RemoveContainer(containerName string) error
func (*DockerClient) StartProject ¶
func (d *DockerClient) StartProject(opts *CreateProjectOptions, daytonaDownloadUrl string) error
func (*DockerClient) StopProject ¶
type DockerClientConfig ¶
type ExecResult ¶
type IDockerClient ¶
type IDockerClient interface { CreateProject(opts *CreateProjectOptions) error CreateWorkspace(workspace *workspace.Workspace, workspaceDir string, logWriter io.Writer, sshClient *ssh.Client) error DestroyProject(project *project.Project, projectDir string, sshClient *ssh.Client) error DestroyWorkspace(workspace *workspace.Workspace, workspaceDir string, sshClient *ssh.Client) error StartProject(opts *CreateProjectOptions, daytonaDownloadUrl string) error StopProject(project *project.Project, logWriter io.Writer) error GetProjectInfo(project *project.Project) (*project.ProjectInfo, error) GetWorkspaceInfo(ws *workspace.Workspace) (*workspace.WorkspaceInfo, error) GetProjectContainerName(project *project.Project) string GetProjectVolumeName(project *project.Project) string ExecSync(containerID string, config container.ExecOptions, outputWriter io.Writer) (*ExecResult, error) GetContainerLogs(containerName string, logWriter io.Writer) error PullImage(imageName string, cr *containerregistry.ContainerRegistry, logWriter io.Writer) error PushImage(imageName string, cr *containerregistry.ContainerRegistry, logWriter io.Writer) error DeleteImage(imageName string, force bool, logWriter io.Writer) error CreateFromDevcontainer(opts CreateDevcontainerOptions) (string, RemoteUser, error) RemoveContainer(containerName string) error }
func NewDockerClient ¶
func NewDockerClient(config DockerClientConfig) IDockerClient
type RemoteUser ¶ added in v0.21.0
type RemoteUser string
Click to show internal directories.
Click to hide internal directories.