Remove explicit key handling

This commit is contained in:
Alexander Neumann
2014-12-21 18:10:19 +01:00
parent cc147c002e
commit ef41a77aff
14 changed files with 113 additions and 144 deletions

View File

@@ -11,24 +11,20 @@ import (
)
type Restorer struct {
s Server
key *Key
ch *ContentHandler
sn *Snapshot
s Server
ch *ContentHandler
sn *Snapshot
Error func(dir string, node *Node, err error) error
Filter func(item string, node *Node) bool
}
// NewRestorer creates a restorer preloaded with the content from the snapshot snid.
func NewRestorer(s Server, key *Key, snid backend.ID) (*Restorer, error) {
r := &Restorer{
s: s,
key: key,
}
func NewRestorer(s Server, snid backend.ID) (*Restorer, error) {
r := &Restorer{s: s}
var err error
r.ch, err = NewContentHandler(s, key)
r.ch, err = NewContentHandler(s)
if err != nil {
return nil, arrar.Annotate(err, "create contenthandler for restorer")
}