archive

package
v0.0.0-...-3511abf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ArchiveTgz is a gzipped tar ball.
	ArchiveTgz = "tgz"
	// ArchiveZip is a zip file.
	ArchiveZip = "zip"
	// ArchiveUnknown represents an unknown archive type.
	ArchiveUnknown = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiveType

type ArchiveType string

ArchiveType currently includes tgz and zip.

type ArchiveWriter

type ArchiveWriter interface {
	WriteHeader(path string, size int64) error
	Write(b []byte) (int, error)
	Close() error
}

ArchiveWriter defines an interface to create an archive file.

func NewArchiveWriter

func NewArchiveWriter(w io.Writer, archiveType ArchiveType) (ArchiveWriter, error)

NewArchiveWriter returns a new ArchiveWriter for archiveType that writes to w.

Jump to

Keyboard shortcuts

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