diff --git a/cmd/cmd.go b/cmd/cmd.go index ace01f3f2..3c35d3ae3 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -80,6 +80,7 @@ func NewPackCommand(logger ConfigurableLogger) (*cobra.Command, error) { rootCmd.AddCommand(commands.NewBuildpackCommand(logger, cfg, packClient, buildpackage.NewConfigReader())) rootCmd.AddCommand(commands.NewExtensionCommand(logger, cfg, packClient, buildpackage.NewConfigReader())) rootCmd.AddCommand(commands.NewConfigCommand(logger, cfg, cfgPath, packClient)) + rootCmd.AddCommand(commands.NewManifestCommand(logger, packClient)) rootCmd.AddCommand(commands.InspectImage(logger, imagewriter.NewFactory(), cfg, packClient)) rootCmd.AddCommand(commands.NewStackCommand(logger)) rootCmd.AddCommand(commands.Rebase(logger, cfg, packClient)) diff --git a/internal/commands/commands.go b/internal/commands/commands.go index 11fa645ca..286c2a43c 100644 --- a/internal/commands/commands.go +++ b/internal/commands/commands.go @@ -22,6 +22,13 @@ type PackClient interface { InspectImage(string, bool) (*client.ImageInfo, error) Rebase(context.Context, client.RebaseOptions) error CreateBuilder(context.Context, client.CreateBuilderOptions) error + CreateManifest(context.Context, string, []string) (imageID string, err error) + AnnotateManifest() error + AddManifest() error + DeleteManifest() error + RemoveManifest() error + PushManifest() error + InspectManifest() error NewBuildpack(context.Context, client.NewBuildpackOptions) error PackageBuildpack(ctx context.Context, opts client.PackageBuildpackOptions) error PackageExtension(ctx context.Context, opts client.PackageBuildpackOptions) error diff --git a/internal/commands/manifest.go b/internal/commands/manifest.go new file mode 100644 index 000000000..85fac2ba9 --- /dev/null +++ b/internal/commands/manifest.go @@ -0,0 +1,26 @@ +package commands + +import ( + "github.com/spf13/cobra" + + "github.com/buildpacks/pack/pkg/logging" +) + +func NewManifestCommand(logger logging.Logger, client PackClient) *cobra.Command { + cmd := &cobra.Command{ + Use: "manifest", + Short: "Interact with image index or manifest list", + RunE: nil, + } + + cmd.AddCommand(ManifestCreate(logger, client)) + cmd.AddCommand(ManifestAdd(logger, client)) + cmd.AddCommand(ManifestAnnotate(logger, client)) + cmd.AddCommand(ManifestDelete(logger, client)) + cmd.AddCommand(ManifestInspect(logger, client)) + cmd.AddCommand(ManifestPush(logger, client)) + cmd.AddCommand(ManifestRemove(logger, client)) + + AddHelpFlag(cmd, "builder") + return cmd +} diff --git a/internal/commands/manifest_add.go b/internal/commands/manifest_add.go index 44f7e809c..04432fb37 100644 --- a/internal/commands/manifest_add.go +++ b/internal/commands/manifest_add.go @@ -1,8 +1,9 @@ package commands import ( - "github.com/buildpacks/pack/pkg/logging" "github.com/spf13/cobra" + + "github.com/buildpacks/pack/pkg/logging" ) // ManifestAddFlags define flags provided to the ManifestAdd @@ -16,8 +17,8 @@ func ManifestAdd(logger logging.Logger, pack PackClient) *cobra.Command { var flags ManifestAddFlags cmd := &cobra.Command{ - Use: "pack manifest add [OPTIONS] [flags]", - Args: cobra.MatchAll(cobra.ExactArgs(2), cobra.OnlyValidArgs), + Use: "pack manifest add [OPTIONS] [flags]", + Args: cobra.MatchAll(cobra.ExactArgs(2), cobra.OnlyValidArgs), Short: "manifest add modifies a manifest list (Image index) and add a new image to the list of manifests.", Example: `pack manifest add cnbs/sample-package:hello-multiarch-universe \ cnbs/sample-package:hello-universe-riscv-linux`, @@ -36,4 +37,4 @@ func ManifestAdd(logger logging.Logger, pack PackClient) *cobra.Command { AddHelpFlag(cmd, "add") return cmd -} \ No newline at end of file +} diff --git a/internal/commands/manifest_add_test.go b/internal/commands/manifest_add_test.go index fe7b8c53f..07536081d 100644 --- a/internal/commands/manifest_add_test.go +++ b/internal/commands/manifest_add_test.go @@ -1 +1 @@ -package commands_test \ No newline at end of file +package commands_test diff --git a/internal/commands/manifest_annotate.go b/internal/commands/manifest_annotate.go index f975ec97b..64bcd83e7 100644 --- a/internal/commands/manifest_annotate.go +++ b/internal/commands/manifest_annotate.go @@ -1,8 +1,9 @@ package commands import ( - "github.com/buildpacks/pack/pkg/logging" "github.com/spf13/cobra" + + "github.com/buildpacks/pack/pkg/logging" ) // ManifestAnnotateFlags define flags provided to the ManifestAnnotate @@ -15,8 +16,8 @@ func ManifestAnnotate(logger logging.Logger, pack PackClient) *cobra.Command { var flags ManifestAnnotateFlags cmd := &cobra.Command{ - Use: "pack manifest annotate [OPTIONS] [flags]", - Args: cobra.MatchAll(cobra.ExactArgs(2), cobra.OnlyValidArgs), + Use: "pack manifest annotate [OPTIONS] [flags]", + Args: cobra.MatchAll(cobra.ExactArgs(2), cobra.OnlyValidArgs), Short: "manifest annotate modifies a manifest list (Image index) and update the platform information for an image included in the manifest list.", Example: `pack manifest annotate cnbs/sample-package:hello-universe-multiarch \ cnbs/sample-package:hello-universe --arch amd64`, @@ -34,4 +35,4 @@ func ManifestAnnotate(logger logging.Logger, pack PackClient) *cobra.Command { AddHelpFlag(cmd, "annotate") return cmd -} \ No newline at end of file +} diff --git a/internal/commands/manifest_annotate_test.go b/internal/commands/manifest_annotate_test.go index fe7b8c53f..07536081d 100644 --- a/internal/commands/manifest_annotate_test.go +++ b/internal/commands/manifest_annotate_test.go @@ -1 +1 @@ -package commands_test \ No newline at end of file +package commands_test diff --git a/internal/commands/manifest_create.go b/internal/commands/manifest_create.go index 1a9d8a397..1af72d3b8 100644 --- a/internal/commands/manifest_create.go +++ b/internal/commands/manifest_create.go @@ -1,13 +1,14 @@ package commands import ( - "github.com/buildpacks/pack/pkg/logging" "github.com/spf13/cobra" + + "github.com/buildpacks/pack/pkg/logging" ) // ManifestCreateFlags define flags provided to the ManifestCreate type ManifestCreateFlags struct { - format, registry string + format, registry string insecure, publish bool } @@ -16,8 +17,8 @@ func ManifestCreate(logger logging.Logger, pack PackClient) *cobra.Command { var flags ManifestCreateFlags cmd := &cobra.Command{ - Use: "pack manifest create [ ... ] [flags]", - Args: cobra.MatchAll(cobra.MinimumNArgs(2), cobra.OnlyValidArgs), + Use: "pack manifest create [ ... ] [flags]", + Args: cobra.MatchAll(cobra.MinimumNArgs(2), cobra.OnlyValidArgs), Short: "manifest create generates a manifest list for a multi-arch image", Example: `pack manifest create cnbs/sample-package:hello-multiarch-universe \ cnbs/sample-package:hello-universe \ @@ -27,6 +28,19 @@ func ManifestCreate(logger logging.Logger, pack PackClient) *cobra.Command { If the already exists in the registry: pack will save a local copy of the remote manifest list, If the doestn't exist in a registry: pack will create a local representation of the manifest list that will only save on the remote registry if the user publish it`, RunE: logError(logger, func(cmd *cobra.Command, args []string) error { + // manifestList := args[0] + // manifests := args[1:] + + // if cmd.Flags().Changed("insecure") { + // flags.insecure = !flags.insecure + // } + + // if cmd.Flags().Changed("publish") { + // flags.publish = !flags.publish + // } + + // id, err := pack.CreateManifest() + return nil }), } @@ -38,4 +52,4 @@ func ManifestCreate(logger logging.Logger, pack PackClient) *cobra.Command { AddHelpFlag(cmd, "create") return cmd -} \ No newline at end of file +} diff --git a/internal/commands/manifest_create_test.go b/internal/commands/manifest_create_test.go index fe7b8c53f..07536081d 100644 --- a/internal/commands/manifest_create_test.go +++ b/internal/commands/manifest_create_test.go @@ -1 +1 @@ -package commands_test \ No newline at end of file +package commands_test diff --git a/internal/commands/manifest_inspect.go b/internal/commands/manifest_inspect.go index f9769826b..a7111166a 100644 --- a/internal/commands/manifest_inspect.go +++ b/internal/commands/manifest_inspect.go @@ -1,8 +1,9 @@ package commands import ( - "github.com/buildpacks/pack/pkg/logging" "github.com/spf13/cobra" + + "github.com/buildpacks/pack/pkg/logging" ) // ManifestInspectFlags define flags provided to the ManifestInspect @@ -14,9 +15,9 @@ func ManifestInspect(logger logging.Logger, pack PackClient) *cobra.Command { // var flags ManifestInspectFlags cmd := &cobra.Command{ - Use: "pack manifest inspect [flags]", - Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), - Short: "manifest inspect shows the manifest information stored in local storage", + Use: "pack manifest inspect [flags]", + Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), + Short: "manifest inspect shows the manifest information stored in local storage", Example: `pack manifest inspect cnbs/sample-builder:multiarch`, Long: `manifest inspect shows the manifest information stored in local storage. @@ -28,4 +29,4 @@ func ManifestInspect(logger logging.Logger, pack PackClient) *cobra.Command { AddHelpFlag(cmd, "inspect") return cmd -} \ No newline at end of file +} diff --git a/internal/commands/manifest_inspect_test.go b/internal/commands/manifest_inspect_test.go index fe7b8c53f..07536081d 100644 --- a/internal/commands/manifest_inspect_test.go +++ b/internal/commands/manifest_inspect_test.go @@ -1 +1 @@ -package commands_test \ No newline at end of file +package commands_test diff --git a/internal/commands/manifest_push.go b/internal/commands/manifest_push.go index fd0e20043..ffe13e553 100644 --- a/internal/commands/manifest_push.go +++ b/internal/commands/manifest_push.go @@ -1,13 +1,14 @@ package commands import ( - "github.com/buildpacks/pack/pkg/logging" "github.com/spf13/cobra" + + "github.com/buildpacks/pack/pkg/logging" ) // ManifestPushFlags define flags provided to the ManifestPush type ManifestPushFlags struct { - format string + format string insecure, purge bool } @@ -16,9 +17,9 @@ func ManifestPush(logger logging.Logger, pack PackClient) *cobra.Command { var flags ManifestPushFlags cmd := &cobra.Command{ - Use: "pack manifest push [OPTIONS] [flags]", - Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), - Short: "manifest push pushes a manifest list (Image index) to a registry.", + Use: "pack manifest push [OPTIONS] [flags]", + Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), + Short: "manifest push pushes a manifest list (Image index) to a registry.", Example: `pack manifest push cnbs/sample-package:hello-multiarch-universe`, Long: `manifest push pushes a manifest list (Image index) to a registry. @@ -34,4 +35,4 @@ func ManifestPush(logger logging.Logger, pack PackClient) *cobra.Command { AddHelpFlag(cmd, "push") return cmd -} \ No newline at end of file +} diff --git a/internal/commands/manifest_push_test.go b/internal/commands/manifest_push_test.go index fe7b8c53f..07536081d 100644 --- a/internal/commands/manifest_push_test.go +++ b/internal/commands/manifest_push_test.go @@ -1 +1 @@ -package commands_test \ No newline at end of file +package commands_test diff --git a/internal/commands/manifest_remove.go b/internal/commands/manifest_remove.go index d00681127..888ae1c98 100644 --- a/internal/commands/manifest_remove.go +++ b/internal/commands/manifest_remove.go @@ -1,8 +1,9 @@ package commands import ( - "github.com/buildpacks/pack/pkg/logging" "github.com/spf13/cobra" + + "github.com/buildpacks/pack/pkg/logging" ) // ManifestDeleteFlags define flags provided to the ManifestDelete @@ -14,9 +15,9 @@ func ManifestDelete(logger logging.Logger, pack PackClient) *cobra.Command { // var flags ManifestDeleteFlags cmd := &cobra.Command{ - Use: "pack manifest remove [manifest-list] [manifest-list...] [flags]", - Args: cobra.MatchAll(cobra.MinimumNArgs(1), cobra.OnlyValidArgs), - Short: "Delete one or more manifest lists from local storage", + Use: "pack manifest remove [manifest-list] [manifest-list...] [flags]", + Args: cobra.MatchAll(cobra.MinimumNArgs(1), cobra.OnlyValidArgs), + Short: "Delete one or more manifest lists from local storage", Example: `pack manifest remove cnbs/sample-package:hello-multiarch-universe`, Long: `Delete one or more manifest lists from local storage. @@ -28,4 +29,4 @@ func ManifestDelete(logger logging.Logger, pack PackClient) *cobra.Command { AddHelpFlag(cmd, "remove") return cmd -} \ No newline at end of file +} diff --git a/internal/commands/manifest_remove_test.go b/internal/commands/manifest_remove_test.go index fe7b8c53f..07536081d 100644 --- a/internal/commands/manifest_remove_test.go +++ b/internal/commands/manifest_remove_test.go @@ -1 +1 @@ -package commands_test \ No newline at end of file +package commands_test diff --git a/internal/commands/manifest_rm.go b/internal/commands/manifest_rm.go index 233f42185..2562db2dd 100644 --- a/internal/commands/manifest_rm.go +++ b/internal/commands/manifest_rm.go @@ -1,8 +1,9 @@ package commands import ( - "github.com/buildpacks/pack/pkg/logging" "github.com/spf13/cobra" + + "github.com/buildpacks/pack/pkg/logging" ) // ManifestRemoveFlags define flags provided to the ManifestRemove @@ -14,8 +15,8 @@ func ManifestRemove(logger logging.Logger, pack PackClient) *cobra.Command { // var flags ManifestRemoveFlags cmd := &cobra.Command{ - Use: "pack manifest rm [manifest-list] [manifest] [manifest...] [flags]", - Args: cobra.MatchAll(cobra.MinimumNArgs(2), cobra.OnlyValidArgs), + Use: "pack manifest rm [manifest-list] [manifest] [manifest...] [flags]", + Args: cobra.MatchAll(cobra.MinimumNArgs(2), cobra.OnlyValidArgs), Short: "manifest rm will remove the specified image manifest if it is already referenced in the index", Example: `pack manifest rm cnbs/sample-package:hello-multiarch-universe \ cnbs/sample-package:hello-universe-windows`, @@ -29,4 +30,4 @@ func ManifestRemove(logger logging.Logger, pack PackClient) *cobra.Command { AddHelpFlag(cmd, "rm") return cmd -} \ No newline at end of file +} diff --git a/internal/commands/manifest_rm_test.go b/internal/commands/manifest_rm_test.go index fe7b8c53f..07536081d 100644 --- a/internal/commands/manifest_rm_test.go +++ b/internal/commands/manifest_rm_test.go @@ -1 +1 @@ -package commands_test \ No newline at end of file +package commands_test diff --git a/internal/commands/testmocks/mock_pack_client.go b/internal/commands/testmocks/mock_pack_client.go index f49b92def..56d872895 100644 --- a/internal/commands/testmocks/mock_pack_client.go +++ b/internal/commands/testmocks/mock_pack_client.go @@ -36,6 +36,34 @@ func (m *MockPackClient) EXPECT() *MockPackClientMockRecorder { return m.recorder } +// AddManifest mocks base method. +func (m *MockPackClient) AddManifest() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddManifest") + ret0, _ := ret[0].(error) + return ret0 +} + +// AddManifest indicates an expected call of AddManifest. +func (mr *MockPackClientMockRecorder) AddManifest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddManifest", reflect.TypeOf((*MockPackClient)(nil).AddManifest)) +} + +// AnnotateManifest mocks base method. +func (m *MockPackClient) AnnotateManifest() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AnnotateManifest") + ret0, _ := ret[0].(error) + return ret0 +} + +// AnnotateManifest indicates an expected call of AnnotateManifest. +func (mr *MockPackClientMockRecorder) AnnotateManifest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnotateManifest", reflect.TypeOf((*MockPackClient)(nil).AnnotateManifest)) +} + // Build mocks base method. func (m *MockPackClient) Build(arg0 context.Context, arg1 client.BuildOptions) error { m.ctrl.T.Helper() @@ -64,6 +92,35 @@ func (mr *MockPackClientMockRecorder) CreateBuilder(arg0, arg1 interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBuilder", reflect.TypeOf((*MockPackClient)(nil).CreateBuilder), arg0, arg1) } +// CreateManifest mocks base method. +func (m *MockPackClient) CreateManifest(arg0 context.Context, arg1 string, arg2 []string) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateManifest", arg0, arg1, arg2) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateManifest indicates an expected call of CreateManifest. +func (mr *MockPackClientMockRecorder) CreateManifest(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateManifest", reflect.TypeOf((*MockPackClient)(nil).CreateManifest), arg0, arg1, arg2) +} + +// DeleteManifest mocks base method. +func (m *MockPackClient) DeleteManifest() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteManifest") + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteManifest indicates an expected call of DeleteManifest. +func (mr *MockPackClientMockRecorder) DeleteManifest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteManifest", reflect.TypeOf((*MockPackClient)(nil).DeleteManifest)) +} + // DownloadSBOM mocks base method. func (m *MockPackClient) DownloadSBOM(arg0 string, arg1 client.DownloadSBOMOptions) error { m.ctrl.T.Helper() @@ -143,6 +200,20 @@ func (mr *MockPackClientMockRecorder) InspectImage(arg0, arg1 interface{}) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InspectImage", reflect.TypeOf((*MockPackClient)(nil).InspectImage), arg0, arg1) } +// InspectManifest mocks base method. +func (m *MockPackClient) InspectManifest() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "InspectManifest") + ret0, _ := ret[0].(error) + return ret0 +} + +// InspectManifest indicates an expected call of InspectManifest. +func (mr *MockPackClientMockRecorder) InspectManifest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InspectManifest", reflect.TypeOf((*MockPackClient)(nil).InspectManifest)) +} + // NewBuildpack mocks base method. func (m *MockPackClient) NewBuildpack(arg0 context.Context, arg1 client.NewBuildpackOptions) error { m.ctrl.T.Helper() @@ -199,6 +270,20 @@ func (mr *MockPackClientMockRecorder) PullBuildpack(arg0, arg1 interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullBuildpack", reflect.TypeOf((*MockPackClient)(nil).PullBuildpack), arg0, arg1) } +// PushManifest mocks base method. +func (m *MockPackClient) PushManifest() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PushManifest") + ret0, _ := ret[0].(error) + return ret0 +} + +// PushManifest indicates an expected call of PushManifest. +func (mr *MockPackClientMockRecorder) PushManifest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PushManifest", reflect.TypeOf((*MockPackClient)(nil).PushManifest)) +} + // Rebase mocks base method. func (m *MockPackClient) Rebase(arg0 context.Context, arg1 client.RebaseOptions) error { m.ctrl.T.Helper() @@ -227,6 +312,20 @@ func (mr *MockPackClientMockRecorder) RegisterBuildpack(arg0, arg1 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterBuildpack", reflect.TypeOf((*MockPackClient)(nil).RegisterBuildpack), arg0, arg1) } +// RemoveManifest mocks base method. +func (m *MockPackClient) RemoveManifest() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RemoveManifest") + ret0, _ := ret[0].(error) + return ret0 +} + +// RemoveManifest indicates an expected call of RemoveManifest. +func (mr *MockPackClientMockRecorder) RemoveManifest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveManifest", reflect.TypeOf((*MockPackClient)(nil).RemoveManifest)) +} + // YankBuildpack mocks base method. func (m *MockPackClient) YankBuildpack(arg0 client.YankBuildpackOptions) error { m.ctrl.T.Helper() diff --git a/pkg/client/add_manifest.go b/pkg/client/add_manifest.go new file mode 100644 index 000000000..387651e8c --- /dev/null +++ b/pkg/client/add_manifest.go @@ -0,0 +1,6 @@ +package client + +// AddManifest implements commands.PackClient. +func (*Client) AddManifest() error { + panic("unimplemented") +} diff --git a/pkg/client/add_manifest_test.go b/pkg/client/add_manifest_test.go new file mode 100644 index 000000000..e169c0b61 --- /dev/null +++ b/pkg/client/add_manifest_test.go @@ -0,0 +1 @@ +package client_test diff --git a/pkg/client/annotate_manifest.go b/pkg/client/annotate_manifest.go new file mode 100644 index 000000000..c489b1a0a --- /dev/null +++ b/pkg/client/annotate_manifest.go @@ -0,0 +1,6 @@ +package client + +// AnnotateManifest implements commands.PackClient. +func (*Client) AnnotateManifest() error { + panic("unimplemented") +} diff --git a/pkg/client/annotate_manifest_test.go b/pkg/client/annotate_manifest_test.go new file mode 100644 index 000000000..e169c0b61 --- /dev/null +++ b/pkg/client/annotate_manifest_test.go @@ -0,0 +1 @@ +package client_test diff --git a/pkg/client/create_manifest.go b/pkg/client/create_manifest.go new file mode 100644 index 000000000..a6e2a97ee --- /dev/null +++ b/pkg/client/create_manifest.go @@ -0,0 +1,8 @@ +package client + +import "context" + +// CreateManifest implements commands.PackClient. +func (*Client) CreateManifest(context.Context, string, []string) (imageID string, err error) { + panic("unimplemented") +} diff --git a/pkg/client/create_manifest_test.go b/pkg/client/create_manifest_test.go new file mode 100644 index 000000000..e169c0b61 --- /dev/null +++ b/pkg/client/create_manifest_test.go @@ -0,0 +1 @@ +package client_test diff --git a/pkg/client/delete_manifest.go b/pkg/client/delete_manifest.go new file mode 100644 index 000000000..0ff257d82 --- /dev/null +++ b/pkg/client/delete_manifest.go @@ -0,0 +1,6 @@ +package client + +// DeleteManifest implements commands.PackClient. +func (*Client) DeleteManifest() error { + panic("unimplemented") +} diff --git a/pkg/client/delete_manifest_test.go b/pkg/client/delete_manifest_test.go new file mode 100644 index 000000000..e169c0b61 --- /dev/null +++ b/pkg/client/delete_manifest_test.go @@ -0,0 +1 @@ +package client_test diff --git a/pkg/client/inspect_manifest.go b/pkg/client/inspect_manifest.go new file mode 100644 index 000000000..5bb211a05 --- /dev/null +++ b/pkg/client/inspect_manifest.go @@ -0,0 +1,6 @@ +package client + +// InspectManifest implements commands.PackClient. +func (*Client) InspectManifest() error { + panic("unimplemented") +} diff --git a/pkg/client/inspect_manifest_test.go b/pkg/client/inspect_manifest_test.go new file mode 100644 index 000000000..e169c0b61 --- /dev/null +++ b/pkg/client/inspect_manifest_test.go @@ -0,0 +1 @@ +package client_test diff --git a/pkg/client/push_manifest.go b/pkg/client/push_manifest.go new file mode 100644 index 000000000..16a0254de --- /dev/null +++ b/pkg/client/push_manifest.go @@ -0,0 +1,6 @@ +package client + +// PushManifest implements commands.PackClient. +func (*Client) PushManifest() error { + panic("unimplemented") +} diff --git a/pkg/client/push_manifest_test.go b/pkg/client/push_manifest_test.go new file mode 100644 index 000000000..e169c0b61 --- /dev/null +++ b/pkg/client/push_manifest_test.go @@ -0,0 +1 @@ +package client_test diff --git a/pkg/client/remove_manifest.go b/pkg/client/remove_manifest.go new file mode 100644 index 000000000..83dcca078 --- /dev/null +++ b/pkg/client/remove_manifest.go @@ -0,0 +1,6 @@ +package client + +// RemoveManifest implements commands.PackClient. +func (*Client) RemoveManifest() error { + panic("unimplemented") +} diff --git a/pkg/client/remove_manifest_test.go b/pkg/client/remove_manifest_test.go new file mode 100644 index 000000000..e169c0b61 --- /dev/null +++ b/pkg/client/remove_manifest_test.go @@ -0,0 +1 @@ +package client_test diff --git a/pkg/testmocks/mock_docker_client.go b/pkg/testmocks/mock_docker_client.go index 18b51c18f..5ba29fec5 100644 --- a/pkg/testmocks/mock_docker_client.go +++ b/pkg/testmocks/mock_docker_client.go @@ -224,10 +224,10 @@ func (mr *MockCommonAPIClientMockRecorder) ContainerCreate(arg0, arg1, arg2, arg } // ContainerDiff mocks base method. -func (m *MockCommonAPIClient) ContainerDiff(arg0 context.Context, arg1 string) ([]container.ContainerChangeResponseItem, error) { +func (m *MockCommonAPIClient) ContainerDiff(arg0 context.Context, arg1 string) ([]container.FilesystemChange, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ContainerDiff", arg0, arg1) - ret0, _ := ret[0].([]container.ContainerChangeResponseItem) + ret0, _ := ret[0].([]container.FilesystemChange) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -1338,7 +1338,7 @@ func (mr *MockCommonAPIClientMockRecorder) PluginUpgrade(arg0, arg1, arg2 interf } // RegistryLogin mocks base method. -func (m *MockCommonAPIClient) RegistryLogin(arg0 context.Context, arg1 types.AuthConfig) (registry.AuthenticateOKBody, error) { +func (m *MockCommonAPIClient) RegistryLogin(arg0 context.Context, arg1 registry.AuthConfig) (registry.AuthenticateOKBody, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RegistryLogin", arg0, arg1) ret0, _ := ret[0].(registry.AuthenticateOKBody) @@ -1725,7 +1725,7 @@ func (mr *MockCommonAPIClientMockRecorder) VolumeInspectWithRaw(arg0, arg1 inter } // VolumeList mocks base method. -func (m *MockCommonAPIClient) VolumeList(arg0 context.Context, arg1 filters.Args) (volume.ListResponse, error) { +func (m *MockCommonAPIClient) VolumeList(arg0 context.Context, arg1 volume.ListOptions) (volume.ListResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "VolumeList", arg0, arg1) ret0, _ := ret[0].(volume.ListResponse)