devstore

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Devstore

type Devstore struct {
	*sqlite.Datastore
}

The Devstore extends the reference sqlite datastore by adding extra functions related to Snapshot functionality.

func New

func New(path string) (*Devstore, error)

New creates a new Devstore

func (*Devstore) CreateSnapshot

func (store *Devstore) CreateSnapshot(driveID string) (*Snapshot, error)

CreateSnapshot returns a *Snapshot of the current state of the datastore.

type Snapshot

type Snapshot struct {
	Files   []ds.File
	Folders []ds.Folder
}

A Snapshot is a representation of the current state within the datastore. The Snapshot includes all files and folders alphabetically sorted (ascending) on ID.

Snapshots can be used to check whether two datastore states are equal and to list any differences between two datastores.

Jump to

Keyboard shortcuts

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