archive

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archive

func Archive[A Archiver](t errs2.Testing, w io.Writer, files ...FileHeader)

Types

type Archiver

type Archiver interface {
	New(errs2.Testing, io.Writer) Writer
}

type Entry

type Entry[C any] struct {
	Name    string
	Time    time.Time
	Content C
}

func (Entry[C]) EntryContent

func (bce Entry[C]) EntryContent() C

func (Entry[C]) EntryName

func (bce Entry[C]) EntryName() string

func (Entry[C]) EntryTime

func (bce Entry[C]) EntryTime() time.Time

type FileHeader

type FileHeader interface {
	EntryName() string
	EntryTime() time.Time
	// contains filtered or unexported methods
}

type Tar

type Tar struct{}

func (Tar) New

func (Tar) New(t errs2.Testing, w io.Writer) Writer

type Writer

type Writer interface {
	io.Closer
	WriteFile(errs2.Testing, FileHeader, io.Reader)
	WriteDir(errs2.Testing, FileHeader)
}

type Zip

type Zip struct{}

func (Zip) New

func (Zip) New(t errs2.Testing, w io.Writer) Writer

Jump to

Keyboard shortcuts

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