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 IPreprocessor ¶ added in v0.7.2
type IPreprocessor interface {
PreprocessLockfile(
lockfile map[kind.Kind]map[string][]interface{},
) (map[kind.Kind]map[string][]interface{}, error)
}
IPreprocessor provides an interface for Preprocessors, which are responsible for modifying a Lockfile, if need be, before rewriting.
func NewPreprocessor ¶ added in v0.7.2
func NewPreprocessor( preprocessors ...preprocess.IPreprocessor, ) (IPreprocessor, error)
NewPreprocessor creates an IPreprocessor from IPreprocessors for different kinds of files. At least one preprocessor must be non nil, otherwise there would be no way to preprocess files.
type IRenamer ¶
type IRenamer interface {
RenameFiles(writtenPaths <-chan write.IWrittenPath) error
}
IRenamer provides an interface for Renamers, which rename temporary files from IWriters to their original paths.
type IRewriter ¶ added in v0.7.2
IRewriter provides an interface for Rewriters, which are responsible for rewriting files referenced in a Lockfile with images from the Lockfile.
func NewRewriter ¶
func NewRewriter( preprocessor IPreprocessor, writer IWriter, renamer IRenamer, ) (IRewriter, error)
NewRewriter returns an IRewriter after ensuring writer and renamer are non nil.
type IWriter ¶
type IWriter interface {
WriteFiles(
lockfile map[kind.Kind]map[string][]interface{},
tempDir string,
done <-chan struct{},
) <-chan write.IWrittenPath
}
IWriter provides an interface for Writers, which are responsible for writing files from a Lockfile to temporary paths with images from the Lockfile.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package preprocess provides functionality to preprocess a Lockfile before rewriting.
|
Package preprocess provides functionality to preprocess a Lockfile before rewriting. |
|
Package write provides functionality to write files with image digests.
|
Package write provides functionality to write files with image digests. |