verify

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package verify provides functions for verifying that an existing Lockfile is up-to-date.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	LockfilePath           string
	ConfigFile             string
	EnvFile                string
	DockerfileEnvBuildArgs bool
	Verbose                bool
}

Flags are all possible flags to initialize a Verifier.

func NewFlags

func NewFlags(
	lPath, configFile, envFile string,
	dfileEnvBuildArgs, verbose bool,
) (*Flags, error)

NewFlags creates flags for a Verifier.

type Verifier

type Verifier struct {
	Generator *generate.Generator
	Lockfile  *generate.Lockfile
}

Verifier ensures that a Lockfile contains up-to-date information.

func NewVerifier

func NewVerifier(flags *Flags) (*Verifier, error)

NewVerifier creates a Verifier from command line flags.

func (*Verifier) VerifyLockfile

func (v *Verifier) VerifyLockfile(wm *registry.WrapperManager) error

VerifyLockfile generates bytes for a new Lockfile and ensures that the existing Lockfile contains the same information. Specifically, the existing Lockfile must have:

(1) the same number of Dockerfiles and docker-compose files

(2) the same number of images in each Dockerfile and docker-compose file

(3) the same image in the proper order in each Dockerfile and docker-compose file

If any of these checks fail, VerifyLockfile will return an error.

Jump to

Keyboard shortcuts

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