digest

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRepoDigestUnavailable returned when repo digest is not available.
	ErrRepoDigestUnavailable = errors.New("repo digest unavailable for the image, " +
		"has it been pushed to or pulled from a registry?")
)

Functions

func DirSha256

func DirSha256(dirPath string, logger *logger.Logger) (string, error)

DirSha256 returns sha256 digest of a directory

func DockerImageSha256

func DockerImageSha256(imageID string) (string, error)

DockerImageSha256 returns a sha256 digest of a docker image. imageID can be the image name or ID It requires the docker daemon to be accessible and the docker image to be locally present. The docker image must have been pushed into a registry to have a digest.

func FileSha256

func FileSha256(filepath string) (string, error)

FileSha256 returns a sha256 digest of a file.

func RemoteDockerImageSha256

func RemoteDockerImageSha256(imageName, imageTag, registryEndPoint, registryToken string, logger *logger.Logger) (string, error)

RemoteDockerImageSha256 returns a sha256 digest of a docker image by reading it from remote docker registry

func ValidateDigest

func ValidateDigest(sha256ToCheck string) error

ValidateDigest checks if a digest matches the sha256 regex

Types

This section is empty.

Jump to

Keyboard shortcuts

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