mirror of
https://github.com/restic/restic.git
synced 2025-10-21 14:49:28 +00:00
Remove explicit key handling
This commit is contained in:
16
restorer.go
16
restorer.go
@@ -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")
|
||||
}
|
||||
|
Reference in New Issue
Block a user