Documentation
¶
Index ¶
- func Databases(ctx context.Context, docker client.ContainerAPIClient, ...) ([]string, error)
- func Perform(ctx context.Context, docker client.ContainerAPIClient, opts *Options) error
- func Prompt(ctx context.Context, reader io.Reader, docker client.ContainerAPIClient, ...) (string, string, string, string, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Databases ¶
func Databases(ctx context.Context, docker client.ContainerAPIClient, containerID, compatibility string) ([]string, error)
Databases is used to get a list of all the databases for a specific engine. It is returned as a slice of strings using the containers hostname (e.g. mysql-8.0-3306) so it can be presented to the user as a list.
func Perform ¶
Perform is used to perform a backup for a database container, it does not prompt the user as it assumed the Prompt func above is used to determine the engine (container) and the specific database to backup. Perform accepts the backup commands and is agnostic to the database engine for the requested backup.
func Prompt ¶
func Prompt(ctx context.Context, reader io.Reader, docker client.ContainerAPIClient, output terminal.Outputer, containers []types.Container, containerList []string) (string, string, string, string, error)
Prompt is used to ask a user for input and walk them through selecting a database engine (container) and a database. It will return the container ID as the first string, the database name, and the last return is an error.