package
0.0.0-20241008223417-305985c1b11e
Repository: https://github.com/krissetto/docker-cli.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
AddPlatformFlag adds `platform` to a set of flags for API version 1.32 and later.
AddTrustSigningFlags adds "signing" flags to the provided flagset.
AddTrustVerificationFlags adds content trust flags to the provided flagset.
BaseCommandAttributes returns an attribute.Set containing attributes to attach to metrics/traces.
ConfigureAuth handles prompting of user's username and password if needed.
CopyToFile writes the content of the reader to the specified file.
DefaultContextStoreConfig returns a new store.Config with the default set of endpoints configured.
DisableInputEcho disables input echo on the provided streams.In.
GetDefaultAuthConfig gets the default auth config given a serverAddress If credentials for given serverAddress exists in the credential store, the configuration will be populated with values in it.
GetDockerContext extracts metadata from stored context metadata.
NewAPIClientFromFlags creates a new APIClient from command line flags.
NewDockerCli returns a DockerCli instance with all operators applied on it.
PrettyPrint outputs arbitrary data for human formatted output by uppercasing the first letter.
PromptForConfirmation requests and checks confirmation from the user.
PromptForInput requests input from the user.
PromptUserForCredentials handles the CLI prompt for the user to input credentials.
PruneFilters returns consolidated prune filters obtained from config.json and cli.
RegisterDefaultStoreEndpoints registers a new named endpoint metadata type with the default context store config, so that endpoint will be supported by stores using the config returned by DefaultContextStoreConfig.
RegistryAuthenticationPrivilegedFunc returns a RequestPrivilegeFunc from the specified registry index info for the given command.
ResolveAuthConfig returns auth-config for the given registry from the credential-store.
ResolveDefaultContext creates a Metadata for the current CLI invocation parameters.
RetrieveAuthTokenFromImage retrieves an encoded auth token given a complete image.
ShowHelp shows the command help.
StringSliceReplaceAt replaces the sub-slice find, with the sub-slice replace, in the string slice s, returning a new slice and a boolean indicating if the replacement happened.
UserAgent returns the user agent string used for making API requests.
ValidateMountWithAPIVersion validates a mount with the server API version.
ValidateOutputPath validates the output paths of the `export` and `save` commands.
ValidateOutputPathFileMode validates the output paths of the `cp` command and serves as a helper to `ValidateOutputPath`.
WithAPIClient configures the cli to use the given API client.
WithBaseContext sets the base context of a cli.
WithCombinedStreams uses the same stream for the output and error streams.
WithContentTrust enables content trust on a cli.
WithContentTrustFromEnv enables content trust on a cli from environment variable DOCKER_CONTENT_TRUST value.
WithDefaultContextStoreConfig configures the cli to use the default context store configuration.
WithEnableGlobalMeterProvider configures the DockerCli to create a new MeterProvider from the initialized DockerCli struct, and set it as the global meter provider.
WithEnableGlobalTracerProvider configures the DockerCli to create a new TracerProvider from the initialized DockerCli struct, and set it as the global tracer provider.
WithErrorStream sets a cli error stream.
WithInitializeClient is passed to DockerCli.Initialize by callers who wish to set a particular API Client for use by the CLI.
WithInputStream sets a cli input stream.
WithOutputStream sets a cli output stream.
WithResource overwrites the default resource and prevents its creation.
WithResourceOptions configures additional options for the default resource.
WithStandardStreams sets a cli in, out and err streams with the standard streams.
# Constants
DefaultContextName is the name reserved for the default context (config & env based).
EnvOverrideContext is the name of the environment variable that can be used to override the context to use.
# Variables
No description provided by the author
# Structs
ContextStoreWithDefault implements the store.Store interface with a support for the default context.
DefaultContext contains the default context data for all endpoints.
DockerCli is an instance the docker command line client.
DockerContext is a typed representation of what we put in Context metadata.
ServerInfo stores details about the supported features and platform of the server.
# Interfaces
Cli represents the docker command line client.
EndpointDefaultResolver is implemented by any EndpointMeta object which wants to be able to populate the store with whatever their default is.
MeterProvider is an extension of the metric.MeterProvider interface for CLI programs.
Streams is an interface which exposes the standard input and output streams.
TelemetryClient provides the methods for using OTEL tracing or metrics.
TracerProvider is an extension of the trace.TracerProvider interface for CLI programs.
# Type aliases
CLIOption is a functional argument to apply options to a [DockerCli].
DefaultContextResolver is a function which resolves the default context base on the configuration and the env variables.