write

package
v0.8.11-beta Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 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

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

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

func NewDockerfileWriter(excludeTags bool) IWriter

NewDockerfileWriter returns an IWriter for Dockerfiles.

func NewKubernetesfileWriter

func NewKubernetesfileWriter(excludeTags bool) IWriter

NewKubernetesfileWriter returns an IWriter for Kubernetesfiles.

type IWrittenPath

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

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