dump

package
v1.25.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedOutputTypes = []string{"zip", "tar", "tar.sz", "tar.gz", "tar.xz", "tar.bz2", "tar.br", "tar.lz4", "tar.zst"}

Functions

func IsSubdir

func IsSubdir(upper, lower string) (bool, error)

func PrepareFileNameAndType

func PrepareFileNameAndType(argFile, argType string) (outFileName, outType string)

PrepareFileNameAndType prepares the output file name and type, if the type is not supported, it returns an empty "outType"

Types

type Dumper

type Dumper struct {
	Verbose bool
	// contains filtered or unexported fields
}

func NewDumper

func NewDumper(ctx context.Context, format string, output io.Writer) (*Dumper, error)

func (*Dumper) AddFileByPath

func (dumper *Dumper) AddFileByPath(filePath, absPath string) error

AddFileByPath adds a file by its filesystem path

func (*Dumper) AddFileByReader

func (dumper *Dumper) AddFileByReader(r io.Reader, info os.FileInfo, customName string) error

AddFileByReader adds a file's contents from a Reader

func (*Dumper) AddRecursiveExclude

func (dumper *Dumper) AddRecursiveExclude(insidePath, absPath string, excludes []string) error

func (*Dumper) Close

func (dumper *Dumper) Close() error

func (*Dumper) GlobalExcludeAbsPath

func (dumper *Dumper) GlobalExcludeAbsPath(absPaths ...string)

Jump to

Keyboard shortcuts

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