util

package
v0.0.0-...-a9240ff Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: AGPL-3.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BopmaticImageRepo      = "bopmatic/build"
	BopmaticImageTag       = "latest"
	BopmaticBuildImageName = BopmaticImageRepo + ":" + BopmaticImageTag

	DockerInstallErrMsg = "Could not invoke docker; please double check that you have docker installed: %w"
)

Variables

View Source
var ErrImageNotFound = errors.New("image does not exist")

Functions

func CopyDir

func CopyDir(src string, dst string) error

func CopyFile

func CopyFile(src string, dst string) error

func CopyFileToDir

func CopyFileToDir(src string, dstDir string) error

func DoesLocalImageNeedUpdate

func DoesLocalImageNeedUpdate(repository string, tag string) (bool, error)

func GetLocalImageDigest

func GetLocalImageDigest(repository string, tag string) (string, error)

func GetRemoteImageDigest

func GetRemoteImageDigest(repository string, tag string) (string, error)

@todo investigate whether this is achievable with github.com/docker/docker rather than writing our own custom json parsing logic

func HasBopmaticBuildImage

func HasBopmaticBuildImage() (bool, error)

func HasImage

func HasImage(repository string, tag string) (bool, error)

func RenameFile

func RenameFile(src string, dst string) error

func RenameFileToDir

func RenameFileToDir(src string, dstDir string) error

func RunContainerCommand

func RunContainerCommand(ctx context.Context, cmdAndArgs []string,
	stdOut io.Writer, stdErr io.Writer) error

func RunHostCommand

func RunHostCommand(ctx context.Context, cmdAndArgs []string,
	stdOut io.Writer, stdErr io.Writer) error

func SymlinkFile

func SymlinkFile(src string, dst string) error

func SymlinkFileToDir

func SymlinkFileToDir(src string, dstDir string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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