Documentation
¶
Index ¶
- type MetadataProvider
- type Recorder
- func (r Recorder) EmptyFile(target string) error
- func (r Recorder) Executable(binaryPath, target string, accessor runfilesSupplier) error
- func (r Recorder) Header(hdr *tar.Header) error
- func (r Recorder) ImportTar(tarFile string) error
- func (r Recorder) RegularFile(f io.Reader, info fs.FileInfo, target string) error
- func (r Recorder) RegularFileFromPath(filePath, target string) error
- func (r Recorder) RegularFromHeader(hdr *tar.Header, content io.Reader) error
- func (r Recorder) RegularFromHeaderAndPath(hdr *tar.Header, filePath string) error
- func (r Recorder) Symlink(target, linkName string) error
- func (r Recorder) Tree(fsys fs.FS, target string) error
- func (r Recorder) TreeFromPath(dirPath, target string) error
- func (r Recorder) WithMetadata(metadata MetadataProvider) Recorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataProvider ¶
MetadataProvider is an interface for applying metadata to tar headers
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
func NewRecorder ¶
func (Recorder) Executable ¶
func (Recorder) Header ¶ added in v0.3.19
Header records a non-regular entry (directory, symlink, device, ...) from a caller-supplied tar header.
Unlike the other Recorder methods, the header is used as given: no metadata provider is consulted and no fields are defaulted. This is for callers that have already decided every field, such as base image content rules whose whole purpose is to specify modes and ownership.
func (Recorder) RegularFile ¶
func (Recorder) RegularFileFromPath ¶
func (Recorder) RegularFromHeader ¶ added in v0.3.19
RegularFromHeader records a regular file from a caller-supplied tar header and an in-memory body. As with Header, the header is used verbatim.
func (Recorder) RegularFromHeaderAndPath ¶ added in v0.3.19
RegularFromHeaderAndPath records a regular file from a caller-supplied tar header, with the content read from a file on disk. As with Header, the header is used verbatim.
func (Recorder) Tree ¶
Tree records a directory tree (including all files and subdirectories). It creates a symlink in the tar file that points to the root of the tree.
func (Recorder) TreeFromPath ¶
func (Recorder) WithMetadata ¶
func (r Recorder) WithMetadata(metadata MetadataProvider) Recorder
WithMetadata returns a new Recorder with the given metadata provider