Documentation ¶
Index ¶
- func FinishMetadata(meta *backups.Metadata)
- func NewArchive(meta *backups.Metadata, files, dump []File) (*bytes.Buffer, error)
- func NewArchiveBasic(meta *backups.Metadata) (*bytes.Buffer, error)
- func NewArchiveV0(meta *backups.Metadata, files, dump []File) (*bytes.Buffer, error)
- func NewMetadata() *backups.Metadata
- func NewMetadataStarted() *backups.Metadata
- func SetOrigin(meta *backups.Metadata, modelUUID, machine, hostname string)
- func UpdateNotes(meta *backups.Metadata, notes string) *backups.Metadata
- type File
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FinishMetadata ¶
FinishMetadata finishes a metadata with test values.
func NewArchive ¶
NewArchive returns a new archive file containing the files.
func NewArchiveBasic ¶
NewArchiveBasic returns a new archive file with a few files provided.
func NewArchiveV0 ¶
NewArchiveV0 returns a new archive file containing the files, in v0 format.
func NewMetadata ¶
NewMetadata returns a Metadata to use for testing.
func NewMetadataStarted ¶
NewMetadataStarted returns a Metadata to use for testing.
Types ¶
type File ¶
type File struct { // Name is the path to which the file will be identified in the archive. Name string // Content is the data that will be written to the archive for the file. Content string // IsDir determines if the file is a regular file or a directory. IsDir bool }
File represents a file during testing.
Click to show internal directories.
Click to hide internal directories.