Documentation ¶
Overview ¶
Package archive creates and consumes high-fidelity conversions of dataset documents for export & import
Index ¶
- func Export(ctx context.Context, store cafs.Filestore, ds *dataset.Dataset, ...) (string, error)
- func GenerateFilename(ds *dataset.Dataset, format string) (string, error)
- func UnzipDataset(r io.ReaderAt, size int64, ds *dataset.Dataset) error
- func UnzipDatasetBytes(zipData []byte, ds *dataset.Dataset) error
- func UnzipGetContents(data []byte) (map[string]string, error)
- func WriteZip(ctx context.Context, store cafs.Filestore, ds *dataset.Dataset, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Export ¶
func Export(ctx context.Context, store cafs.Filestore, ds *dataset.Dataset, refStr, targetDir, output, outputFormat string, zipped bool) (string, error)
Export generates a high-fidelity copy of a dataset that doesn't require qri software to read. TODO (b5) - this currently has a lot of overlap with "get" and "checkout" commands, we should emphasize those (more common) tools instead. See https://github.com/qri-io/qri/issues/1176 for discussion
func GenerateFilename ¶
GenerateFilename takes a dataset and generates a filename if no timestamp exists, it will default to the empty time.Time in the form [peername]-[datasetName]_-_[timestamp].[format]
func UnzipDataset ¶
UnzipDataset reads a zip file from a filename and returns a full dataset with components
func UnzipDatasetBytes ¶
UnzipDatasetBytes is a convenince wrapper for UnzipDataset
func UnzipGetContents ¶
UnzipGetContents is a generic zip-unpack to a map of filename: contents with contents represented as strings
Types ¶
This section is empty.