-
Notifications
You must be signed in to change notification settings - Fork 337
/
types.go
62 lines (50 loc) · 1.97 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package driver
import (
"context"
"io"
"github.com/loft-sh/devpod/pkg/compose"
config2 "github.com/loft-sh/devpod/pkg/config"
"github.com/loft-sh/devpod/pkg/devcontainer/config"
"github.com/loft-sh/devpod/pkg/devcontainer/feature"
)
type Driver interface {
// FindDevContainer returns a running devcontainer details
FindDevContainer(ctx context.Context, labels []string) (*config.ContainerDetails, error)
// CommandDevContainer runs the given command inside the devcontainer
CommandDevContainer(ctx context.Context, containerId, user, command string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error
// RunDevContainer runs a devcontainer
RunDevContainer(
ctx context.Context,
parsedConfig *config.DevContainerConfig,
mergedConfig *config.MergedDevContainerConfig,
imageName,
workspaceMount string,
labels []string,
ide string,
ideOptions map[string]config2.OptionValue,
imageDetails *config.ImageDetails,
) error
// DeleteDevContainer deletes the devcontainer
DeleteDevContainer(ctx context.Context, containerId string, deleteVolumes bool) error
// StartDevContainer starts the devcontainer
StartDevContainer(ctx context.Context, containerId string, labels []string) error
// StopDevContainer stops the devcontainer
StopDevContainer(ctx context.Context, containerId string) error
// InspectImage inspects the given image name
InspectImage(ctx context.Context, imageName string) (*config.ImageDetails, error)
// BuildDevContainer builds a devcontainer
BuildDevContainer(
ctx context.Context,
labels []string,
parsedConfig *config.SubstitutedConfig,
extendedBuildInfo *feature.ExtendedBuildInfo,
dockerfilePath,
dockerfileContent string,
localWorkspaceFolder string,
options config.BuildOptions,
) (*config.BuildInfo, error)
// PushDevContainer pushes the given image to a registry
PushDevContainer(ctx context.Context, image string) error
// ComposeHelper returns the compose helper
ComposeHelper() (*compose.ComposeHelper, error)
}