Refactor backends

This commit is contained in:
Alexander Neumann 2015-03-28 11:50:23 +01:00
parent f51aba1510
commit 5e69788eac
31 changed files with 1106 additions and 1125 deletions

27
backend/paths.go Normal file
View file

@ -0,0 +1,27 @@
package backend
import "os"
// Default paths for file-based backends (e.g. local)
var Paths = struct {
Data string
Snapshots string
Trees string
Locks string
Keys string
Temp string
Version string
ID string
}{
"data",
"snapshots",
"trees",
"locks",
"keys",
"tmp",
"version",
"id",
}
// Default modes for file-based backends
var Modes = struct{ Dir, File os.FileMode }{0700, 0600}