Documentation ¶
Index ¶
- func BuildTar(fs vfs.FileSystem, root string, buf io.Writer) error
- func BuildTarGzip(fs vfs.FileSystem, root string, buf io.Writer) error
- func BuildTarGzipLayer(cache cache.Cache, fs vfs.FileSystem, path string, ...) (ocispecv1.Descriptor, error)
- func ExtractTar(ctx context.Context, tarStream io.Reader, fs vfs.FileSystem, ...) error
- func ExtractTarGzip(ctx context.Context, gzipStream io.Reader, fs vfs.FileSystem, ...) error
- type ExtractTarOption
- type ExtractTarOptions
- type Overwrite
- type ToPath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTar ¶
BuildTar creates a new tar based on a filesystem and a path. The tar is written to the given io.Writer.
func BuildTarGzip ¶
BuildTarGzip creates a new compressed tar based on a filesystem and a path. The tar is written to the given io.Writer.
func BuildTarGzipLayer ¶
func BuildTarGzipLayer(cache cache.Cache, fs vfs.FileSystem, path string, annotations map[string]string) (ocispecv1.Descriptor, error)
BuildTarGzipLayer tar and gzips the given path and adds the layer to the cache. It returns the newly creates ocispec Description for the tar.
func ExtractTar ¶
func ExtractTar(ctx context.Context, tarStream io.Reader, fs vfs.FileSystem, opts ...ExtractTarOption) error
ExtractTar extracts the content of a tar to the given filesystem with the given root base path
func ExtractTarGzip ¶
func ExtractTarGzip(ctx context.Context, gzipStream io.Reader, fs vfs.FileSystem, opts ...ExtractTarOption) error
ExtractTarGzip extracts the content of a tar to the given filesystem with the given root base path
Types ¶
type ExtractTarOption ¶
type ExtractTarOption interface {
ApplyOption(opts *ExtractTarOptions)
}
ExtractTarOption defines a interface to apply tar options.
type ExtractTarOptions ¶
ExtractTarOptions describes optional untar options.
func (*ExtractTarOptions) ApplyOptions ¶
func (opts *ExtractTarOptions) ApplyOptions(options []ExtractTarOption)
ApplyOptions applies all tar options to the current options.
type Overwrite ¶
type Overwrite bool
Overwrite configures if files/directories should be overwritten while untar.
func (Overwrite) ApplyOption ¶
func (o Overwrite) ApplyOption(opts *ExtractTarOptions)
type ToPath ¶
type ToPath string
ToPath configures the path where should be exported to.
func (ToPath) ApplyOption ¶
func (p ToPath) ApplyOption(opts *ExtractTarOptions)