tario

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2018 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CompressionLevel = pgzip.DefaultCompression

CompressionLevel is the compression level of image layers. Default is pgzip.DefaultCompression.

Functions

func ApplyHeader

func ApplyHeader(path string, header *tar.Header) error

ApplyHeader updates file owner, mtime, and permission bits according to header. It doesn't change size or type (i.e file to dir).

func IsSimilarHeader

func IsSimilarHeader(h *tar.Header, nh *tar.Header) (bool, error)

IsSimilarHeader returns if the given headers are describing similar entries.

func NewGzipReader

func NewGzipReader(r io.Reader) (io.ReadCloser, error)

NewGzipReader returns a new gzip reader.

func NewGzipWriter

func NewGzipWriter(w io.Writer) (io.WriteCloser, error)

NewGzipWriter returns a new gzip writer with compression level.

func SetCompressionLevel

func SetCompressionLevel(compressionLevelStr string) error

SetCompressionLevel sets global var CompressionLevel.

func WriteEntry

func WriteEntry(w *tar.Writer, src string, h *tar.Header) error

WriteEntry write the file from the local filesystem into the tar writer. This function doesn't handle parent directories.

func WriteHeader

func WriteHeader(w *tar.Writer, h *tar.Header) error

WriteHeader writes the header given to the tar writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL