Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileArchiver ¶
func NewFileArchiver ¶
func NewFileArchiver(path, archivePath string) *FileArchiver
NewFileArchiver creates fileArchiver used for storing plain files inside tar archive. path is the absolute path to the file that will be archived and archivePath is the relatve path inside the archive (see tar.Header.Name)
type StreamArchiver ¶
func NewMetadataArchiver ¶
func NewMetadataArchiver(data metadata.WriteValidator, archivePath string) *StreamArchiver
NewMetadataArchiver creates streamArchiver used for storing metadata elements inside tar archive. data is the data structure implementing Validater interface and must be a struct that can be converted to JSON (see getJSON below) archivePath is the relatve path inside the archive (see tar.Header.Name)
func NewStreamArchiver ¶
func NewStreamArchiver(data []byte, archivePath string) *StreamArchiver
NewStreamArchiver creates streamArchiver used for storing plain text files inside tar archive. data is the plain data that will be stored in archive file archivePath is the relatve path inside the archive (see tar.Header.Name)