diff --git a/restic.go b/restic.go index 54663eb..06a7675 100644 --- a/restic.go +++ b/restic.go @@ -193,9 +193,10 @@ type ResticGlobalOpts struct { TLSClientCertFile string `hcl:"TlsClientCertFile,optional"` LimitDownload int `hcl:"LimitDownload,optional"` LimitUpload int `hcl:"LimitUpload,optional"` - Options map[string]string `hcl:"Options,optional"` VerboseLevel int `hcl:"VerboseLevel,optional"` + Options map[string]string `hcl:"Options,optional"` CleanupCache bool `hcl:"CleanupCache,optional"` + InsecureTLS bool `hcl:"InsecureTls,optional"` NoCache bool `hcl:"NoCache,optional"` NoLock bool `hcl:"NoLock,optional"` } @@ -209,6 +210,7 @@ func (glo ResticGlobalOpts) ToArgs() (args []string) { args = maybeAddArgInt(args, "--limit-upload", glo.LimitUpload) args = maybeAddArgInt(args, "--verbose", glo.VerboseLevel) args = maybeAddArgBool(args, "--cleanup-cache", glo.CleanupCache) + args = maybeAddArgBool(args, "--insecure-tls", glo.InsecureTLS) args = maybeAddArgBool(args, "--no-cache", glo.NoCache) args = maybeAddArgBool(args, "--no-lock", glo.NoLock) diff --git a/restic_test.go b/restic_test.go index bcadf94..b3fa80d 100644 --- a/restic_test.go +++ b/restic_test.go @@ -32,6 +32,7 @@ func TestGlobalOptions(t *testing.T) { LimitUpload: 1, VerboseLevel: 1, CleanupCache: true, + InsecureTLS: true, NoCache: true, NoLock: true, Options: map[string]string{ @@ -48,6 +49,7 @@ func TestGlobalOptions(t *testing.T) { "--limit-upload", "1", "--verbose", "1", "--cleanup-cache", + "--insecure-tls", "--no-cache", "--no-lock", "--option", "key='a long value'",