1
0
mirror of https://github.com/docker/cli.git synced 2026-01-06 05:41:44 +03:00

Merge pull request #6370 from thaJeztah/remove_exported_config_funcs

cli/command/config: remove deprecated types and functions
This commit is contained in:
Sebastiaan van Stijn
2025-08-26 16:35:23 +02:00
committed by GitHub
4 changed files with 0 additions and 76 deletions

View File

@@ -15,16 +15,6 @@ import (
"github.com/spf13/cobra"
)
// CreateOptions specifies some options that are used when creating a config.
//
// Deprecated: this type was for internal use and will be removed in the next release.
type CreateOptions struct {
Name string
TemplateDriver string
File string
Labels opts.ListOpts
}
// createOptions specifies some options that are used when creating a config.
type createOptions struct {
name string
@@ -57,18 +47,6 @@ func newConfigCreateCommand(dockerCLI command.Cli) *cobra.Command {
return cmd
}
// RunConfigCreate creates a config with the given options.
//
// Deprecated: this function was for internal use and will be removed in the next release.
func RunConfigCreate(ctx context.Context, dockerCLI command.Cli, options CreateOptions) error {
return runCreate(ctx, dockerCLI, createOptions{
name: options.Name,
templateDriver: options.TemplateDriver,
file: options.File,
labels: options.Labels,
})
}
// runCreate creates a config with the given options.
func runCreate(ctx context.Context, dockerCLI command.Cli, options createOptions) error {
apiClient := dockerCLI.Client()

View File

@@ -15,15 +15,6 @@ import (
"github.com/spf13/cobra"
)
// InspectOptions contains options for the docker config inspect command.
//
// Deprecated: this type was for internal use and will be removed in the next release.
type InspectOptions struct {
Names []string
Format string
Pretty bool
}
// inspectOptions contains options for the docker config inspect command.
type inspectOptions struct {
names []string
@@ -51,17 +42,6 @@ func newConfigInspectCommand(dockerCLI command.Cli) *cobra.Command {
return cmd
}
// RunConfigInspect inspects the given Swarm config.
//
// Deprecated: this function was for internal use and will be removed in the next release.
func RunConfigInspect(ctx context.Context, dockerCLI command.Cli, opts InspectOptions) error {
return runInspect(ctx, dockerCLI, inspectOptions{
names: opts.Names,
format: opts.Format,
pretty: opts.Pretty,
})
}
// runInspect inspects the given Swarm config.
func runInspect(ctx context.Context, dockerCLI command.Cli, opts inspectOptions) error {
apiClient := dockerCLI.Client()

View File

@@ -15,15 +15,6 @@ import (
"github.com/spf13/cobra"
)
// ListOptions contains options for the docker config ls command.
//
// Deprecated: this type was for internal use and will be removed in the next release.
type ListOptions struct {
Quiet bool
Format string
Filter opts.FilterOpt
}
// listOptions contains options for the docker config ls command.
type listOptions struct {
quiet bool
@@ -53,17 +44,6 @@ func newConfigListCommand(dockerCLI command.Cli) *cobra.Command {
return cmd
}
// RunConfigList lists Swarm configs.
//
// Deprecated: this function was for internal use and will be removed in the next release.
func RunConfigList(ctx context.Context, dockerCLI command.Cli, options ListOptions) error {
return runList(ctx, dockerCLI, listOptions{
quiet: options.Quiet,
format: options.Format,
filter: options.Filter,
})
}
// runList lists Swarm configs.
func runList(ctx context.Context, dockerCLI command.Cli, options listOptions) error {
apiClient := dockerCLI.Client()

View File

@@ -10,13 +10,6 @@ import (
"github.com/spf13/cobra"
)
// RemoveOptions contains options for the docker config rm command.
//
// Deprecated: this type was for internal use and will be removed in the next release.
type RemoveOptions struct {
Names []string
}
func newConfigRemoveCommand(dockerCLI command.Cli) *cobra.Command {
return &cobra.Command{
Use: "rm CONFIG [CONFIG...]",
@@ -32,13 +25,6 @@ func newConfigRemoveCommand(dockerCLI command.Cli) *cobra.Command {
}
}
// RunConfigRemove removes the given Swarm configs.
//
// Deprecated: this function was for internal use and will be removed in the next release.
func RunConfigRemove(ctx context.Context, dockerCLI command.Cli, opts RemoveOptions) error {
return runRemove(ctx, dockerCLI, opts.Names)
}
// runRemove removes the given Swarm configs.
func runRemove(ctx context.Context, dockerCLI command.Cli, names []string) error {
apiClient := dockerCLI.Client()