Documentation ¶
Index ¶
- Variables
- func DirSha256(dirPath string, logger *logger.Logger) (string, error)
- func DockerImageSha256(imageID string) (string, error)
- func FileSha256(filepath string) (string, error)
- func RemoteDockerImageSha256(imageName, imageTag, registryEndPoint, registryToken string, ...) (string, error)
- func ValidateDigest(sha256ToCheck string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( errors.New("repo digest unavailable for the image, " + "has it been pushed to or pulled from a registry?") )ErrRepoDigestUnavailable =
Functions ¶
func DockerImageSha256 ¶
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 ¶
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 ¶
ValidateDigest checks if a digest matches the sha256 regex
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.