Documentation ¶
Overview ¶
Package storagearchive implements archive utilities.
Index ¶
- func Tar(ctx context.Context, writer io.Writer, readBucket storage.ReadBucket, ...) (retErr error)
- func Untar(ctx context.Context, reader io.Reader, readWriteBucket storage.ReadWriteBucket, ...) error
- func Unzip(ctx context.Context, readerAt io.ReaderAt, size int64, ...) error
- func Zip(ctx context.Context, writer io.Writer, readBucket storage.ReadBucket, ...) (retErr error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Tar ¶
func Tar( ctx context.Context, writer io.Writer, readBucket storage.ReadBucket, options ...normalpath.TransformerOption, ) (retErr error)
Tar tars the given bucket to the writer.
Only regular files are added to the writer. All files are written as 0644.
Paths from the bucket will be transformed before adding to the writer.
func Untar ¶
func Untar( ctx context.Context, reader io.Reader, readWriteBucket storage.ReadWriteBucket, options ...normalpath.TransformerOption, ) error
Untar untars the given tar archive from the reader into the bucket.
Only regular files are added to the bucket.
Paths from the tar archive will be transformed before adding to the bucket.
func Unzip ¶
func Unzip( ctx context.Context, readerAt io.ReaderAt, size int64, readWriteBucket storage.ReadWriteBucket, options ...normalpath.TransformerOption, ) error
Unzip unzips the given zip archive from the reader into the bucket.
Only regular files are added to the bucket.
Paths from the zip archive will be transformed before adding to the bucket.
func Zip ¶
func Zip( ctx context.Context, writer io.Writer, readBucket storage.ReadBucket, options ...normalpath.TransformerOption, ) (retErr error)
Zip zips the given bucket to the writer.
Only regular files are added to the writer.
Paths from the bucket will be transformed before adding to the writer.
Types ¶
This section is empty.