Documentation ¶
Index ¶
- Variables
- func RestoreToPath(bucket *store.Store, root string, incl []string) error
- func ScanAndBackup(bucket *store.Store, scanner *file.PathScanner) error
- func WriteManifest(filename string, scanner *file.PathScanner) (err error)
- type Manifest
- func (before *Manifest) Compare(after []file.File) []file.File
- func (m *Manifest) Has(f file.File) bool
- func (m *Manifest) HasIdentical(their file.File) bool
- func (m *Manifest) JSON() ([]byte, error)
- func (m *Manifest) LatestEntries() map[string][]*ManifestEntry
- func (m *Manifest) MarshalJSON() ([]byte, error)
- func (m *Manifest) Remove(f file.File) bool
- func (m *Manifest) UnmarshalJSON(data []byte) (err error)
- func (m *Manifest) Update(files []file.File) time.Time
- type ManifestEntry
- type ManifestEntryPart
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadVersion = errors.New("bad version")
View Source
var ErrMalformedConfig = errors.New("malformed config data")
Functions ¶
func RestoreToPath ¶
Restore changed files from the store to a particular folder. Will do an incremental restore and only write the files that are different.
func ScanAndBackup ¶
func ScanAndBackup(bucket *store.Store, scanner *file.PathScanner) error
Scan a path for changes (compared to latest manifest) and upload the diff.
func WriteManifest ¶
func WriteManifest(filename string, scanner *file.PathScanner) (err error)
Write a manifest file from some path scan.
Types ¶
type Manifest ¶
type Manifest struct { Version int `json:"version"` LastSet string `json:"lastSet"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Entries []*ManifestEntry `json:"entries"` // contains filtered or unexported fields }
func NewManifest ¶
func ReadManifestData ¶
func (*Manifest) LatestEntries ¶
func (m *Manifest) LatestEntries() map[string][]*ManifestEntry
func (*Manifest) MarshalJSON ¶
func (*Manifest) UnmarshalJSON ¶
type ManifestEntry ¶
type ManifestEntry struct { file.File Set string Parts []ManifestEntryPart }
func (*ManifestEntry) MarshalJSON ¶
func (f *ManifestEntry) MarshalJSON() ([]byte, error)
func (*ManifestEntry) UnmarshalJSON ¶
func (f *ManifestEntry) UnmarshalJSON(data []byte) (err error)
type ManifestEntryPart ¶
func (*ManifestEntryPart) MarshalJSON ¶
func (p *ManifestEntryPart) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.