archive_extractor

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const DebArchiverSkipFoldersCheckParamsKey = "DebArchiverSkipFoldersCheckParamsKey"
View Source
const (
	NotCompressedOrNotSupportedError = "file %v is not compressed or the compression method is not supported"
)
View Source
const (
	RpmTagModularityLabel = 5096
)

Variables

View Source
var ErrTooManyEntries = errors.New("too many entries in archive")

Functions

func IsErrCompressLimitReached added in v1.2.2

func IsErrCompressLimitReached(err error) bool

Types

type ArchiveData

type ArchiveData struct {
	ArchiveReader io.Reader
	IsFolder      bool
	Name          string
	ModTime       int64
	Size          int64
}

type ArchiveHeader

type ArchiveHeader struct {
	ArchiveReader io.Reader
	IsFolder      bool
	Name          string
	ModTime       int64
	Size          int64
}

func NewArchiveHeader

func NewArchiveHeader(archiveReader io.Reader, name string, modTime int64, size int64) *ArchiveHeader

type Archiver

type Archiver interface {
	ExtractArchive(path string, processingFunc func(header *ArchiveHeader, params map[string]interface{}) error, params map[string]interface{}) error
}

type DebArchiver added in v1.1.0

type DebArchiver struct {
	MaxCompressRatio   int64
	MaxNumberOfEntries int
}

func (DebArchiver) ExtractArchive added in v1.1.0

func (da DebArchiver) ExtractArchive(path string,
	processingFunc func(*ArchiveHeader, map[string]interface{}) error, params map[string]interface{}) error

type Decompressor added in v1.4.0

type Decompressor struct {
	MaxCompressRatio int64
}

func (Decompressor) ExtractArchive added in v1.4.0

func (dc Decompressor) ExtractArchive(path string,
	processingFunc func(*ArchiveHeader, map[string]interface{}) error, params map[string]interface{}) error

type ErrCompressLimitReached added in v1.2.0

type ErrCompressLimitReached struct {
	SizeLimit int64
	CurrSize  int64
}

func (*ErrCompressLimitReached) Error added in v1.2.2

func (ErrCompressLimit *ErrCompressLimitReached) Error() string

type GzMetadataArchiver

type GzMetadataArchiver struct {
	MaxCompressRatio int64
}

func (GzMetadataArchiver) ExtractArchive

func (ga GzMetadataArchiver) ExtractArchive(path string,
	processingFunc func(*ArchiveHeader, map[string]interface{}) error, params map[string]interface{}) error

type LimitAggregatingReadCloser added in v1.2.0

type LimitAggregatingReadCloser interface {
	Read(p []byte) (int, error)
	Close() error
}

type LimitAggregatingReadCloserProvider added in v1.2.0

type LimitAggregatingReadCloserProvider struct {
	Total int64
	Limit int64
}

func (*LimitAggregatingReadCloserProvider) CreateLimitAggregatingReadCloser added in v1.2.0

func (provider *LimitAggregatingReadCloserProvider) CreateLimitAggregatingReadCloser(rc io.Reader) LimitAggregatingReadCloser

type RarArchiver added in v1.4.0

type RarArchiver struct {
	MaxCompressRatio   int64
	MaxNumberOfEntries int
}

func (RarArchiver) ExtractArchive added in v1.4.0

func (ra RarArchiver) ExtractArchive(path string,
	processingFunc func(*ArchiveHeader, map[string]interface{}) error, params map[string]interface{}) error

type RpmArchiver added in v1.1.0

type RpmArchiver struct {
	MaxCompressRatio   int64
	MaxNumberOfEntries int
}

func (RpmArchiver) ExtractArchive added in v1.1.0

func (ra RpmArchiver) ExtractArchive(path string,
	processingFunc func(*ArchiveHeader, map[string]interface{}) error, params map[string]interface{}) error

type RpmPkg

type RpmPkg struct {
	Name            string
	Version         string
	Release         string
	Epoch           int
	Licenses        []string
	Vendor          string
	ModularityLabel string
}

type SevenZipArchiver added in v1.1.0

type SevenZipArchiver struct {
	MaxCompressRatio   int64
	MaxNumberOfEntries int
}

func (SevenZipArchiver) ExtractArchive added in v1.1.0

func (sa SevenZipArchiver) ExtractArchive(path string,
	processingFunc func(*ArchiveHeader, map[string]interface{}) error, params map[string]interface{}) error

type SevenZipReader

type SevenZipReader struct {
	Archive *archive.Archive
	Size    int
}

func (*SevenZipReader) Close added in v1.2.0

func (a *SevenZipReader) Close() error

func (*SevenZipReader) Read

func (a *SevenZipReader) Read(p []byte) (n int, err error)

type TarArchiver added in v1.1.0

type TarArchiver struct {
	MaxCompressRatio   int64
	MaxNumberOfEntries int
}

func (TarArchiver) ExtractArchive added in v1.1.0

func (ta TarArchiver) ExtractArchive(path string,
	processingFunc func(*ArchiveHeader, map[string]interface{}) error, params map[string]interface{}) error

type ZipArchiver added in v1.1.0

type ZipArchiver struct {
	MaxCompressRatio   int64
	MaxNumberOfEntries int
}

func (ZipArchiver) ExtractArchive added in v1.1.0

func (za ZipArchiver) ExtractArchive(path string,
	processingFunc func(*ArchiveHeader, map[string]interface{}) error, params map[string]interface{}) error

type ZipReadCloser added in v1.3.0

type ZipReadCloser struct {
	*zip.Reader
	io.Closer
}

type ZoneInfoFileError added in v1.5.1

type ZoneInfoFileError struct{}

func (*ZoneInfoFileError) Error added in v1.5.1

func (e *ZoneInfoFileError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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