This commit is contained in:
parent
a2823e09ad
commit
ceb8421a7b
16
restic.go
16
restic.go
@ -72,6 +72,16 @@ func (NoOpts) ToArgs() []string {
|
|||||||
return []string{}
|
return []string{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type UnlockOps struckt {
|
||||||
|
RemoveAll bool `hcl:"RemoveAll,optional"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (uo UnlockOpts) ToArgs() (args []string) {
|
||||||
|
args = maybeAddArgBool(args, "--remove-all", uo.RemoveAll
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
type BackupOpts struct {
|
type BackupOpts struct {
|
||||||
Exclude []string `hcl:"Exclude,optional"`
|
Exclude []string `hcl:"Exclude,optional"`
|
||||||
Include []string `hcl:"Include,optional"`
|
Include []string `hcl:"Include,optional"`
|
||||||
@ -331,6 +341,12 @@ func (rcmd Restic) Check() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (rcmd Restic) Unlock(unlockOpts UnlockOpts) error {
|
||||||
|
_, err := rcmd.RunRestic("unlock", unlockOpts)
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
type Snapshot struct {
|
type Snapshot struct {
|
||||||
UID int `json:"uid"`
|
UID int `json:"uid"`
|
||||||
GID int `json:"gid"`
|
GID int `json:"gid"`
|
||||||
|
Loading…
Reference in New Issue
Block a user