Documentation
¶
Overview ¶
Package rewrite provides functionality to rewrite a Lockfile.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyPathImages ¶
type AnyPathImages struct {
DockerfilePathImages map[string][]*parse.DockerfileImage
ComposefilePathImages map[string][]*parse.ComposefileImage
}
AnyPathImages contains any possible type of path and associated images.
type IRenamer ¶
type IRenamer interface {
RenameFiles(writtenPaths <-chan *write.WrittenPath) error
}
IRenamer provides an interface for Renamer's exported methods.
type IWriter ¶
type IWriter interface {
WriteFiles(
anyPathImages *AnyPathImages,
done <-chan struct{},
) <-chan *write.WrittenPath
}
IWriter provides an interface for Writer's exported methods.
type Renamer ¶
type Renamer struct{}
Renamer renames written paths to their original file paths.
func (*Renamer) RenameFiles ¶
func (r *Renamer) RenameFiles( writtenPaths <-chan *write.WrittenPath, ) error
RenameFiles renames written paths to their original file paths.
type Rewriter ¶
Rewriter rewrites files referenced by a Lockfile with their image digests.
func NewRewriter ¶
NewRewriter returns a Rewriter after validating its fields.
type Writer ¶
type Writer struct {
DockerfileWriter write.IDockerfileWriter
ComposefileWriter write.IComposefileWriter
}
Writer is used to write files with their image digests.
func NewWriter ¶
func NewWriter( dockerfileWriter write.IDockerfileWriter, composefileWriter write.IComposefileWriter, ) (*Writer, error)
NewWriter returns a Writer after validating its fields.
func (*Writer) WriteFiles ¶
func (w *Writer) WriteFiles( anyPathImages *AnyPathImages, done <-chan struct{}, ) <-chan *write.WrittenPath
WriteFiles writes files with their image digests.