file

package
v0.0.0-...-af76a63 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FoldersToTarGZ

func FoldersToTarGZ(sourcedirs []string, destinationfile string) error

FoldersToTarGZ compresses all files in a list of directores into a gzipped tar file Paths are kept the same as the full system path to avoid conflicts

func ReaderToFile

func ReaderToFile(reader io.Reader, fileName string) (int64, error)

ReaderToFile reads from a docker reader and writes the contents to a file until EOF

func WriteArchiveIDs

func WriteArchiveIDs(archiveIDs []SerializeableArchive, csvFile string) error

Types

type SerializeableArchive

type SerializeableArchive struct {
	ArchiveID        string    `csv:"archive_id"`
	Checksum         string    `csv:"checksum"`
	Location         string    `csv:"location"`
	Timestamp        time.Time `csv:"timestamp"`
	Expires          bool      `csv:"expires"`
	ExpiresTimestamp time.Time `csv:"expires_timestamp"`
}

SerializeableArchive is an archive which can be serialized as a CSV object

func GetArchiveIDs

func GetArchiveIDs(csvFile string) ([]SerializeableArchive, error)

Jump to

Keyboard shortcuts

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