write

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package write provides functionality to write files with image digests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IWriter added in v0.7.2

type IWriter interface {
	Kind() kind.Kind
	WriteFiles(
		pathImages map[string][]interface{},
		outputDir string,
		done <-chan struct{},
	) <-chan IWrittenPath
}

IWriter provides an interface for Writers, which are responsible for writing files with information from a Lockfile to paths in outputDir.

func NewComposefileWriter added in v0.7.2

func NewComposefileWriter(
	dockerfileWriter IWriter,
	excludeTags bool,
) (IWriter, error)

NewComposefileWriter returns an IWriter for Composefiles. dockerfileWriter cannot be nil as it handles writing Dockerfiles referenced by Composefiles.

func NewDockerfileWriter added in v0.7.2

func NewDockerfileWriter(excludeTags bool) IWriter

NewDockerfileWriter returns an IWriter for Dockerfiles.

func NewKubernetesfileWriter added in v0.7.2

func NewKubernetesfileWriter(excludeTags bool) IWriter

NewKubernetesfileWriter returns an IWriter for Kubernetesfiles.

type IWrittenPath added in v0.7.2

type IWrittenPath interface {
	OriginalPath() string
	SetOriginalPath(originalPath string)
	NewPath() string
	SetNewPath(newPath string)
	Err() error
	SetErr(err error)
}

IWrittenPath provides an interface for WrittenPaths, which contain the original path from a Lockfile and a new path written by an IWriter.

func NewWrittenPath added in v0.7.2

func NewWrittenPath(
	originalPath string,
	newPath string,
	err error,
) IWrittenPath

NewWrittenPath returns an IWrittenPath that contains information linking a newly written file and its original.

Jump to

Keyboard shortcuts

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