docker

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package docker runs shell snippets inside the local database containers, where the dump/restore tools already ship with a client version matching the local server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lines

func Lines(cmd *exec.Cmd, skip ...string) ([]string, error)

Lines runs cmd and returns its non-empty stdout lines minus those in skip, sorted.

func Output

func Output(cmd *exec.Cmd) (string, error)

Output runs cmd and returns trimmed stdout; stderr is folded into the error.

func Redact

func Redact(s string) string

Redact masks credentials in connection strings found in s.

func Sh

func Sh(ctx context.Context, container, script string, stdin bool, env map[string]string) *exec.Cmd

Sh builds `docker exec [-i] -e NAME... <container> sh -c <script>`. Values travel in the docker client's own environment; only the variable names appear on argv, so secrets are never visible in `ps` of the docker command. Scripts must reference values as "$NAME".

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL