dstlled-diff for docker/compose (3635303..cb00aaa -- **.go)

Files changed (25) hide show
  1. {3635303 → cb00aaa}/cmd/compose/compose.go +7 -1
  2. {3635303 → cb00aaa}/cmd/compose/config.go +2 -0
  3. {3635303 → cb00aaa}/cmd/compose/watch.go +2 -1
  4. {3635303 → cb00aaa}/cmd/formatter/shortcut.go +5 -3
  5. {3635303 → cb00aaa}/docs/yaml/main/generate.go +3 -2
  6. {3635303 → cb00aaa}/internal/tracing/keyboard_metrics.go +1 -1
  7. {3635303 → cb00aaa}/pkg/api/api.go +2 -1
  8. {3635303 → cb00aaa}/pkg/api/dryrunclient.go +21 -21
  9. {3635303 → cb00aaa}/pkg/api/io.go +1 -1
  10. {3635303 → cb00aaa}/pkg/compose/compose.go +2 -2
  11. {3635303 → cb00aaa}/pkg/compose/containers.go +0 -1
  12. {3635303 → cb00aaa}/pkg/compose/convergence.go +1 -1
  13. {3635303 → cb00aaa}/pkg/compose/cp.go +1 -1
  14. {3635303 → cb00aaa}/pkg/compose/create.go +2 -2
  15. {3635303 → cb00aaa}/pkg/compose/create_test.go +1 -0
  16. {3635303 → cb00aaa}/pkg/compose/watch.go +7 -1
  17. {3635303 → cb00aaa}/pkg/e2e/compose_environment_test.go +1 -0
  18. {3635303 → cb00aaa}/pkg/e2e/compose_test.go +4 -1
  19. {3635303 → cb00aaa}/pkg/e2e/compose_up_test.go +1 -0
  20. cb00aaa/pkg/e2e/orphans_test.go +1 -0
  21. {3635303 → cb00aaa}/pkg/e2e/profiles_test.go +1 -0
  22. {3635303 → cb00aaa}/pkg/mocks/mock_docker_api.go +21 -21
  23. {3635303 → cb00aaa}/pkg/mocks/mock_docker_cli.go +1 -1
  24. cb00aaa/pkg/progress/json.go +22 -0
  25. {3635303 → cb00aaa}/pkg/progress/writer.go +5 -5
{3635303 → cb00aaa}/cmd/compose/compose.go RENAMED
@@ -23,0 +24,4 @@ type ProjectServicesFunc func(ctx context.Context, project *types.Project, servi
24
+ type jsonErrorData struct {
25
+ Error bool `json:"error,omitempty"`
26
+ Message string `json:"message,omitempty"`
27
+ }
@@ -25,0 +30,2 @@ func Adapt(fn Command) func(cmd *cobra.Command, args []string) error
30
+ func errorAsJSON(message string) string
31
+ func makeJSONError(err error) error
@@ -29 +35 @@ func RootCommand(dockerCli command.Cli, backend Backend) *cobra.Command
29
- func setEnvWithLocalDotEnv(prjOpts *ProjectOptions) error
35
+ func setEnvWithDotEnv(opts ProjectOptions) error
{3635303 → cb00aaa}/cmd/compose/config.go RENAMED
@@ -16,0 +17 @@ type configOptions struct {
17
+ environment bool
@@ -29,0 +31 @@ func runVariables(ctx context.Context, dockerCli command.Cli, opts configOptions
31
+ func runEnvironment(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string) error
{3635303 → cb00aaa}/cmd/compose/watch.go RENAMED
@@ -3 +3,2 @@ type watchOptions struct {
3
- noUp bool
3
+ prune bool
4
+ noUp bool
{3635303 → cb00aaa}/cmd/formatter/shortcut.go RENAMED
@@ -8 +8 @@ type KeyboardWatch struct {
8
- WatchFn func(ctx context.Context, project *types.Project, services []string, options api.WatchOptions) error
8
+ WatchFn func(ctx context.Context, doneCh chan bool, project *types.Project, services []string, options api.WatchOptions) error
@@ -24,0 +25 @@ func NewKeyboardManager(ctx context.Context, isDockerDesktopActive, isWatchConfi
25
+ doneCh chan bool,
@@ -48,0 +50 @@ func (lk *LogKeyboard) openDDComposeUI(ctx context.Context, project *types.Proje
50
+ func (lk *LogKeyboard) openDDWatchDocs(ctx context.Context, project *types.Project)
@@ -50,2 +52,2 @@ func (lk *LogKeyboard) keyboardError(prefix string, err error)
50
- func (lk *LogKeyboard) StartWatch(ctx context.Context, project *types.Project, options api.UpOptions)
51
- func (lk *LogKeyboard) HandleKeyEvents(event keyboard.KeyEvent, ctx context.Context, project *types.Project, options api.UpOptions)
52
+ func (lk *LogKeyboard) StartWatch(ctx context.Context, doneCh chan bool, project *types.Project, options api.UpOptions)
53
+ func (lk *LogKeyboard) HandleKeyEvents(event keyboard.KeyEvent, ctx context.Context, doneCh chan bool, project *types.Project, options api.UpOptions)
{3635303 → cb00aaa}/docs/yaml/main/generate.go RENAMED
@@ -2,2 +2,3 @@ type options struct {
2
- source string
3
- target string
2
+ source string
3
+ target string
4
+ formats []string
{3635303 → cb00aaa}/internal/tracing/keyboard_metrics.go RENAMED
@@ -1 +1 @@
1
- func KeyboardMetrics(ctx context.Context, enabled, isDockerDesktopActive, isWatchConfigured bool)
1
+ func KeyboardMetrics(ctx context.Context, enabled, isDockerDesktopActive, isWatchConfigured, isDockerDesktopComposeUI bool)
{3635303 → cb00aaa}/pkg/api/api.go RENAMED
@@ -86,0 +87 @@ type WatchOptions struct {
87
+ Prune bool
@@ -126 +127 @@ type CreateOptions struct {
126
- // Timeout set delay to wait for container to gracelfuly stop before sending SIGKILL
127
+ // Timeout set delay to wait for container to gracefully stop before sending SIGKILL
{3635303 → cb00aaa}/pkg/api/dryrunclient.go RENAMED
@@ -27,2 +27,2 @@ func (d *DryRunClient) ContainerUnpause(ctx context.Context, container string) e
27
- func (d *DryRunClient) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, moby.ContainerPathStat, error)
28
- func (d *DryRunClient) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options moby.CopyToContainerOptions) error
27
+ func (d *DryRunClient) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, containerType.PathStat, error)
28
+ func (d *DryRunClient) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options containerType.CopyToContainerOptions) error
@@ -35 +35 @@ func (d *DryRunClient) NetworkConnect(ctx context.Context, networkName, containe
35
- func (d *DryRunClient) NetworkCreate(ctx context.Context, name string, options moby.NetworkCreate) (moby.NetworkCreateResponse, error)
35
+ func (d *DryRunClient) NetworkCreate(ctx context.Context, name string, options network.CreateOptions) (network.CreateResponse, error)
@@ -40,2 +40,2 @@ func (d *DryRunClient) VolumeRemove(ctx context.Context, volumeID string, force
40
- func (d *DryRunClient) ContainerExecCreate(ctx context.Context, container string, config moby.ExecConfig) (moby.IDResponse, error)
41
- func (d *DryRunClient) ContainerExecStart(ctx context.Context, execID string, config moby.ExecStartCheck) error
40
+ func (d *DryRunClient) ContainerExecCreate(ctx context.Context, container string, config containerType.ExecOptions) (moby.IDResponse, error)
41
+ func (d *DryRunClient) ContainerExecStart(ctx context.Context, execID string, config containerType.ExecStartOptions) error
@@ -49,2 +49,2 @@ func (d *DryRunClient) ContainerDiff(ctx context.Context, container string) ([]c
49
- func (d *DryRunClient) ContainerExecAttach(ctx context.Context, execID string, config moby.ExecStartCheck) (moby.HijackedResponse, error)
50
- func (d *DryRunClient) ContainerExecInspect(ctx context.Context, execID string) (moby.ContainerExecInspect, error)
49
+ func (d *DryRunClient) ContainerExecAttach(ctx context.Context, execID string, config containerType.ExecStartOptions) (moby.HijackedResponse, error)
50
+ func (d *DryRunClient) ContainerExecInspect(ctx context.Context, execID string) (containerType.ExecInspect, error)
@@ -56,3 +56,3 @@ func (d *DryRunClient) ContainerResize(ctx context.Context, container string, op
56
- func (d *DryRunClient) ContainerStatPath(ctx context.Context, container, path string) (moby.ContainerPathStat, error)
57
- func (d *DryRunClient) ContainerStats(ctx context.Context, container string, stream bool) (moby.ContainerStats, error)
58
- func (d *DryRunClient) ContainerStatsOneShot(ctx context.Context, container string) (moby.ContainerStats, error)
56
+ func (d *DryRunClient) ContainerStatPath(ctx context.Context, container, path string) (containerType.PathStat, error)
57
+ func (d *DryRunClient) ContainerStats(ctx context.Context, container string, stream bool) (containerType.StatsResponseReader, error)
58
+ func (d *DryRunClient) ContainerStatsOneShot(ctx context.Context, container string) (containerType.StatsResponseReader, error)
@@ -62 +62 @@ func (d *DryRunClient) ContainerWait(ctx context.Context, container string, cond
62
- func (d *DryRunClient) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (moby.ContainersPruneReport, error)
62
+ func (d *DryRunClient) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (containerType.PruneReport, error)
@@ -68 +68 @@ func (d *DryRunClient) ImageHistory(ctx context.Context, imageName string) ([]im
68
- func (d *DryRunClient) ImageImport(ctx context.Context, source moby.ImageImportSource, ref string, options image.ImportOptions) (io.ReadCloser, error)
68
+ func (d *DryRunClient) ImageImport(ctx context.Context, source image.ImportSource, ref string, options image.ImportOptions) (io.ReadCloser, error)
@@ -70,2 +70,2 @@ func (d *DryRunClient) ImageList(ctx context.Context, options image.ListOptions)
70
- func (d *DryRunClient) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (moby.ImageLoadResponse, error)
71
- func (d *DryRunClient) ImageSearch(ctx context.Context, term string, options moby.ImageSearchOptions) ([]registry.SearchResult, error)
70
+ func (d *DryRunClient) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (image.LoadResponse, error)
71
+ func (d *DryRunClient) ImageSearch(ctx context.Context, term string, options registry.SearchOptions) ([]registry.SearchResult, error)
@@ -74 +74 @@ func (d *DryRunClient) ImageTag(ctx context.Context, imageName, ref string) erro
74
- func (d *DryRunClient) ImagesPrune(ctx context.Context, pruneFilter filters.Args) (moby.ImagesPruneReport, error)
74
+ func (d *DryRunClient) ImagesPrune(ctx context.Context, pruneFilter filters.Args) (image.PruneReport, error)
@@ -79,4 +79,4 @@ func (d *DryRunClient) NodeUpdate(ctx context.Context, nodeID string, version sw
79
- func (d *DryRunClient) NetworkInspect(ctx context.Context, networkName string, options moby.NetworkInspectOptions) (moby.NetworkResource, error)
80
- func (d *DryRunClient) NetworkInspectWithRaw(ctx context.Context, networkName string, options moby.NetworkInspectOptions) (moby.NetworkResource, []byte, error)
81
- func (d *DryRunClient) NetworkList(ctx context.Context, options moby.NetworkListOptions) ([]moby.NetworkResource, error)
82
- func (d *DryRunClient) NetworksPrune(ctx context.Context, pruneFilter filters.Args) (moby.NetworksPruneReport, error)
79
+ func (d *DryRunClient) NetworkInspect(ctx context.Context, networkName string, options network.InspectOptions) (network.Inspect, error)
80
+ func (d *DryRunClient) NetworkInspectWithRaw(ctx context.Context, networkName string, options network.InspectOptions) (network.Inspect, []byte, error)
81
+ func (d *DryRunClient) NetworkList(ctx context.Context, options network.ListOptions) ([]network.Inspect, error)
82
+ func (d *DryRunClient) NetworksPrune(ctx context.Context, pruneFilter filters.Args) (network.PruneReport, error)
@@ -114 +114 @@ func (d *DryRunClient) SecretUpdate(ctx context.Context, id string, version swar
114
- func (d *DryRunClient) Events(ctx context.Context, options moby.EventsOptions) (<-chan events.Message, <-chan error)
114
+ func (d *DryRunClient) Events(ctx context.Context, options events.ListOptions) (<-chan events.Message, <-chan error)
@@ -122 +122 @@ func (d *DryRunClient) VolumeList(ctx context.Context, opts volume.ListOptions)
122
- func (d *DryRunClient) VolumesPrune(ctx context.Context, pruneFilter filters.Args) (moby.VolumesPruneReport, error)
122
+ func (d *DryRunClient) VolumesPrune(ctx context.Context, pruneFilter filters.Args) (volume.PruneReport, error)
{3635303 → cb00aaa}/pkg/api/io.go RENAMED
@@ -3 +3 @@ type Streams interface {
3
- Err() io.Writer
3
+ Err() *streams.Out
{3635303 → cb00aaa}/pkg/compose/compose.go RENAMED
@@ -27,2 +27,2 @@ func (s *composeService) stdin() *streams.In
27
- func (s *composeService) stderr() io.Writer
28
- func (s *composeService) stdinfo() io.Writer
27
+ func (s *composeService) stderr() *streams.Out
28
+ func (s *composeService) stdinfo() *streams.Out
{3635303 → cb00aaa}/pkg/compose/containers.go RENAMED
@@ -7 +6,0 @@ func isRunning() containerPredicate
7
- func isNotService(services ...string) containerPredicate
{3635303 → cb00aaa}/pkg/compose/convergence.go RENAMED
@@ -16 +15,0 @@ func nextContainerNumber(containers []moby.Container) int
16
- func setDependentLifecycle(project *types.Project, service string, strategy string)
@@ -21,0 +21 @@ func (c *convergence) ensureService(ctx context.Context, project *types.Project,
21
+ func (c *convergence) stopDependentContainers(ctx context.Context, project *types.Project, service types.ServiceConfig) error
{3635303 → cb00aaa}/pkg/compose/cp.go RENAMED
@@ -2 +2 @@ type copyDirection int
2
- func splitCpArg(arg string) (container, path string)
2
+ func splitCpArg(arg string) (ctr, path string)
{3635303 → cb00aaa}/pkg/compose/create.go RENAMED
@@ -28 +28 @@ func getDeployResources(s types.ServiceConfig) container.Resources
28
- func toUlimits(m map[string]*types.UlimitsConfig) []*units.Ulimit
28
+ func toUlimits(m map[string]*types.UlimitsConfig) []*container.Ulimit
@@ -43 +43 @@ func buildMount(project types.Project, volume types.ServiceVolumeConfig) (mount.
43
- func buildMountOptions(project types.Project, volume types.ServiceVolumeConfig) (*mount.BindOptions, *mount.VolumeOptions, *mount.TmpfsOptions)
43
+ func buildMountOptions(volume types.ServiceVolumeConfig) (*mount.BindOptions, *mount.VolumeOptions, *mount.TmpfsOptions)
{3635303 → cb00aaa}/pkg/compose/create_test.go RENAMED
@@ -7,0 +8 @@ func TestDefaultNetworkSettings(t *testing.T)
8
+ func TestCreateEndpointSettings(t *testing.T)
{3635303 → cb00aaa}/pkg/compose/watch.go RENAMED
@@ -12,0 +13 @@ func writeWatchSyncMessage(log api.LogConsumer, serviceName string, pathMappings
13
+ func shouldIgnore(name string, ignore watch.PathMatcher) bool
@@ -16 +17,2 @@ func (s *composeService) Watch(ctx context.Context, project *types.Project, serv
16
- func (s *composeService) watch(ctx context.Context, project *types.Project, name string, options api.WatchOptions, watcher watch.Notify, syncer sync.Syncer, triggers []types.Trigger) error
17
+ func (s *composeService) watch(ctx context.Context, syncChannel chan bool, project *types.Project, services []string, options api.WatchOptions) error
18
+ func (s *composeService) watchEvents(ctx context.Context, project *types.Project, name string, options api.WatchOptions, watcher watch.Notify, syncer sync.Syncer, triggers []types.Trigger) error
@@ -20,0 +23,4 @@ func (s *composeService) handleWatchBatch(ctx context.Context, project *types.Pr
23
+ func (s *composeService) pruneDanglingImagesOnRebuild(ctx context.Context, projectName string, imageNameToIdMap map[string]string)
24
+ func (s *composeService) initialSync(ctx context.Context, project *types.Project, service types.ServiceConfig, trigger types.Trigger, ignore watch.PathMatcher, syncer sync.Syncer) error
25
+ func (s *composeService) initialSyncFiles(ctx context.Context, project *types.Project, service types.ServiceConfig, trigger types.Trigger, ignore watch.PathMatcher) ([]sync.PathMapping, error)
26
+ func (s *composeService) imageCreatedTime(ctx context.Context, project *types.Project, serviceName string) (time.Time, error)
{3635303 → cb00aaa}/pkg/e2e/compose_environment_test.go RENAMED
@@ -3,0 +4 @@ func TestCommentsInEnvFile(t *testing.T)
4
+ func TestUnsetEnv(t *testing.T)
{3635303 → cb00aaa}/pkg/e2e/compose_test.go RENAMED
@@ -11 +11,3 @@ func TestRemoveOrphaned(t *testing.T)
11
- func TestResolveDotEnv(t *testing.T)
11
+ func TestComposeFileSetByDotEnv(t *testing.T)
12
+ func TestComposeFileSetByProjectDirectory(t *testing.T)
13
+ func TestComposeFileSetByEnvFile(t *testing.T)
@@ -12,0 +15 @@ func TestNestedDotEnv(t *testing.T)
15
+ func TestUnnecessaryResources(t *testing.T)
{3635303 → cb00aaa}/pkg/e2e/compose_up_test.go RENAMED
@@ -5,0 +6 @@ func TestStdoutStderr(t *testing.T)
6
+ func TestLoggingDriver(t *testing.T)
cb00aaa/pkg/e2e/orphans_test.go ADDED
@@ -0,0 +1 @@
1
+ func TestRemoveOrphans(t *testing.T)
{3635303 → cb00aaa}/pkg/e2e/profiles_test.go RENAMED
@@ -3,0 +4 @@ func TestActiveProfileViaTargetedService(t *testing.T)
4
+ func TestDotEnvProfileUsage(t *testing.T)
{3635303 → cb00aaa}/pkg/mocks/mock_docker_api.go RENAMED
@@ -42 +42 @@ func (mr *MockAPIClientMockRecorder) ContainerDiff(arg0, arg1 any) *gomock.Call
42
- func (m *MockAPIClient) ContainerExecAttach(arg0 context.Context, arg1 string, arg2 types.ExecStartCheck) (types.HijackedResponse, error)
42
+ func (m *MockAPIClient) ContainerExecAttach(arg0 context.Context, arg1 string, arg2 container.ExecStartOptions) (types.HijackedResponse, error)
@@ -44 +44 @@ func (mr *MockAPIClientMockRecorder) ContainerExecAttach(arg0, arg1, arg2 any) *
44
- func (m *MockAPIClient) ContainerExecCreate(arg0 context.Context, arg1 string, arg2 types.ExecConfig) (types.IDResponse, error)
44
+ func (m *MockAPIClient) ContainerExecCreate(arg0 context.Context, arg1 string, arg2 container.ExecOptions) (types.IDResponse, error)
@@ -46 +46 @@ func (mr *MockAPIClientMockRecorder) ContainerExecCreate(arg0, arg1, arg2 any) *
46
- func (m *MockAPIClient) ContainerExecInspect(arg0 context.Context, arg1 string) (types.ContainerExecInspect, error)
46
+ func (m *MockAPIClient) ContainerExecInspect(arg0 context.Context, arg1 string) (container.ExecInspect, error)
@@ -50 +50 @@ func (mr *MockAPIClientMockRecorder) ContainerExecResize(arg0, arg1, arg2 any) *
50
- func (m *MockAPIClient) ContainerExecStart(arg0 context.Context, arg1 string, arg2 types.ExecStartCheck) error
50
+ func (m *MockAPIClient) ContainerExecStart(arg0 context.Context, arg1 string, arg2 container.ExecStartOptions) error
@@ -76 +76 @@ func (mr *MockAPIClientMockRecorder) ContainerStart(arg0, arg1, arg2 any) *gomoc
76
- func (m *MockAPIClient) ContainerStatPath(arg0 context.Context, arg1, arg2 string) (types.ContainerPathStat, error)
76
+ func (m *MockAPIClient) ContainerStatPath(arg0 context.Context, arg1, arg2 string) (container.PathStat, error)
@@ -78 +78 @@ func (mr *MockAPIClientMockRecorder) ContainerStatPath(arg0, arg1, arg2 any) *go
78
- func (m *MockAPIClient) ContainerStats(arg0 context.Context, arg1 string, arg2 bool) (types.ContainerStats, error)
78
+ func (m *MockAPIClient) ContainerStats(arg0 context.Context, arg1 string, arg2 bool) (container.StatsResponseReader, error)
@@ -80 +80 @@ func (mr *MockAPIClientMockRecorder) ContainerStats(arg0, arg1, arg2 any) *gomoc
80
- func (m *MockAPIClient) ContainerStatsOneShot(arg0 context.Context, arg1 string) (types.ContainerStats, error)
80
+ func (m *MockAPIClient) ContainerStatsOneShot(arg0 context.Context, arg1 string) (container.StatsResponseReader, error)
@@ -92 +92 @@ func (mr *MockAPIClientMockRecorder) ContainerWait(arg0, arg1, arg2 any) *gomock
92
- func (m *MockAPIClient) ContainersPrune(arg0 context.Context, arg1 filters.Args) (types.ContainersPruneReport, error)
92
+ func (m *MockAPIClient) ContainersPrune(arg0 context.Context, arg1 filters.Args) (container.PruneReport, error)
@@ -94 +94 @@ func (mr *MockAPIClientMockRecorder) ContainersPrune(arg0, arg1 any) *gomock.Cal
94
- func (m *MockAPIClient) CopyFromContainer(arg0 context.Context, arg1, arg2 string) (io.ReadCloser, types.ContainerPathStat, error)
94
+ func (m *MockAPIClient) CopyFromContainer(arg0 context.Context, arg1, arg2 string) (io.ReadCloser, container.PathStat, error)
@@ -96 +96 @@ func (mr *MockAPIClientMockRecorder) CopyFromContainer(arg0, arg1, arg2 any) *go
96
- func (m *MockAPIClient) CopyToContainer(arg0 context.Context, arg1, arg2 string, arg3 io.Reader, arg4 types.CopyToContainerOptions) error
96
+ func (m *MockAPIClient) CopyToContainer(arg0 context.Context, arg1, arg2 string, arg3 io.Reader, arg4 container.CopyToContainerOptions) error
@@ -108 +108 @@ func (mr *MockAPIClientMockRecorder) DistributionInspect(arg0, arg1, arg2 any) *
108
- func (m *MockAPIClient) Events(arg0 context.Context, arg1 types.EventsOptions) (<-chan events.Message, <-chan error)
108
+ func (m *MockAPIClient) Events(arg0 context.Context, arg1 events.ListOptions) (<-chan events.Message, <-chan error)
@@ -118 +118 @@ func (mr *MockAPIClientMockRecorder) ImageHistory(arg0, arg1 any) *gomock.Call
118
- func (m *MockAPIClient) ImageImport(arg0 context.Context, arg1 types.ImageImportSource, arg2 string, arg3 image.ImportOptions) (io.ReadCloser, error)
118
+ func (m *MockAPIClient) ImageImport(arg0 context.Context, arg1 image.ImportSource, arg2 string, arg3 image.ImportOptions) (io.ReadCloser, error)
@@ -124 +124 @@ func (mr *MockAPIClientMockRecorder) ImageList(arg0, arg1 any) *gomock.Call
124
- func (m *MockAPIClient) ImageLoad(arg0 context.Context, arg1 io.Reader, arg2 bool) (types.ImageLoadResponse, error)
124
+ func (m *MockAPIClient) ImageLoad(arg0 context.Context, arg1 io.Reader, arg2 bool) (image.LoadResponse, error)
@@ -134 +134 @@ func (mr *MockAPIClientMockRecorder) ImageSave(arg0, arg1 any) *gomock.Call
134
- func (m *MockAPIClient) ImageSearch(arg0 context.Context, arg1 string, arg2 types.ImageSearchOptions) ([]registry.SearchResult, error)
134
+ func (m *MockAPIClient) ImageSearch(arg0 context.Context, arg1 string, arg2 registry.SearchOptions) ([]registry.SearchResult, error)
@@ -138 +138 @@ func (mr *MockAPIClientMockRecorder) ImageTag(arg0, arg1, arg2 any) *gomock.Call
138
- func (m *MockAPIClient) ImagesPrune(arg0 context.Context, arg1 filters.Args) (types.ImagesPruneReport, error)
138
+ func (m *MockAPIClient) ImagesPrune(arg0 context.Context, arg1 filters.Args) (image.PruneReport, error)
@@ -148 +148 @@ func (mr *MockAPIClientMockRecorder) NetworkConnect(arg0, arg1, arg2, arg3 any)
148
- func (m *MockAPIClient) NetworkCreate(arg0 context.Context, arg1 string, arg2 types.NetworkCreate) (types.NetworkCreateResponse, error)
148
+ func (m *MockAPIClient) NetworkCreate(arg0 context.Context, arg1 string, arg2 network.CreateOptions) (network.CreateResponse, error)
@@ -152 +152 @@ func (mr *MockAPIClientMockRecorder) NetworkDisconnect(arg0, arg1, arg2, arg3 an
152
- func (m *MockAPIClient) NetworkInspect(arg0 context.Context, arg1 string, arg2 types.NetworkInspectOptions) (types.NetworkResource, error)
152
+ func (m *MockAPIClient) NetworkInspect(arg0 context.Context, arg1 string, arg2 network.InspectOptions) (network.Inspect, error)
@@ -154 +154 @@ func (mr *MockAPIClientMockRecorder) NetworkInspect(arg0, arg1, arg2 any) *gomoc
154
- func (m *MockAPIClient) NetworkInspectWithRaw(arg0 context.Context, arg1 string, arg2 types.NetworkInspectOptions) (types.NetworkResource, []byte, error)
154
+ func (m *MockAPIClient) NetworkInspectWithRaw(arg0 context.Context, arg1 string, arg2 network.InspectOptions) (network.Inspect, []byte, error)
@@ -156 +156 @@ func (mr *MockAPIClientMockRecorder) NetworkInspectWithRaw(arg0, arg1, arg2 any)
156
- func (m *MockAPIClient) NetworkList(arg0 context.Context, arg1 types.NetworkListOptions) ([]types.NetworkResource, error)
156
+ func (m *MockAPIClient) NetworkList(arg0 context.Context, arg1 network.ListOptions) ([]network.Inspect, error)
@@ -160 +160 @@ func (mr *MockAPIClientMockRecorder) NetworkRemove(arg0, arg1 any) *gomock.Call
160
- func (m *MockAPIClient) NetworksPrune(arg0 context.Context, arg1 filters.Args) (types.NetworksPruneReport, error)
160
+ func (m *MockAPIClient) NetworksPrune(arg0 context.Context, arg1 filters.Args) (network.PruneReport, error)
@@ -250 +250 @@ func (mr *MockAPIClientMockRecorder) VolumeUpdate(arg0, arg1, arg2, arg3 any) *g
250
- func (m *MockAPIClient) VolumesPrune(arg0 context.Context, arg1 filters.Args) (types.VolumesPruneReport, error)
250
+ func (m *MockAPIClient) VolumesPrune(arg0 context.Context, arg1 filters.Args) (volume.PruneReport, error)
{3635303 → cb00aaa}/pkg/mocks/mock_docker_cli.go RENAMED
@@ -30 +30 @@ func (mr *MockCliMockRecorder) DockerEndpoint() *gomock.Call
30
- func (m *MockCli) Err() io.Writer
30
+ func (m *MockCli) Err() *streams.Out
cb00aaa/pkg/progress/json.go ADDED
@@ -0,0 +1,22 @@
1
+ type jsonWriter struct {
2
+ out io.Writer
3
+ done chan bool
4
+ dryRun bool
5
+ }
6
+ type jsonMessage struct {
7
+ DryRun bool `json:"dry-run,omitempty"`
8
+ Tail bool `json:"tail,omitempty"`
9
+ ID string `json:"id,omitempty"`
10
+ ParentID string `json:"parent_id,omitempty"`
11
+ Text string `json:"text,omitempty"`
12
+ Status string `json:"status,omitempty"`
13
+ Current int64 `json:"current,omitempty"`
14
+ Total int64 `json:"total,omitempty"`
15
+ Percent int `json:"percent,omitempty"`
16
+ }
17
+ func (p *jsonWriter) Start(ctx context.Context) error
18
+ func (p *jsonWriter) Event(e Event)
19
+ func (p *jsonWriter) Events(events []Event)
20
+ func (p *jsonWriter) TailMsgf(msg string, args ...interface{})
21
+ func (p *jsonWriter) Stop()
22
+ func (p *jsonWriter) HasMore(bool)
{3635303 → cb00aaa}/pkg/progress/writer.go RENAMED
@@ -13,5 +13,5 @@ func ContextWriter(ctx context.Context) Writer
13
- func Run(ctx context.Context, pf progressFunc, out io.Writer) error
14
- func RunWithTitle(ctx context.Context, pf progressFunc, out io.Writer, progressTitle string) error
15
- func RunWithStatus(ctx context.Context, pf progressFuncWithStatus, out io.Writer, progressTitle string) (string, error)
16
- func NewWriter(ctx context.Context, out io.Writer, progressTitle string) (Writer, error)
17
- func newTTYWriter(out console.File, dryRun bool, progressTitle string) (Writer, error)
13
+ func Run(ctx context.Context, pf progressFunc, out *streams.Out) error
14
+ func RunWithTitle(ctx context.Context, pf progressFunc, out *streams.Out, progressTitle string) error
15
+ func RunWithStatus(ctx context.Context, pf progressFuncWithStatus, out *streams.Out, progressTitle string) (string, error)
16
+ func NewWriter(ctx context.Context, out *streams.Out, progressTitle string) (Writer, error)
17
+ func newTTYWriter(out io.Writer, dryRun bool, progressTitle string) (Writer, error)