mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-06 10:30:39 +00:00
Compare commits
85 Commits
Author | SHA1 | Date | |
---|---|---|---|
b5604b8b9f | |||
|
24220f6b62 | ||
ced20801c1 | |||
|
ce9140fa1e | ||
|
046c79fd15 | ||
|
f8603425d1 | ||
068121d722 | |||
8eea7d33f8 | |||
|
fc8b5fdbe2 | ||
|
f67bb7f73c | ||
|
530b1b646c | ||
|
3b57602fe8 | ||
|
045513234f | ||
|
78b0db50e0 | ||
|
62dd371d51 | ||
|
08766b75db | ||
b3b7c8df95 | |||
2c5266c9a0 | |||
087b293c39 | |||
|
112a69d743 | ||
|
37d55c691f | ||
|
715b6f791c | ||
|
38b38c6805 | ||
c82db56069 | |||
27821dc3ef | |||
866975d32d | |||
|
955ac0e323 | ||
|
1512db5b55 | ||
|
046331748c | ||
72a40eaaa2 | |||
ec61effe22 | |||
d6acab94a5 | |||
|
d0d2fcf0f2 | ||
58fd41fafb | |||
|
d0c4a32879 | ||
74979e9a2a | |||
|
3732dcf6ff | ||
|
874ed52e3b | ||
4d9a2b828e | |||
|
b830667264 | ||
|
83eeb847ac | ||
|
a89ba5a40a | ||
|
6990bf6adc | ||
|
2f407cf211 | ||
489f3078fe | |||
|
e07dd0d991 | ||
|
2b9dc9f17c | ||
|
465bc037c2 | ||
|
37a043afff | ||
|
e91b632181 | ||
|
2b30998b9a | ||
|
49b37a0a9a | ||
3bc091f826 | |||
5bcf5c9217 | |||
ff2e3714d1 | |||
2e6764223d | |||
434862ed4e | |||
2da440a1cd | |||
0f6c34dc6b | |||
3457fc01bf | |||
|
1e62f6cb05 | ||
8112aceb30 | |||
|
b4cc0f0ab1 | ||
|
a3e539b0b7 | ||
|
79164e3de0 | ||
8b74a98836 | |||
8a713e497d | |||
71601ae7a6 | |||
|
85d3f06b79 | ||
5afad86e37 | |||
ba9e090695 | |||
|
05def04770 | ||
d85470459f | |||
1f69a7974a | |||
db9f5dea66 | |||
75160d4d6a | |||
92feaef5bb | |||
2a7e233cdb | |||
a373c07fb0 | |||
ec9e2aebcd | |||
7d87160706 | |||
8e1fe6af65 | |||
|
65ba1f6ac1 | ||
|
6bf4953003 | ||
27758a03fa |
8
.github/dependabot.yml
vendored
Normal file
8
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@@ -3,19 +3,19 @@ name: Main
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*.*.*"
|
- 'v*.*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Docker Labels
|
- name: Docker Labels
|
||||||
id: meta
|
id: meta
|
||||||
uses: crazy-max/ghaction-docker-meta@v2
|
uses: crazy-max/ghaction-docker-meta@v4
|
||||||
with:
|
with:
|
||||||
images: cupcakearmy/autorestic
|
images: cupcakearmy/autorestic
|
||||||
tags: |
|
tags: |
|
||||||
@@ -23,12 +23,12 @@ jobs:
|
|||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}}
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
@@ -37,17 +37,12 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: "^1.16.3"
|
go-version: '^1.21'
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go run build/build.go
|
run: go run build/build.go
|
||||||
|
|
||||||
- name: Sign
|
|
||||||
uses: tristan-weil/ghaction-checksum-sign-artifact@v1.0.1
|
|
||||||
with:
|
|
||||||
path: dist/*
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
105
CHANGELOG.md
105
CHANGELOG.md
@@ -5,6 +5,111 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.7.4] - 2023-01-18
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Transformer for extracting information. @11mariom
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Bump docker restic version.
|
||||||
|
- Docs dependencies updated.
|
||||||
|
|
||||||
|
## [1.7.1] - 2022-04-27
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- #178 Lean flag not working properly.
|
||||||
|
|
||||||
|
## [1.7.0] - 2022-04-27
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- #147 Stream output instead of buffering.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- #184 duplicate global options.
|
||||||
|
- #154 add docs for migration.
|
||||||
|
- #182 fix bug with upgrading custom restic with custom path.
|
||||||
|
|
||||||
|
## [1.6.2] - 2022-04-14
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Version bump in code.
|
||||||
|
|
||||||
|
## [1.6.1] - 2022-04-14
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Bump go version in docker file to 18.
|
||||||
|
|
||||||
|
## [1.6.0] - 2022-04-14
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- support for copy command #145
|
||||||
|
- partial restore with `--include`, `--exclude`, `--iinclude`, `--iexclude` flags #161
|
||||||
|
- run forget automatically after backup #158
|
||||||
|
- exit codes to hooks as env variable #142
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Lean flag not removing all output #178
|
||||||
|
|
||||||
|
## [1.5.8] - 2022-03-18
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Better error handling for bad config files.
|
||||||
|
|
||||||
|
## [1.5.7] - 2022-03-11
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- SSH in docker image. @fariszr
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- Updated dependencies
|
||||||
|
|
||||||
|
## [1.5.6] - 2022-03-10
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Add bash in docker image for hooks. @fariszr
|
||||||
|
|
||||||
|
## [1.5.5] - 2022-02-16
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Go version was updated from `1.16` to `1.17`
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Home directory was not being taken into account for loading configs.
|
||||||
|
|
||||||
|
## [1.5.4] - 2022-02-16
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Lean flag not omitting all output.
|
||||||
|
|
||||||
|
## [1.5.3] - 2022-02-16
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Error throwing not finding config even it's not being used.
|
||||||
|
|
||||||
|
## [1.5.2] - 2022-02-13
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Config loading @jjromannet
|
||||||
|
- Making a backup of the file @jjromannet
|
||||||
|
|
||||||
## [1.5.1] - 2021-12-06
|
## [1.5.1] - 2021-12-06
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.16-alpine as builder
|
FROM golang:1.21-alpine as builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY go.* .
|
COPY go.* .
|
||||||
@@ -6,7 +6,8 @@ RUN go mod download
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN go build
|
RUN go build
|
||||||
|
|
||||||
FROM alpine
|
FROM restic/restic:0.16.4
|
||||||
RUN apk add --no-cache restic rclone
|
RUN apk add --no-cache rclone bash curl
|
||||||
COPY --from=builder /app/autorestic /usr/bin/autorestic
|
COPY --from=builder /app/autorestic /usr/bin/autorestic
|
||||||
|
ENTRYPOINT []
|
||||||
CMD [ "autorestic" ]
|
CMD [ "autorestic" ]
|
||||||
|
@@ -4,7 +4,11 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/md5"
|
||||||
|
"crypto/sha1"
|
||||||
|
"crypto/sha256"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path"
|
"path"
|
||||||
@@ -17,23 +21,51 @@ import (
|
|||||||
var DIR, _ = filepath.Abs("./dist")
|
var DIR, _ = filepath.Abs("./dist")
|
||||||
|
|
||||||
var targets = map[string][]string{
|
var targets = map[string][]string{
|
||||||
|
// "aix": {"ppc64"}, // Not supported by fsnotify
|
||||||
"darwin": {"amd64", "arm64"},
|
"darwin": {"amd64", "arm64"},
|
||||||
"freebsd": {"386", "amd64", "arm"},
|
"freebsd": {"386", "amd64", "arm"},
|
||||||
"linux": {"386", "amd64", "arm", "arm64"},
|
"linux": {"386", "amd64", "arm", "arm64", "ppc64le", "mips", "mipsle", "mips64", "mips64le", "s390x"},
|
||||||
"netbsd": {"386", "amd64"},
|
"netbsd": {"386", "amd64"},
|
||||||
"openbsd": {"386", "amd64"},
|
"openbsd": {"386", "amd64"},
|
||||||
|
// "windows": {"386", "amd64"}, // Not supported by autorestic
|
||||||
|
"solaris": {"amd64"},
|
||||||
}
|
}
|
||||||
|
|
||||||
type buildOptions struct {
|
type buildOptions struct {
|
||||||
Target, Arch, Version string
|
Target, Arch, Version string
|
||||||
}
|
}
|
||||||
|
|
||||||
func build(options buildOptions, wg *sync.WaitGroup) {
|
const (
|
||||||
fmt.Printf("Building %s %s\n", options.Target, options.Arch)
|
CHECKSUM_MD5 = "MD5SUMS"
|
||||||
|
CHECKSUM_SHA_1 = "SHA1SUMS"
|
||||||
|
CHECKSUM_SHA_256 = "SHA256SUMS"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Checksums struct {
|
||||||
|
filename, md5, sha1, sha256 string
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeChecksums(checksums *[]Checksums) {
|
||||||
|
FILE_MD5, _ := os.OpenFile(path.Join(DIR, CHECKSUM_MD5), os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600)
|
||||||
|
defer FILE_MD5.Close()
|
||||||
|
FILE_SHA1, _ := os.OpenFile(path.Join(DIR, CHECKSUM_SHA_1), os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600)
|
||||||
|
defer FILE_SHA1.Close()
|
||||||
|
FILE_SHA256, _ := os.OpenFile(path.Join(DIR, CHECKSUM_SHA_256), os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600)
|
||||||
|
defer FILE_SHA256.Close()
|
||||||
|
|
||||||
|
for _, checksum := range *checksums {
|
||||||
|
fmt.Fprintf(FILE_MD5, "%s %s\n", checksum.md5, checksum.filename)
|
||||||
|
fmt.Fprintf(FILE_SHA1, "%s %s\n", checksum.sha1, checksum.filename)
|
||||||
|
fmt.Fprintf(FILE_SHA256, "%s %s\n", checksum.sha256, checksum.filename)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func build(options buildOptions, wg *sync.WaitGroup, checksums *[]Checksums) {
|
||||||
|
defer wg.Done()
|
||||||
|
|
||||||
|
fmt.Printf("Building: %s %s\n", options.Target, options.Arch)
|
||||||
out := fmt.Sprintf("autorestic_%s_%s_%s", options.Version, options.Target, options.Arch)
|
out := fmt.Sprintf("autorestic_%s_%s_%s", options.Version, options.Target, options.Arch)
|
||||||
out = path.Join(DIR, out)
|
out = path.Join(DIR, out)
|
||||||
out, _ = filepath.Abs(out)
|
|
||||||
fmt.Println(out)
|
|
||||||
|
|
||||||
// Build
|
// Build
|
||||||
{
|
{
|
||||||
@@ -62,22 +94,39 @@ func build(options buildOptions, wg *sync.WaitGroup) {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wg.Done()
|
|
||||||
|
// Checksum
|
||||||
|
{
|
||||||
|
file := out + ".bz2"
|
||||||
|
content, _ := ioutil.ReadFile(file)
|
||||||
|
*checksums = append(*checksums, Checksums{
|
||||||
|
filename: path.Base(file),
|
||||||
|
md5: fmt.Sprintf("%x", md5.Sum(content)),
|
||||||
|
sha1: fmt.Sprintf("%x", sha1.Sum(content)),
|
||||||
|
sha256: fmt.Sprintf("%x", sha256.Sum256(content)),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Printf("Built: %s\n", path.Base(out))
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
os.RemoveAll(DIR)
|
os.RemoveAll(DIR)
|
||||||
v := internal.VERSION
|
v := internal.VERSION
|
||||||
|
checksums := []Checksums{}
|
||||||
|
|
||||||
|
// Build async
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
for target, archs := range targets {
|
for target, archs := range targets {
|
||||||
for _, arch := range archs {
|
for _, arch := range archs {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
build(buildOptions{
|
go build(buildOptions{
|
||||||
Target: target,
|
Target: target,
|
||||||
Arch: arch,
|
Arch: arch,
|
||||||
Version: v,
|
Version: v,
|
||||||
}, &wg)
|
}, &wg, &checksums)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
writeChecksums(&checksums)
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@ package cmd
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cupcakearmy/autorestic/internal"
|
"github.com/cupcakearmy/autorestic/internal"
|
||||||
|
"github.com/cupcakearmy/autorestic/internal/flags"
|
||||||
"github.com/cupcakearmy/autorestic/internal/lock"
|
"github.com/cupcakearmy/autorestic/internal/lock"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
@@ -12,7 +13,6 @@ var cronCmd = &cobra.Command{
|
|||||||
Long: `Intended to be mainly triggered by an automated system like systemd or crontab. For each location checks if a cron backup is due and runs it.`,
|
Long: `Intended to be mainly triggered by an automated system like systemd or crontab. For each location checks if a cron backup is due and runs it.`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
internal.GetConfig()
|
internal.GetConfig()
|
||||||
internal.CRON_LEAN, _ = cmd.Flags().GetBool("lean")
|
|
||||||
err := lock.Lock()
|
err := lock.Lock()
|
||||||
CheckErr(err)
|
CheckErr(err)
|
||||||
defer lock.Unlock()
|
defer lock.Unlock()
|
||||||
@@ -24,5 +24,5 @@ var cronCmd = &cobra.Command{
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(cronCmd)
|
rootCmd.AddCommand(cronCmd)
|
||||||
cronCmd.Flags().Bool("lean", false, "only output information about actual backups")
|
cronCmd.Flags().BoolVar(&flags.CRON_LEAN, "lean", false, "only output information about actual backups")
|
||||||
}
|
}
|
||||||
|
17
cmd/exec.go
17
cmd/exec.go
@@ -1,6 +1,8 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"github.com/cupcakearmy/autorestic/internal"
|
"github.com/cupcakearmy/autorestic/internal"
|
||||||
"github.com/cupcakearmy/autorestic/internal/colors"
|
"github.com/cupcakearmy/autorestic/internal/colors"
|
||||||
"github.com/cupcakearmy/autorestic/internal/lock"
|
"github.com/cupcakearmy/autorestic/internal/lock"
|
||||||
@@ -18,10 +20,23 @@ var execCmd = &cobra.Command{
|
|||||||
|
|
||||||
selected, err := internal.GetAllOrSelected(cmd, true)
|
selected, err := internal.GetAllOrSelected(cmd, true)
|
||||||
CheckErr(err)
|
CheckErr(err)
|
||||||
|
|
||||||
|
var errors []error
|
||||||
for _, name := range selected {
|
for _, name := range selected {
|
||||||
colors.PrimaryPrint(" Executing on \"%s\" ", name)
|
colors.PrimaryPrint(" Executing on \"%s\" ", name)
|
||||||
backend, _ := internal.GetBackend(name)
|
backend, _ := internal.GetBackend(name)
|
||||||
backend.Exec(args)
|
err := backend.Exec(args)
|
||||||
|
if err != nil {
|
||||||
|
errors = append(errors, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(errors) > 0 {
|
||||||
|
for _, err := range errors {
|
||||||
|
colors.Error.Printf("%s\n\n", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckErr(fmt.Errorf("%d errors were found", len(errors)))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@@ -30,7 +30,19 @@ var restoreCmd = &cobra.Command{
|
|||||||
if len(args) > 0 {
|
if len(args) > 0 {
|
||||||
snapshot = args[0]
|
snapshot = args[0]
|
||||||
}
|
}
|
||||||
err = l.Restore(target, from, force, snapshot)
|
|
||||||
|
// Get optional flags
|
||||||
|
optional := []string{}
|
||||||
|
for _, flag := range []string{"include", "exclude", "iinclude", "iexclude"} {
|
||||||
|
values, err := cmd.Flags().GetStringSlice(flag)
|
||||||
|
if err == nil {
|
||||||
|
for _, value := range values {
|
||||||
|
optional = append(optional, "--"+flag, value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
err = l.Restore(target, from, force, snapshot, optional)
|
||||||
CheckErr(err)
|
CheckErr(err)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -42,4 +54,10 @@ func init() {
|
|||||||
restoreCmd.Flags().String("to", "", "Where to restore the data")
|
restoreCmd.Flags().String("to", "", "Where to restore the data")
|
||||||
restoreCmd.Flags().StringP("location", "l", "", "Location to be restored")
|
restoreCmd.Flags().StringP("location", "l", "", "Location to be restored")
|
||||||
restoreCmd.MarkFlagRequired("location")
|
restoreCmd.MarkFlagRequired("location")
|
||||||
|
|
||||||
|
// Passed on flags
|
||||||
|
restoreCmd.Flags().StringSliceP("include", "i", []string{}, "Include a pattern")
|
||||||
|
restoreCmd.Flags().StringSliceP("exclude", "e", []string{}, "Exclude a pattern")
|
||||||
|
restoreCmd.Flags().StringSlice("iinclude", []string{}, "Include a pattern, case insensitive")
|
||||||
|
restoreCmd.Flags().StringSlice("iexclude", []string{}, "Exclude a pattern, case insensitive")
|
||||||
}
|
}
|
||||||
|
69
cmd/root.go
69
cmd/root.go
@@ -3,9 +3,11 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/cupcakearmy/autorestic/internal"
|
"github.com/cupcakearmy/autorestic/internal"
|
||||||
"github.com/cupcakearmy/autorestic/internal/colors"
|
"github.com/cupcakearmy/autorestic/internal/colors"
|
||||||
|
"github.com/cupcakearmy/autorestic/internal/flags"
|
||||||
"github.com/cupcakearmy/autorestic/internal/lock"
|
"github.com/cupcakearmy/autorestic/internal/lock"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
@@ -27,7 +29,7 @@ var rootCmd = &cobra.Command{
|
|||||||
Version: internal.VERSION,
|
Version: internal.VERSION,
|
||||||
Use: "autorestic",
|
Use: "autorestic",
|
||||||
Short: "CLI Wrapper for restic",
|
Short: "CLI Wrapper for restic",
|
||||||
Long: "Documentation: https://autorestic.vercel.app",
|
Long: "Documentation:\thttps://autorestic.vercel.app\nSupport:\thttps://discord.gg/wS7RpYTYd2",
|
||||||
}
|
}
|
||||||
|
|
||||||
func Execute() {
|
func Execute() {
|
||||||
@@ -36,40 +38,55 @@ func Execute() {
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.autorestic.yml or ./.autorestic.yml)")
|
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.autorestic.yml or ./.autorestic.yml)")
|
||||||
rootCmd.PersistentFlags().BoolVar(&internal.CI, "ci", false, "CI mode disabled interactive mode and colors and enables verbosity")
|
rootCmd.PersistentFlags().BoolVar(&flags.CI, "ci", false, "CI mode disabled interactive mode and colors and enables verbosity")
|
||||||
rootCmd.PersistentFlags().BoolVarP(&internal.VERBOSE, "verbose", "v", false, "verbose mode")
|
rootCmd.PersistentFlags().BoolVarP(&flags.VERBOSE, "verbose", "v", false, "verbose mode")
|
||||||
rootCmd.PersistentFlags().StringVar(&internal.RESTIC_BIN, "restic-bin", "restic", "specify custom restic binary")
|
rootCmd.PersistentFlags().StringVar(&flags.RESTIC_BIN, "restic-bin", "restic", "specify custom restic binary")
|
||||||
|
rootCmd.PersistentFlags().StringVar(&flags.DOCKER_IMAGE, "docker-image", "cupcakearmy/autorestic:"+internal.VERSION, "specify a custom docker image")
|
||||||
cobra.OnInitialize(initConfig)
|
cobra.OnInitialize(initConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
func initConfig() {
|
func initConfig() {
|
||||||
if ci, _ := rootCmd.Flags().GetBool("ci"); ci {
|
if ci, _ := rootCmd.Flags().GetBool("ci"); ci {
|
||||||
colors.DisableColors(true)
|
colors.DisableColors(true)
|
||||||
internal.VERBOSE = true
|
flags.VERBOSE = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfgFile != "" {
|
if cfgFile != "" {
|
||||||
viper.SetConfigFile(cfgFile)
|
viper.SetConfigFile(cfgFile)
|
||||||
} else {
|
|
||||||
viper.AddConfigPath(".")
|
|
||||||
|
|
||||||
// Home
|
|
||||||
if home, err := homedir.Dir(); err != nil {
|
|
||||||
viper.AddConfigPath(home)
|
|
||||||
}
|
|
||||||
|
|
||||||
// XDG_CONFIG_HOME
|
|
||||||
{
|
|
||||||
prefix, found := os.LookupEnv("XDG_CONFIG_HOME")
|
|
||||||
if !found {
|
|
||||||
if home, err := homedir.Dir(); err != nil {
|
|
||||||
prefix = filepath.Join(home, ".config")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
viper.AddConfigPath(filepath.Join(prefix, "autorestic"))
|
|
||||||
}
|
|
||||||
|
|
||||||
viper.SetConfigName(".autorestic")
|
|
||||||
}
|
|
||||||
viper.AutomaticEnv()
|
viper.AutomaticEnv()
|
||||||
|
if viper.ConfigFileUsed() == "" {
|
||||||
|
colors.Error.Printf("cannot read config file %s\n", cfgFile)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
configPaths := getConfigPaths()
|
||||||
|
for _, cfgPath := range configPaths {
|
||||||
|
viper.AddConfigPath(cfgPath)
|
||||||
|
}
|
||||||
|
if flags.VERBOSE {
|
||||||
|
colors.Faint.Printf("Using config paths: %s\n", strings.Join(configPaths, " "))
|
||||||
|
}
|
||||||
|
cfgFileName := ".autorestic"
|
||||||
|
viper.SetConfigName(cfgFileName)
|
||||||
|
viper.AutomaticEnv()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func getConfigPaths() []string {
|
||||||
|
result := []string{"."}
|
||||||
|
if home, err := homedir.Dir(); err == nil {
|
||||||
|
result = append(result, home)
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
xdgConfigHome, found := os.LookupEnv("XDG_CONFIG_HOME")
|
||||||
|
if !found {
|
||||||
|
if home, err := homedir.Dir(); err == nil {
|
||||||
|
xdgConfigHome = filepath.Join(home, ".config")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xdgConfig := filepath.Join(xdgConfigHome, "autorestic")
|
||||||
|
result = append(result, xdgConfig)
|
||||||
|
}
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
36
cmd/root_test.go
Normal file
36
cmd/root_test.go
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
package cmd
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/mitchellh/go-homedir"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"slices"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
const xdgConfigHome = "XDG_CONFIG_HOME"
|
||||||
|
|
||||||
|
func assertContains(t *testing.T, array []string, element string) {
|
||||||
|
if !slices.Contains(array, element) {
|
||||||
|
t.Errorf("Expected %s to be contained in %s", element, array)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestConfigResolving(t *testing.T) {
|
||||||
|
t.Run("~/.config/autorestic is used if XDG_CONFIG_HOME is not set", func(t *testing.T) {
|
||||||
|
// Override env using testing so that env gets restored after test
|
||||||
|
t.Setenv(xdgConfigHome, "")
|
||||||
|
_ = os.Unsetenv("XDG_CONFIG_HOME")
|
||||||
|
configPaths := getConfigPaths()
|
||||||
|
homeDir, _ := homedir.Dir()
|
||||||
|
expectedConfigPath := filepath.Join(homeDir, ".config/autorestic")
|
||||||
|
assertContains(t, configPaths, expectedConfigPath)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("XDG_CONFIG_HOME is respected if set", func(t *testing.T) {
|
||||||
|
t.Setenv(xdgConfigHome, "/foo/bar")
|
||||||
|
|
||||||
|
configPaths := getConfigPaths()
|
||||||
|
assertContains(t, configPaths, filepath.Join("/", "foo", "bar", "autorestic"))
|
||||||
|
})
|
||||||
|
}
|
@@ -1,15 +0,0 @@
|
|||||||
import { build } from '@codedoc/core';
|
|
||||||
|
|
||||||
import { config } from './config';
|
|
||||||
import { installTheme$ } from './content/theme';
|
|
||||||
import { content } from './content';
|
|
||||||
|
|
||||||
|
|
||||||
build(config, content, installTheme$, {
|
|
||||||
resolve: {
|
|
||||||
modules: ['.codedoc/node_modules']
|
|
||||||
},
|
|
||||||
resolveLoader: {
|
|
||||||
modules: ['.codedoc/node_modules']
|
|
||||||
}
|
|
||||||
});
|
|
@@ -1,24 +0,0 @@
|
|||||||
import { configuration } from '@codedoc/core'
|
|
||||||
|
|
||||||
export const config = configuration({
|
|
||||||
src: {
|
|
||||||
base: 'markdown',
|
|
||||||
},
|
|
||||||
dest: {
|
|
||||||
html: './build',
|
|
||||||
assets: './build',
|
|
||||||
bundle: './_',
|
|
||||||
styles: './_',
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
title: {
|
|
||||||
base: 'Autorestic',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
misc: {
|
|
||||||
github: {
|
|
||||||
user: 'cupcakearmy',
|
|
||||||
repo: 'autorestic',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
@@ -1,19 +0,0 @@
|
|||||||
import { CodedocConfig } from '@codedoc/core';
|
|
||||||
import { Footer as _Footer, GitterToggle$, Watermark} from '@codedoc/core/components';
|
|
||||||
|
|
||||||
|
|
||||||
export function Footer(config: CodedocConfig, renderer: any) {
|
|
||||||
let github$;
|
|
||||||
if (config.misc?.github)
|
|
||||||
github$ = <a href={`https://github.com/${config.misc.github.user}/${config.misc.github.repo}/`}
|
|
||||||
target="_blank">GitHub</a>;
|
|
||||||
|
|
||||||
let community$;
|
|
||||||
if (config.misc?.gitter)
|
|
||||||
community$ = <GitterToggle$ room={config.misc.gitter.room}/>
|
|
||||||
|
|
||||||
if (github$ && community$) return <_Footer>{github$}<hr/>{community$}</_Footer>;
|
|
||||||
else if (github$) return <_Footer>{github$}</_Footer>;
|
|
||||||
else if (community$) return <_Footer>{community$}</_Footer>;
|
|
||||||
else return <_Footer><Watermark/></_Footer>;
|
|
||||||
}
|
|
@@ -1,21 +0,0 @@
|
|||||||
import { CodedocConfig } from '@codedoc/core';
|
|
||||||
import { Header as _Header, GithubButton, Watermark } from '@codedoc/core/components';
|
|
||||||
|
|
||||||
|
|
||||||
export function Header(config: CodedocConfig, renderer: any) {
|
|
||||||
return (
|
|
||||||
<_Header>{config.misc?.github ?
|
|
||||||
<fragment>
|
|
||||||
<GithubButton action={config.misc.github.action || 'Star'}
|
|
||||||
repo={config.misc.github.repo}
|
|
||||||
user={config.misc.github.user}
|
|
||||||
large={config.misc.github.large === true}
|
|
||||||
count={config.misc.github.count !== false}
|
|
||||||
standardIcon={config.misc.github.standardIcon !== false}/>
|
|
||||||
<br/><br/>
|
|
||||||
</fragment>
|
|
||||||
: ''}
|
|
||||||
<Watermark/>
|
|
||||||
</_Header>
|
|
||||||
)
|
|
||||||
}
|
|
@@ -1,57 +0,0 @@
|
|||||||
import { RendererLike } from '@connectv/html'
|
|
||||||
import { File } from 'rxline/fs'
|
|
||||||
import {
|
|
||||||
Page,
|
|
||||||
Meta,
|
|
||||||
ContentNav,
|
|
||||||
Fonts,
|
|
||||||
ToC,
|
|
||||||
GithubSearch$,
|
|
||||||
} from '@codedoc/core/components'
|
|
||||||
|
|
||||||
import { config } from '../config'
|
|
||||||
import { Header } from './header'
|
|
||||||
import { Footer } from './footer'
|
|
||||||
|
|
||||||
export function content(
|
|
||||||
_content: HTMLElement,
|
|
||||||
toc: HTMLElement,
|
|
||||||
renderer: RendererLike<any, any>,
|
|
||||||
file: File<string>
|
|
||||||
) {
|
|
||||||
return (
|
|
||||||
<Page
|
|
||||||
title={config.page.title.extractor(_content, config, file)}
|
|
||||||
favicon={config.page.favicon}
|
|
||||||
meta={<Meta {...config.page.meta} />}
|
|
||||||
fonts={<Fonts {...config.page.fonts} />}
|
|
||||||
scripts={config.page.scripts}
|
|
||||||
stylesheets={config.page.stylesheets}
|
|
||||||
header={<Header {...config} />}
|
|
||||||
footer={<Footer {...config} />}
|
|
||||||
toc={
|
|
||||||
<ToC
|
|
||||||
default={'open'}
|
|
||||||
search={
|
|
||||||
config.misc?.github ? (
|
|
||||||
<GithubSearch$
|
|
||||||
repo={config.misc.github.repo}
|
|
||||||
user={config.misc.github.user}
|
|
||||||
root={config.src.base}
|
|
||||||
pick={config.src.pick.source}
|
|
||||||
drop={config.src.drop.source}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
false
|
|
||||||
)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{toc}
|
|
||||||
</ToC>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{_content}
|
|
||||||
<ContentNav content={_content} />
|
|
||||||
</Page>
|
|
||||||
)
|
|
||||||
}
|
|
@@ -1,8 +0,0 @@
|
|||||||
import { funcTransport } from '@connectv/sdh/transport';
|
|
||||||
import { useTheme } from '@codedoc/core/transport';
|
|
||||||
|
|
||||||
import { theme } from '../theme';
|
|
||||||
|
|
||||||
|
|
||||||
export function installTheme() { useTheme(theme); }
|
|
||||||
export const installTheme$ = /*#__PURE__*/funcTransport(installTheme);
|
|
10811
docs/.codedoc/package-lock.json
generated
10811
docs/.codedoc/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"@codedoc/core": "^0.2.23"
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,18 +0,0 @@
|
|||||||
import { join } from 'path';
|
|
||||||
import { serve } from '@codedoc/core';
|
|
||||||
|
|
||||||
import { config } from './config';
|
|
||||||
import { content } from './content';
|
|
||||||
import { installTheme$ } from './content/theme';
|
|
||||||
|
|
||||||
|
|
||||||
const root = join(__dirname, '../');
|
|
||||||
|
|
||||||
serve(root, config, content, installTheme$, {
|
|
||||||
resolve: {
|
|
||||||
modules: ['.codedoc/node_modules']
|
|
||||||
},
|
|
||||||
resolveLoader: {
|
|
||||||
modules: ['.codedoc/node_modules']
|
|
||||||
}
|
|
||||||
});
|
|
@@ -1,11 +0,0 @@
|
|||||||
import { createTheme } from '@codedoc/core/transport';
|
|
||||||
|
|
||||||
|
|
||||||
export const theme = /*#__PURE__*/createTheme({
|
|
||||||
light: {
|
|
||||||
primary: '#1eb2a6'
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
primary: '#1eb2a6'
|
|
||||||
}
|
|
||||||
});
|
|
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "es6",
|
|
||||||
"noImplicitAny": true,
|
|
||||||
"declaration": false,
|
|
||||||
"strictNullChecks": true,
|
|
||||||
"strictFunctionTypes": true,
|
|
||||||
"noImplicitThis": true,
|
|
||||||
"alwaysStrict": true,
|
|
||||||
"sourceMap": true,
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"experimentalDecorators": true,
|
|
||||||
"emitDecoratorMetadata": true,
|
|
||||||
"jsx": "react",
|
|
||||||
"jsxFactory": "renderer.create",
|
|
||||||
"lib": [
|
|
||||||
"es2017",
|
|
||||||
"dom"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"./**/*"
|
|
||||||
]
|
|
||||||
}
|
|
@@ -1,22 +0,0 @@
|
|||||||
import { exec, spawn } from 'child_process';
|
|
||||||
import { config } from './config';
|
|
||||||
|
|
||||||
|
|
||||||
const cmd = 'ts-node-dev';
|
|
||||||
const params = `--project .codedoc/tsconfig.json`
|
|
||||||
+ ` -T --watch ${config.src.base},.codedoc`
|
|
||||||
+ ` --ignore-watch .codedoc/node_modules`
|
|
||||||
+ ` .codedoc/serve`;
|
|
||||||
|
|
||||||
|
|
||||||
if (process.platform === 'win32') {
|
|
||||||
const child = exec(cmd + ' ' + params);
|
|
||||||
|
|
||||||
child.stdout?.pipe(process.stdout);
|
|
||||||
child.stderr?.pipe(process.stderr);
|
|
||||||
child.on('close', () => {});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const child = spawn(cmd, [params], { stdio: 'inherit', shell: 'bash' });
|
|
||||||
child.on('close', () => {});
|
|
||||||
}
|
|
2
docs/.gitignore
vendored
2
docs/.gitignore
vendored
@@ -1,2 +1,2 @@
|
|||||||
node_modules
|
node_modules
|
||||||
build
|
.next
|
||||||
|
1
docs/.nvmrc
Normal file
1
docs/.nvmrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
v20.8.0
|
@@ -1,53 +0,0 @@
|
|||||||
[Home](/)
|
|
||||||
[Quick Start](/quick)
|
|
||||||
[Installation](/installation)
|
|
||||||
[Configuration](/config)
|
|
||||||
[Upgrade](/upgrade)
|
|
||||||
|
|
||||||
> :Collapse label=Locations
|
|
||||||
>
|
|
||||||
> [Overview](/location/overview)
|
|
||||||
> [Hooks](/location/hooks)
|
|
||||||
>
|
|
||||||
> > :Collapse label=Options
|
|
||||||
> >
|
|
||||||
> > [Overview](/location/options)
|
|
||||||
> > [Excluding Files](/location/exclude)
|
|
||||||
> > [Forget Policy](/location/forget)
|
|
||||||
>
|
|
||||||
> [Cron](/location/cron)
|
|
||||||
> [Docker Volumes](/location/docker)
|
|
||||||
|
|
||||||
> :Collapse label=Backend
|
|
||||||
>
|
|
||||||
> [Overview](/backend/overview)
|
|
||||||
> [Available Backends](/backend/available)
|
|
||||||
> [Options](/backend/options)
|
|
||||||
> [Environment](/backend/env)
|
|
||||||
|
|
||||||
> :Collapse label=CLI
|
|
||||||
>
|
|
||||||
> [General](/cli/general)
|
|
||||||
> [Info](/cli/info)
|
|
||||||
> [Check](/cli/check)
|
|
||||||
> [Completion](/cli/completion)
|
|
||||||
> [Backup](/cli/backup)
|
|
||||||
> [Restore](/cli/restore)
|
|
||||||
> [Forget](/cli/forget)
|
|
||||||
> [Cron](/cli/cron)
|
|
||||||
> [Exec](/cli/exec)
|
|
||||||
> [Install](/cli/install)
|
|
||||||
> [Uninstall](/cli/uninstall)
|
|
||||||
> [Upgrade](/cli/upgrade)
|
|
||||||
|
|
||||||
> :Collapse label=Migration
|
|
||||||
>
|
|
||||||
> [0.x → 1.0](/migration/0.x_1.0)
|
|
||||||
> [1.4 → 1.5](/migration/1.4_1.5)
|
|
||||||
|
|
||||||
[Examples](/examples)
|
|
||||||
[Docker](/docker)
|
|
||||||
[QA](/qa)
|
|
||||||
[Community](/community)
|
|
||||||
[Contributors](/contrib)
|
|
||||||
|
|
@@ -1,11 +0,0 @@
|
|||||||
# 🏘 Community
|
|
||||||
|
|
||||||
A list of community driven projects. (No official affiliation)
|
|
||||||
|
|
||||||
- SystemD Units: https://gitlab.com/py_crash/autorestic-systemd-units
|
|
||||||
- Docker image: https://github.com/pascaliske/docker-autorestic
|
|
||||||
- Ansible Role: https://github.com/adsanz/ansible-restic-role
|
|
||||||
- Ansible Role: https://github.com/ItsNotGoodName/ansible-role-autorestic
|
|
||||||
- Ansible Role: https://github.com/FuzzyMistborn/ansible-role-autorestic
|
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -1,18 +0,0 @@
|
|||||||
# 🙋♀️🙋♂️ Contributors
|
|
||||||
|
|
||||||
This amazing people helped the project!
|
|
||||||
|
|
||||||
- @agateblue - Docs, Pruning, S3
|
|
||||||
- @g-a-c - Update/Install bugs.
|
|
||||||
- @david-boles - Docs
|
|
||||||
- @SebDanielsson - Brew
|
|
||||||
- @n194 - AUR Package
|
|
||||||
- @jin-park-dev - Typos
|
|
||||||
- @sumnerboy12 - Typos
|
|
||||||
- @FuzzyMistborn - Typos
|
|
||||||
- @ChanceM - Typos
|
|
||||||
- @TheForcer - Typos
|
|
||||||
- @themorlan - Typos
|
|
||||||
- @somebox - Typos
|
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -1,17 +0,0 @@
|
|||||||
# 🐣 Examples
|
|
||||||
|
|
||||||
## List all the snapshots for all the backends
|
|
||||||
|
|
||||||
```bash
|
|
||||||
autorestic exec -av -- snapshots
|
|
||||||
```
|
|
||||||
|
|
||||||
## Unlock a locked repository
|
|
||||||
|
|
||||||
This can come in handy if a backup process crashed or if it was accidentally cancelled. Then the repository would still be locked without an actual process using it. Only do this if you know what you are doing and are sure no other process is actually reading/writing to the repository of course.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
autorestic exec -b my-backend -- unlock
|
|
||||||
```
|
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
6
docs/next.config.js
Normal file
6
docs/next.config.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
const withNextra = require('nextra')({
|
||||||
|
theme: 'nextra-theme-docs',
|
||||||
|
themeConfig: './theme.config.jsx',
|
||||||
|
})
|
||||||
|
|
||||||
|
module.exports = withNextra()
|
1122
docs/package-lock.json
generated
1122
docs/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,14 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "codedoc install && codedoc build",
|
"build": "NEXT_TELEMETRY_DISABLED=1 next build",
|
||||||
"dev": "codedoc serve"
|
"dev": "NEXT_TELEMETRY_DISABLED=1 next"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codedoc/cli": "^0.2.8"
|
"next": "^13.5.3",
|
||||||
}
|
"nextra": "^2.13.1",
|
||||||
|
"nextra-theme-docs": "^2.13.1",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0"
|
||||||
|
},
|
||||||
|
"packageManager": "pnpm@8.8.0"
|
||||||
}
|
}
|
||||||
|
10
docs/pages/_meta.json
Normal file
10
docs/pages/_meta.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"index": "Home",
|
||||||
|
"quick": "Quick Start",
|
||||||
|
"installation": "Installation",
|
||||||
|
"config": "Configuration",
|
||||||
|
"location": "Locations",
|
||||||
|
"backend": "Backend",
|
||||||
|
"cli": "CLI",
|
||||||
|
"migration": "Migration"
|
||||||
|
}
|
6
docs/pages/backend/_meta.json
Normal file
6
docs/pages/backend/_meta.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"index": "Overview",
|
||||||
|
"available": "Available backends",
|
||||||
|
"options": "Options",
|
||||||
|
"env": "Environment"
|
||||||
|
}
|
@@ -83,5 +83,3 @@ backends:
|
|||||||
user: user
|
user: user
|
||||||
password: pass
|
password: pass
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -63,5 +63,3 @@ backends:
|
|||||||
type: b2
|
type: b2
|
||||||
path: myBucket
|
path: myBucket
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
Backends are the outputs of the backup process. Each location needs at least one.
|
Backends are the outputs of the backup process. Each location needs at least one.
|
||||||
|
|
||||||
|
Note: names of backends MUST be lower case!
|
||||||
|
|
||||||
```yaml | .autorestic.yml
|
```yaml | .autorestic.yml
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
@@ -14,5 +16,3 @@ backends:
|
|||||||
## Types
|
## Types
|
||||||
|
|
||||||
We restic supports multiple types of backends. See the [full list](/backend/available) for details.
|
We restic supports multiple types of backends. See the [full list](/backend/available) for details.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -15,5 +15,3 @@ backend:
|
|||||||
```
|
```
|
||||||
|
|
||||||
In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command.
|
In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
3
docs/pages/cli/_meta.json
Normal file
3
docs/pages/cli/_meta.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"general": "General"
|
||||||
|
}
|
@@ -21,5 +21,3 @@ autorestic backup -l foo -l bar
|
|||||||
```bash
|
```bash
|
||||||
autorestic backup -l location@backend
|
autorestic backup -l location@backend
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -7,5 +7,3 @@ autorestic check
|
|||||||
Checks locations and backends are configured properly and initializes them if they are not already.
|
Checks locations and backends are configured properly and initializes them if they are not already.
|
||||||
|
|
||||||
This is mostly an internal command, but useful to verify if a backend is configured correctly.
|
This is mostly an internal command, but useful to verify if a backend is configured correctly.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -13,5 +13,3 @@ Supported shells are
|
|||||||
- powershell
|
- powershell
|
||||||
|
|
||||||
To see how to install run `autorestic help completion` and follow the instructions for your specific shell
|
To see how to install run `autorestic help completion` and follow the instructions for your specific shell
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -9,5 +9,3 @@ This command is mostly intended to be triggered by an automated system like syst
|
|||||||
It will run cron jobs as [specified in the cron section](/location/cron) of a specific location.
|
It will run cron jobs as [specified in the cron section](/location/cron) of a specific location.
|
||||||
|
|
||||||
The `--lean` flag will omit output like _skipping location x: not due yet_. This can be useful if you are dumping the output of the cron job to a log file and don't want to be overwhelmed by the output log.
|
The `--lean` flag will omit output like _skipping location x: not due yet_. This can be useful if you are dumping the output of the cron job to a log file and don't want to be overwhelmed by the output log.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -11,5 +11,3 @@ autorestic exec -av -- snapshots
|
|||||||
```
|
```
|
||||||
|
|
||||||
With `exec` you can basically run every cli command that you would be able to run with the restic cli. It only pre-fills path, key, etc.
|
With `exec` you can basically run every cli command that you would be able to run with the restic cli. It only pre-fills path, key, etc.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -4,10 +4,8 @@
|
|||||||
autorestic forget [-l, --location] [-a, --all] [--dry-run] [--prune]
|
autorestic forget [-l, --location] [-a, --all] [--dry-run] [--prune]
|
||||||
```
|
```
|
||||||
|
|
||||||
This will prune and remove old data form the backends according to the [keep policy you have specified for the location](/location/forget).
|
This will prune and remove old data form the backends according to the [keep policy you have specified for the location](/location/options/forget).
|
||||||
|
|
||||||
The `--dry-run` flag will do a dry run showing what would have been deleted, but won't touch the actual data.
|
The `--dry-run` flag will do a dry run showing what would have been deleted, but won't touch the actual data.
|
||||||
|
|
||||||
The `--prune` flag will also [prune the data](https://restic.readthedocs.io/en/latest/060_forget.html#removing-backup-snapshots). This is a costly operation that can take longer, however it will free up the actual space.
|
The `--prune` flag will also [prune the data](https://restic.readthedocs.io/en/latest/060_forget.html#removing-backup-snapshots). This is a costly operation that can take longer, however it will free up the actual space.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## `-c, --config`
|
## `-c, --config`
|
||||||
|
|
||||||
Specify the config file to be used.
|
Specify the config file to be used (must use .yml as an extension).
|
||||||
If omitted `autorestic` will search for for a `.autorestic.yml` in the current directory and your home directory.
|
If omitted `autorestic` will search for for a `.autorestic.yml` in the current directory and your home directory.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -34,5 +34,3 @@ With `--restic-bin` you can specify to run a specific restic binary. This can be
|
|||||||
```bash
|
```bash
|
||||||
autorestic --restic-bin /some/path/to/my/custom/restic/binary
|
autorestic --restic-bin /some/path/to/my/custom/restic/binary
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -14,5 +14,3 @@ autorestic info
|
|||||||
```bash
|
```bash
|
||||||
autorestic -c path/to/some/config.yml info
|
autorestic -c path/to/some/config.yml info
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -5,5 +5,3 @@ Installs both restic and autorestic to `/usr/local/bin`.
|
|||||||
```bash
|
```bash
|
||||||
autorestic install
|
autorestic install
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -15,5 +15,3 @@ autorestic restore -l home --from hdd --to /path/where/to/restore
|
|||||||
```
|
```
|
||||||
|
|
||||||
This will restore the location `home` to the `/path/where/to/restore` folder and taking the data from the backend `hdd`
|
This will restore the location `home` to the `/path/where/to/restore` folder and taking the data from the backend `hdd`
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -5,5 +5,3 @@ Uninstalls both restic and autorestic from `/usr/local/bin`.
|
|||||||
```bash
|
```bash
|
||||||
autorestic uninstall
|
autorestic uninstall
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -7,5 +7,3 @@ autorestic upgrade
|
|||||||
```
|
```
|
||||||
|
|
||||||
Updates both restic and autorestic automagically.
|
Updates both restic and autorestic automagically.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
11
docs/pages/community.md
Normal file
11
docs/pages/community.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# 🏘 Community
|
||||||
|
|
||||||
|
A list of community driven projects. (No official affiliation)
|
||||||
|
|
||||||
|
- SystemD Units: <https://gitlab.com/py_crash/autorestic-systemd-units>
|
||||||
|
- Docker image: <https://github.com/pascaliske/docker-autorestic>
|
||||||
|
- Ansible Role: <https://github.com/adsanz/ansible-restic-role>
|
||||||
|
- Ansible Role: <https://github.com/ItsNotGoodName/ansible-role-autorestic>
|
||||||
|
- Ansible Role: <https://github.com/FuzzyMistborn/ansible-role-autorestic>
|
||||||
|
- Ansible Role: <https://0xacab.org/varac-projects/ansible-role-autorestic>
|
||||||
|
- Ansible Role: <https://github.com/dbrennand/ansible-role-autorestic>
|
@@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
## Path
|
## Path
|
||||||
|
|
||||||
By default autorestic searches for a `.autorestic.yml` file in the current directory and your home folder.
|
By default autorestic searches for a `.autorestic.yml` file in the current directory, your home folder and your XDG config folder (`~/.config/` by default):
|
||||||
|
|
||||||
- `./.autorestic.yml`
|
- `./.autorestic.yml`
|
||||||
- `~/.autorestic.yml`
|
- `~/.autorestic.yml`
|
||||||
|
- `~/.config/autorestic/.autorestic.yml`
|
||||||
|
|
||||||
You can also specify a custom file with the `-c path/to/some/config.yml`
|
You can also specify a custom file with the `-c path/to/some/config.yml`
|
||||||
|
|
||||||
@@ -83,5 +84,3 @@ locations:
|
|||||||
forget:
|
forget:
|
||||||
<<: *bar
|
<<: *bar
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
19
docs/pages/contributors.md
Normal file
19
docs/pages/contributors.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# 🙋♀️🙋♂️ Contributors
|
||||||
|
|
||||||
|
This amazing people helped the project!
|
||||||
|
|
||||||
|
- @agateblue - Docs, Pruning, S3.
|
||||||
|
- @g-a-c - Update/Install bugs.
|
||||||
|
- @jjromannet - Bug fixes.
|
||||||
|
- @fariszr - Docker image improvements.
|
||||||
|
- @david-boles - Docs.
|
||||||
|
- @SebDanielsson - Brew.
|
||||||
|
- @n194 - AUR Package.
|
||||||
|
- @olofvndrhr - Healthchecks example.
|
||||||
|
- @jin-park-dev - Typos.
|
||||||
|
- @sumnerboy12 - Typos.
|
||||||
|
- @FuzzyMistborn - Typos.
|
||||||
|
- @ChanceM - Typos.
|
||||||
|
- @TheForcer - Typos.
|
||||||
|
- @themorlan - Typos.
|
||||||
|
- @somebox - Typos.
|
@@ -10,7 +10,7 @@ For remote backups (S3, B2, GCS, etc.) it's quite easy, as you only need to moun
|
|||||||
docker run --rm \\
|
docker run --rm \\
|
||||||
-v $(pwd):/data \\
|
-v $(pwd):/data \\
|
||||||
cupcakearmy/autorestic \\
|
cupcakearmy/autorestic \\
|
||||||
autorestic backup -va
|
autorestic backup -va -c /data/.autorestic.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Rclone
|
## Rclone
|
38
docs/pages/examples.md
Normal file
38
docs/pages/examples.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# 🐣 Examples
|
||||||
|
|
||||||
|
## List all the snapshots for all the backends
|
||||||
|
|
||||||
|
```bash
|
||||||
|
autorestic exec -av -- snapshots
|
||||||
|
```
|
||||||
|
|
||||||
|
## Unlock a locked repository
|
||||||
|
|
||||||
|
This can come in handy if a backup process crashed or if it was accidentally cancelled. Then the repository would still be locked without an actual process using it. Only do this if you know what you are doing and are sure no other process is actually reading/writing to the repository of course.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
autorestic exec -b my-backend -- unlock
|
||||||
|
```
|
||||||
|
|
||||||
|
## Use hooks to integrate with [healthchecks](https://healthchecks.io/)
|
||||||
|
|
||||||
|
> Thanks to @olofvndrhr for providing it ❤️
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
extras:
|
||||||
|
healthchecks: &healthchecks
|
||||||
|
hooks:
|
||||||
|
before:
|
||||||
|
- 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Starting backup for location: ${AUTORESTIC_LOCATION}" https://<healthchecks-url>/ping/<uid>/start'
|
||||||
|
failure:
|
||||||
|
- 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Backup failed for location: ${AUTORESTIC_LOCATION}" https://<healthchecks-url>/ping/<uid>/fail'
|
||||||
|
success:
|
||||||
|
- 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Backup successful for location: ${AUTORESTIC_LOCATION}" https://<healthchecks-url>/ping/<uid>'
|
||||||
|
|
||||||
|
locations:
|
||||||
|
something:
|
||||||
|
<<: *healthchecks
|
||||||
|
from: /somewhere
|
||||||
|
to:
|
||||||
|
- somewhere-else
|
||||||
|
```
|
@@ -18,5 +18,3 @@ Autorestic is a wrapper around the amazing [restic](https://restic.net/). While
|
|||||||
- Cron jobs for automatic backup
|
- Cron jobs for automatic backup
|
||||||
- Backup & Restore docker volumes
|
- Backup & Restore docker volumes
|
||||||
- Generated completions for `[bash|zsh|fish|powershell]`
|
- Generated completions for `[bash|zsh|fish|powershell]`
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -5,7 +5,7 @@ Linux & macOS. Windows is not supported. If you have problems installing please
|
|||||||
Autorestic requires `bash`, `wget` and `bzip2` to be installed. For most systems these should be already installed.
|
Autorestic requires `bash`, `wget` and `bzip2` to be installed. For most systems these should be already installed.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget -qO - https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
|
wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
## Alternatives
|
## Alternatives
|
||||||
@@ -24,8 +24,10 @@ You can download the right binary from the release page and simply copy it to `/
|
|||||||
|
|
||||||
If you are on macOS you can install through brew: `brew install autorestic`.
|
If you are on macOS you can install through brew: `brew install autorestic`.
|
||||||
|
|
||||||
|
### Fedora
|
||||||
|
|
||||||
|
Fedora users can install the [autorestic](https://src.fedoraproject.org/rpms/autorestic/) package with `dnf install autorestic`.
|
||||||
|
|
||||||
### AUR
|
### AUR
|
||||||
|
|
||||||
~~If you are on Arch there is an [AUR Package](https://aur.archlinux.org/packages/autorestic-bin/) (looking for maintainers).~~ - Deprecated
|
If you are on Arch there is an [AUR Package](https://aur.archlinux.org/packages/autorestic-bin/)
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
7
docs/pages/location/_meta.json
Normal file
7
docs/pages/location/_meta.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"index": "Overview",
|
||||||
|
"hooks": "Hooks",
|
||||||
|
"options": "Options",
|
||||||
|
"cron": "Cronjobs",
|
||||||
|
"docker": "Docker volumes"
|
||||||
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
# Cron
|
# Cron
|
||||||
|
|
||||||
Often it is usefully to trigger backups automatically. For this we can specify a `cron` attribute to each location.
|
Often it is useful to trigger backups automatically. For this, we can specify a `cron` attribute to each location.
|
||||||
|
|
||||||
```yaml | .autorestic.yml
|
```yaml | .autorestic.yml
|
||||||
locations:
|
locations:
|
||||||
@@ -10,15 +10,15 @@ locations:
|
|||||||
cron: '0 3 * * 0' # Every Sunday at 3:00
|
cron: '0 3 * * 0' # Every Sunday at 3:00
|
||||||
```
|
```
|
||||||
|
|
||||||
Here is a awesome website with [some examples](https://crontab.guru/examples.html) and an [explorer](https://crontab.guru/)
|
Here is an awesome website with [some examples](https://crontab.guru/examples.html) and an [explorer](https://crontab.guru/).
|
||||||
|
|
||||||
## Installing the cron
|
## Installing the cron
|
||||||
|
|
||||||
**This has to be done only once, regardless of now many cron jobs you have in your config file.**
|
**This has to be done only once, regardless of how many cron jobs you have in your config file.**
|
||||||
|
|
||||||
To actually enable cron jobs you need something to call `autorestic cron` on a timed schedule.
|
To actually enable cron jobs you need something to call `autorestic cron` on a timed schedule.
|
||||||
Note that the schedule has nothing to do with the `cron` attribute in each location.
|
Note that the schedule has nothing to do with the `cron` attribute in each location.
|
||||||
My advise would be to trigger the command every 5min, but if you have a cronjob that runs only once a week, it's probably enough to schedule it once a day.
|
My advice would be to trigger the command every 5min, but if you have a cronjob that runs only once a week, it's probably enough to schedule it once a day.
|
||||||
|
|
||||||
### Crontab
|
### Crontab
|
||||||
|
|
||||||
@@ -50,6 +50,4 @@ To debug a cron job you can use
|
|||||||
|
|
||||||
Now you can add as many `cron` attributes as you wish in the config file ⏱
|
Now you can add as many `cron` attributes as you wish in the config file ⏱
|
||||||
|
|
||||||
> Also note that manually triggered backups with `autorestic backup` will not influence the cron timeline, they are willingly not linked.
|
> Also note that manually triggered backups with `autorestic backup` will not influence the cron timeline, they are intentionally not linked.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -35,5 +35,3 @@ autorestic restore -l hello
|
|||||||
```
|
```
|
||||||
|
|
||||||
The volume has to exists whenever backing up or restoring.
|
The volume has to exists whenever backing up or restoring.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -76,5 +76,3 @@ AUTORESTIC_LOCATION=bar
|
|||||||
AUTORESTIC_FILES_ADDED_0=42
|
AUTORESTIC_FILES_ADDED_0=42
|
||||||
AUTORESTIC_FILES_ADDED_FOO=42
|
AUTORESTIC_FILES_ADDED_FOO=42
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -3,6 +3,8 @@
|
|||||||
Locations can be seen as the input to the backup process. Generally this is simply a folder.
|
Locations can be seen as the input to the backup process. Generally this is simply a folder.
|
||||||
The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers.
|
The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers.
|
||||||
|
|
||||||
|
Note: names of locations MUST be lower case!
|
||||||
|
|
||||||
```yaml | .autorestic.yml
|
```yaml | .autorestic.yml
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
@@ -29,5 +31,3 @@ Paths can be absolute or relative. If relative they are resolved relative to the
|
|||||||
## `to`
|
## `to`
|
||||||
|
|
||||||
This is either a single backend or an array of backends. The backends have to be configured in the same config file.
|
This is either a single backend or an array of backends. The backends have to be configured in the same config file.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
3
docs/pages/location/options/_meta.json
Normal file
3
docs/pages/location/options/_meta.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"index": "Overview"
|
||||||
|
}
|
31
docs/pages/location/options/copy.md
Normal file
31
docs/pages/location/options/copy.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Copy
|
||||||
|
|
||||||
|
Instead of specifying multiple `to` backends for a given `location` you can also use the `copy` option. Instead of recalculating the backup multiple times, you can copy the freshly copied snapshot from one backend to the other, avoiding recomputation.
|
||||||
|
|
||||||
|
###### Example
|
||||||
|
|
||||||
|
```yaml | .autorestic.yml
|
||||||
|
locations:
|
||||||
|
my-location:
|
||||||
|
from: /data
|
||||||
|
to:
|
||||||
|
- a #Fast
|
||||||
|
- b #Fast
|
||||||
|
- c #Slow
|
||||||
|
```
|
||||||
|
|
||||||
|
Becomes
|
||||||
|
|
||||||
|
```yaml | .autorestic.yml
|
||||||
|
locations:
|
||||||
|
my-location:
|
||||||
|
from: /data
|
||||||
|
to:
|
||||||
|
- a
|
||||||
|
- b
|
||||||
|
copy:
|
||||||
|
a:
|
||||||
|
- c
|
||||||
|
```
|
||||||
|
|
||||||
|
Instead of backing up to each backend separately, you can choose that the snapshot created to `a` will be copied over to `c`, avoiding heavy computation on `c`.
|
@@ -16,5 +16,3 @@ locations:
|
|||||||
- '*.abc'
|
- '*.abc'
|
||||||
exclude-file: .gitignore
|
exclude-file: .gitignore
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -21,7 +21,7 @@ locations:
|
|||||||
keep-weekly: 1 # keep 1 last weekly snapshots
|
keep-weekly: 1 # keep 1 last weekly snapshots
|
||||||
keep-monthly: 12 # keep 12 last monthly snapshots
|
keep-monthly: 12 # keep 12 last monthly snapshots
|
||||||
keep-yearly: 7 # keep 7 last yearly snapshots
|
keep-yearly: 7 # keep 7 last yearly snapshots
|
||||||
keep-within: '2w' # keep snapshots from the last 2 weeks
|
keep-within: '14d' # keep snapshots from the last 14 days
|
||||||
```
|
```
|
||||||
|
|
||||||
## Globally
|
## Globally
|
||||||
@@ -37,4 +37,19 @@ global:
|
|||||||
keep-weekly: 52
|
keep-weekly: 52
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
## Automatically forget after backup
|
||||||
|
|
||||||
|
You can also configure `autorestic` to automatically run the forget command for you after every backup. You can do that by specifying the `forget` option.
|
||||||
|
|
||||||
|
```yaml | .autorestic.yml
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
locations:
|
||||||
|
etc:
|
||||||
|
from: /etc
|
||||||
|
to: local
|
||||||
|
forget: prune # Or only "yes" if you don't want to prune
|
||||||
|
options:
|
||||||
|
forget:
|
||||||
|
keep-last: 5
|
||||||
|
```
|
@@ -63,5 +63,3 @@ backends:
|
|||||||
locations:
|
locations:
|
||||||
# ...
|
# ...
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -22,5 +22,3 @@ remote:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Other than the config file there is a new `-v, --verbose` flag which shows the output of native commands, which are now hidden by default.
|
Other than the config file there is a new `-v, --verbose` flag which shows the output of native commands, which are now hidden by default.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -57,4 +57,10 @@ locations:
|
|||||||
type: volume
|
type: volume
|
||||||
```
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
## Tagging
|
||||||
|
|
||||||
|
Autorestic changed the way backups are referenced. Before we took the paths as the identifying information. Now autorestic uses native restic tags to reference them. This means that old backups are not referenced. You can the old snapshots manually. An example can be shown below.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
autorestic exec -va -- tag --add ar:location:LOCATION_NAME # Only if you have only one location
|
||||||
|
```
|
4
docs/pages/migration/_meta.json
Normal file
4
docs/pages/migration/_meta.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"0.x_1.0": "0.x → 1.0",
|
||||||
|
"1.4_1.5": "1.4 → 1.5"
|
||||||
|
}
|
@@ -6,5 +6,3 @@ This happens when autorestic needs to write to the config file: e.g. when we are
|
|||||||
Unfortunately during this process formatting and comments are lost because the `yaml` library used is not comment and/or format aware.
|
Unfortunately during this process formatting and comments are lost because the `yaml` library used is not comment and/or format aware.
|
||||||
|
|
||||||
That is why autorestic will place a copy of your old config next to the one we are writing to.
|
That is why autorestic will place a copy of your old config next to the one we are writing to.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
@@ -3,7 +3,7 @@
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget -qO - https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
|
wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
See [installation](/installation) for alternative options.
|
See [installation](/installation) for alternative options.
|
||||||
@@ -82,5 +82,3 @@ autorestic restore -l home --from hdd --to /path/where/to/restore
|
|||||||
```
|
```
|
||||||
|
|
||||||
This will restore the location `home` from the backend `hdd` to the given path.
|
This will restore the location `home` from the backend `hdd` to the given path.
|
||||||
|
|
||||||
> :ToCPrevNext
|
|
3044
docs/pnpm-lock.yaml
generated
Normal file
3044
docs/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
docs/theme.config.jsx
Normal file
24
docs/theme.config.jsx
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
export default {
|
||||||
|
logo: <span>Autorestic</span>,
|
||||||
|
docsRepositoryBase: 'https://github.com/cupcakearmy/autorestic/tree/master/docs',
|
||||||
|
project: {
|
||||||
|
link: 'https://github.com/cupcakearmy/autorestic',
|
||||||
|
},
|
||||||
|
sidebar: {
|
||||||
|
defaultMenuCollapseLevel: 1,
|
||||||
|
},
|
||||||
|
feedback: {
|
||||||
|
content: 'Question? An error? Give feedback →',
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
text: (
|
||||||
|
<span>
|
||||||
|
MIT {new Date().getFullYear()} ©{' '}
|
||||||
|
<a href="https://github.com/cupcakearmy" target="_blank">
|
||||||
|
cupcakearmy
|
||||||
|
</a>
|
||||||
|
.
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
}
|
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"cleanUrls": true
|
|
||||||
}
|
|
30
go.mod
30
go.mod
@@ -1,14 +1,36 @@
|
|||||||
module github.com/cupcakearmy/autorestic
|
module github.com/cupcakearmy/autorestic
|
||||||
|
|
||||||
go 1.16
|
go 1.21
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/blang/semver/v4 v4.0.0
|
github.com/blang/semver/v4 v4.0.0
|
||||||
github.com/buger/goterm v1.0.0
|
github.com/buger/goterm v1.0.0
|
||||||
github.com/fatih/color v1.10.0
|
github.com/fatih/color v1.13.0
|
||||||
github.com/joho/godotenv v1.4.0
|
github.com/joho/godotenv v1.4.0
|
||||||
github.com/mitchellh/go-homedir v1.1.0
|
github.com/mitchellh/go-homedir v1.1.0
|
||||||
github.com/robfig/cron v1.2.0
|
github.com/robfig/cron v1.2.0
|
||||||
github.com/spf13/cobra v1.1.3
|
github.com/spf13/cobra v1.4.0
|
||||||
github.com/spf13/viper v1.7.1
|
github.com/spf13/viper v1.11.0
|
||||||
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/fsnotify/fsnotify v1.5.1 // indirect
|
||||||
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||||
|
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||||
|
github.com/magiconair/properties v1.8.6 // indirect
|
||||||
|
github.com/mattn/go-colorable v0.1.12 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||||
|
github.com/mitchellh/mapstructure v1.4.3 // indirect
|
||||||
|
github.com/pelletier/go-toml v1.9.4 // indirect
|
||||||
|
github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect
|
||||||
|
github.com/spf13/afero v1.8.2 // indirect
|
||||||
|
github.com/spf13/cast v1.4.1 // indirect
|
||||||
|
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||||
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
|
github.com/subosito/gotenv v1.2.0 // indirect
|
||||||
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
|
||||||
|
golang.org/x/text v0.3.8 // indirect
|
||||||
|
gopkg.in/ini.v1 v1.66.4 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
||||||
)
|
)
|
||||||
|
485
go.sum
485
go.sum
@@ -3,216 +3,216 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
|
|||||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
||||||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||||
|
cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
|
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
|
||||||
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
|
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
|
||||||
|
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
|
||||||
|
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
|
||||||
|
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
|
||||||
|
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
|
||||||
|
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
|
||||||
|
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
|
||||||
|
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
|
||||||
|
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
|
||||||
|
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
|
||||||
|
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
|
||||||
|
cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY=
|
||||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||||
|
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||||
|
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
||||||
|
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
|
||||||
|
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
|
||||||
|
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
||||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||||
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
|
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
||||||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||||
|
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
|
||||||
|
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
||||||
|
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
|
||||||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
||||||
|
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
|
||||||
|
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
|
||||||
|
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
||||||
|
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||||
|
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
|
||||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
|
||||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
|
||||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
|
||||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
|
||||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
|
||||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
|
||||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
|
||||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
|
||||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
|
||||||
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
|
|
||||||
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
|
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
|
||||||
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
|
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
|
||||||
github.com/buger/goterm v1.0.0 h1:ZB6uUlY8+sjJyFGzz2WpRqX2XYPeXVgtZAOJMwOsTWM=
|
github.com/buger/goterm v1.0.0 h1:ZB6uUlY8+sjJyFGzz2WpRqX2XYPeXVgtZAOJMwOsTWM=
|
||||||
github.com/buger/goterm v1.0.0/go.mod h1:16STi3LquiscTIHA8SXUNKEa/Cnu4ZHBH8NsCaWgso0=
|
github.com/buger/goterm v1.0.0/go.mod h1:16STi3LquiscTIHA8SXUNKEa/Cnu4ZHBH8NsCaWgso0=
|
||||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||||
|
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||||
|
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||||
|
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||||
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
|
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
|
||||||
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||||
|
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
|
||||||
|
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
|
||||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
|
||||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
|
||||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
|
||||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
|
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
|
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||||
|
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||||
|
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||||
|
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||||
|
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
|
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||||
|
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||||
|
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||||
|
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||||
|
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||||
|
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||||
|
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||||
|
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||||
|
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||||
|
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
|
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
|
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
|
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
|
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
|
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
|
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
|
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
|
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||||
|
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||||
|
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||||
|
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||||
|
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||||
|
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||||
|
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||||
|
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||||
|
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
|
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
|
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||||
|
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
|
||||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
|
||||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
|
||||||
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
|
||||||
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
|
|
||||||
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
|
||||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
|
||||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
|
||||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
|
||||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
|
||||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
|
||||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
|
||||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
|
||||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
|
||||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
|
||||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
|
||||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
|
|
||||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
|
||||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
|
||||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||||
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
|
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
|
||||||
github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
|
||||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
|
||||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
|
||||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
|
||||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
|
||||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=
|
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||||
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
|
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
|
||||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
|
||||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
|
||||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
|
||||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
|
||||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
|
||||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
|
||||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0=
|
||||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
|
||||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
|
||||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
|
||||||
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
|
|
||||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
|
||||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
|
||||||
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
|
|
||||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
|
||||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
|
||||||
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
|
||||||
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
|
||||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
|
||||||
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
|
||||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
|
||||||
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
|
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
|
||||||
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
||||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
|
||||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
|
||||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
|
||||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
|
github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
|
||||||
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
|
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
||||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
|
||||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
|
||||||
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
|
|
||||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
|
||||||
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
|
|
||||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
|
||||||
github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
|
|
||||||
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
|
|
||||||
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
|
|
||||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
|
||||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
|
||||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44=
|
||||||
github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk=
|
github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk=
|
||||||
github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||||
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
|
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||||
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
||||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
|
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
||||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
|
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||||
|
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||||
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
|
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
|
||||||
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
||||||
|
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||||
|
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||||
|
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||||
|
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
||||||
|
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
||||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
@@ -222,16 +222,22 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl
|
|||||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
|
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
||||||
|
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||||
|
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||||
|
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||||
|
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||||
|
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||||
|
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
|
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
|
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
@@ -240,20 +246,47 @@ golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn
|
|||||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
|
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
|
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
|
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
|
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
|
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
|
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
|
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
|
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
|
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
|
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
|
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
@@ -261,43 +294,127 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54 h1:rF3Ohx8DRyl8h2zw9qojyLHLhrJpEMgyPOImREEryf0=
|
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
|
||||||
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
|
||||||
|
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||||
|
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
|
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
|
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
|
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
|
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
|
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
|
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
|
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
|
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
|
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
|
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||||
|
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||||
|
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||||
|
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
|
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
|
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
|
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
|
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
|
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
|
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
|
golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
|
||||||
|
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
|
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
|
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
|
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
|
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
|
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||||
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||||
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||||
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||||
|
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||||
|
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||||
|
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||||
|
google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||||
|
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||||
|
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||||
|
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||||
|
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||||
|
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||||
|
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
|
||||||
|
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
|
||||||
|
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
|
||||||
|
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
|
||||||
|
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||||
|
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||||
|
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||||
|
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||||
@@ -307,24 +424,78 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98
|
|||||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||||
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
||||||
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||||
|
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||||
|
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||||
|
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||||
|
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||||
|
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||||
|
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
|
||||||
|
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
|
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
|
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
|
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
|
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
|
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
|
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
|
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
|
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
|
||||||
|
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||||
|
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
||||||
|
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
|
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
|
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
|
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
|
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
|
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
|
google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
|
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
|
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
|
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||||
|
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||||
|
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||||
|
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||||
|
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||||
|
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
|
||||||
|
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||||
|
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||||
|
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||||
|
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||||
|
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
|
||||||
|
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
|
||||||
|
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||||
|
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||||
|
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||||
|
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||||
|
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||||
|
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||||
|
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||||
|
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||||
|
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||||
|
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||||
|
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||||
gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=
|
gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4=
|
||||||
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
|
||||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
|
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||||
|
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
|
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||||
|
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||||
|
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||||
|
@@ -31,6 +31,11 @@ else
|
|||||||
fi
|
fi
|
||||||
echo $ARCH
|
echo $ARCH
|
||||||
|
|
||||||
|
if ! command -v bzip2 &>/dev/null; then
|
||||||
|
echo "Missing bzip2 command. Please install the bzip2 package for your system."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
wget -qO - https://api.github.com/repos/cupcakearmy/autorestic/releases/latest \
|
wget -qO - https://api.github.com/repos/cupcakearmy/autorestic/releases/latest \
|
||||||
| grep "browser_download_url.*_${OS}_${ARCH}" \
|
| grep "browser_download_url.*_${OS}_${ARCH}" \
|
||||||
| cut -d : -f 2,3 \
|
| cut -d : -f 2,3 \
|
||||||
|
@@ -9,21 +9,22 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cupcakearmy/autorestic/internal/colors"
|
"github.com/cupcakearmy/autorestic/internal/colors"
|
||||||
|
"github.com/cupcakearmy/autorestic/internal/flags"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BackendRest struct {
|
type BackendRest struct {
|
||||||
User string `yaml:"user,omitempty"`
|
User string `mapstructure:"user,omitempty"`
|
||||||
Password string `yaml:"password,omitempty"`
|
Password string `mapstructure:"password,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Backend struct {
|
type Backend struct {
|
||||||
name string
|
name string
|
||||||
Type string `yaml:"type,omitempty"`
|
Type string `mapstructure:"type,omitempty"`
|
||||||
Path string `yaml:"path,omitempty"`
|
Path string `mapstructure:"path,omitempty"`
|
||||||
Key string `yaml:"key,omitempty"`
|
Key string `mapstructure:"key,omitempty"`
|
||||||
Env map[string]string `yaml:"env,omitempty"`
|
Env map[string]string `mapstructure:"env,omitempty"`
|
||||||
Rest BackendRest `yaml:"rest,omitempty"`
|
Rest BackendRest `mapstructure:"rest,omitempty"`
|
||||||
Options Options `yaml:"options,omitempty"`
|
Options Options `mapstructure:"options,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetBackend(name string) (Backend, bool) {
|
func GetBackend(name string) (Backend, bool) {
|
||||||
@@ -37,7 +38,7 @@ func (b Backend) generateRepo() (string, error) {
|
|||||||
case "local":
|
case "local":
|
||||||
return GetPathRelativeToConfig(b.Path)
|
return GetPathRelativeToConfig(b.Path)
|
||||||
case "rest":
|
case "rest":
|
||||||
parsed, err := url.Parse(b.Path)
|
parsed, err := url.Parse(os.ExpandEnv(b.Path))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@@ -119,18 +120,19 @@ func (b Backend) validate() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
options := ExecuteOptions{Envs: env}
|
options := ExecuteOptions{Envs: env, Silent: true}
|
||||||
// Check if already initialized
|
// Check if already initialized
|
||||||
_, err = ExecuteResticCommand(options, "snapshots")
|
cmd := []string{"check"}
|
||||||
|
cmd = append(cmd, combineBackendOptions("check", b)...)
|
||||||
|
_, _, err = ExecuteResticCommand(options, cmd...)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
// If not initialize
|
// If not initialize
|
||||||
colors.Body.Printf("Initializing backend \"%s\"...\n", b.name)
|
colors.Body.Printf("Initializing backend \"%s\"...\n", b.name)
|
||||||
out, err := ExecuteResticCommand(options, "init")
|
cmd := []string{"init"}
|
||||||
if VERBOSE {
|
cmd = append(cmd, combineBackendOptions("init", b)...)
|
||||||
colors.Faint.Println(out)
|
_, _, err := ExecuteResticCommand(options, cmd...)
|
||||||
}
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,21 +143,18 @@ func (b Backend) Exec(args []string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
options := ExecuteOptions{Envs: env}
|
options := ExecuteOptions{Envs: env}
|
||||||
out, err := ExecuteResticCommand(options, args...)
|
_, out, err := ExecuteResticCommand(options, args...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
colors.Error.Println(out)
|
colors.Error.Println(out)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if VERBOSE {
|
|
||||||
colors.Faint.Println(out)
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b Backend) ExecDocker(l Location, args []string) (string, error) {
|
func (b Backend) ExecDocker(l Location, args []string) (int, string, error) {
|
||||||
env, err := b.getEnv()
|
env, err := b.getEnv()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return -1, "", err
|
||||||
}
|
}
|
||||||
volume := l.From[0]
|
volume := l.From[0]
|
||||||
options := ExecuteOptions{
|
options := ExecuteOptions{
|
||||||
@@ -166,7 +165,6 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) {
|
|||||||
args = append([]string{"restic"}, args...)
|
args = append([]string{"restic"}, args...)
|
||||||
docker := []string{
|
docker := []string{
|
||||||
"run", "--rm",
|
"run", "--rm",
|
||||||
"--pull", "always",
|
|
||||||
"--entrypoint", "ash",
|
"--entrypoint", "ash",
|
||||||
"--workdir", dir,
|
"--workdir", dir,
|
||||||
"--volume", volume + ":" + dir,
|
"--volume", volume + ":" + dir,
|
||||||
@@ -187,20 +185,20 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) {
|
|||||||
// No additional setup needed
|
// No additional setup needed
|
||||||
case "rclone":
|
case "rclone":
|
||||||
// Read host rclone config and mount it into the container
|
// Read host rclone config and mount it into the container
|
||||||
configFile, err := ExecuteCommand(ExecuteOptions{Command: "rclone"}, "config", "file")
|
code, configFile, err := ExecuteCommand(ExecuteOptions{Command: "rclone"}, "config", "file")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return code, "", err
|
||||||
}
|
}
|
||||||
splitted := strings.Split(strings.TrimSpace(configFile), "\n")
|
splitted := strings.Split(strings.TrimSpace(configFile), "\n")
|
||||||
configFilePath := splitted[len(splitted)-1]
|
configFilePath := splitted[len(splitted)-1]
|
||||||
docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro")
|
docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro")
|
||||||
default:
|
default:
|
||||||
return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type)
|
return -1, "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type)
|
||||||
}
|
}
|
||||||
for key, value := range env {
|
for key, value := range env {
|
||||||
docker = append(docker, "--env", key+"="+value)
|
docker = append(docker, "--env", key+"="+value)
|
||||||
}
|
}
|
||||||
docker = append(docker, "cupcakearmy/autorestic:"+VERSION, "-c", strings.Join(args, " "))
|
|
||||||
out, err := ExecuteCommand(options, docker...)
|
docker = append(docker, flags.DOCKER_IMAGE, "-c", strings.Join(args, " "))
|
||||||
return out, err
|
return ExecuteCommand(options, docker...)
|
||||||
}
|
}
|
||||||
|
225
internal/backend_test.go
Normal file
225
internal/backend_test.go
Normal file
@@ -0,0 +1,225 @@
|
|||||||
|
package internal
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/spf13/viper"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestGenerateRepo(t *testing.T) {
|
||||||
|
|
||||||
|
t.Run("empty backend", func(t *testing.T) {
|
||||||
|
b := Backend{
|
||||||
|
name: "empty backend",
|
||||||
|
Type: "",
|
||||||
|
}
|
||||||
|
_, err := b.generateRepo()
|
||||||
|
if err == nil {
|
||||||
|
t.Errorf("Error expected for empty backend type")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("local backend", func(t *testing.T) {
|
||||||
|
b := Backend{
|
||||||
|
name: "local backend",
|
||||||
|
Type: "local",
|
||||||
|
Path: "/foo/bar",
|
||||||
|
}
|
||||||
|
result, err := b.generateRepo()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result, "/foo/bar")
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("local backend with homedir prefix", func(t *testing.T) {
|
||||||
|
b := Backend{
|
||||||
|
name: "local backend",
|
||||||
|
Type: "local",
|
||||||
|
Path: "~/foo/bar",
|
||||||
|
}
|
||||||
|
result, err := b.generateRepo()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result, fmt.Sprintf("%s/foo/bar", os.Getenv("HOME")))
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("local backend with config file", func(t *testing.T) {
|
||||||
|
// config file path should always be present from initConfig
|
||||||
|
viper.SetConfigFile("/tmp/.autorestic.yml")
|
||||||
|
defer viper.Reset()
|
||||||
|
|
||||||
|
b := Backend{
|
||||||
|
name: "local backend",
|
||||||
|
Type: "local",
|
||||||
|
}
|
||||||
|
result, err := b.generateRepo()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result, "/tmp")
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("rest backend with valid path", func(t *testing.T) {
|
||||||
|
b := Backend{
|
||||||
|
name: "rest backend",
|
||||||
|
Type: "rest",
|
||||||
|
Path: "http://localhost:8000/foo",
|
||||||
|
}
|
||||||
|
result, err := b.generateRepo()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result, "rest:http://localhost:8000/foo")
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("rest backend with user", func(t *testing.T) {
|
||||||
|
b := Backend{
|
||||||
|
name: "rest backend",
|
||||||
|
Type: "rest",
|
||||||
|
Path: "http://localhost:8000/foo",
|
||||||
|
Rest: BackendRest{
|
||||||
|
User: "user",
|
||||||
|
Password: "",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
result, err := b.generateRepo()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result, "rest:http://user@localhost:8000/foo")
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("rest backend with user and password", func(t *testing.T) {
|
||||||
|
b := Backend{
|
||||||
|
name: "rest backend",
|
||||||
|
Type: "rest",
|
||||||
|
Path: "http://localhost:8000/foo",
|
||||||
|
Rest: BackendRest{
|
||||||
|
User: "user",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
result, err := b.generateRepo()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result, "rest:http://user:pass@localhost:8000/foo")
|
||||||
|
})
|
||||||
|
|
||||||
|
backendTests := []struct {
|
||||||
|
name string
|
||||||
|
backend Backend
|
||||||
|
want string
|
||||||
|
}{
|
||||||
|
{name: "b2 backend", backend: Backend{name: "b2", Type: "b2", Path: "foo"}, want: "b2:foo"},
|
||||||
|
{name: "azure backend", backend: Backend{name: "azure", Type: "azure", Path: "foo"}, want: "azure:foo"},
|
||||||
|
{name: "gs backend", backend: Backend{name: "gs", Type: "gs", Path: "foo"}, want: "gs:foo"},
|
||||||
|
{name: "s3 backend", backend: Backend{name: "s3", Type: "s3", Path: "foo"}, want: "s3:foo"},
|
||||||
|
{name: "sftp backend", backend: Backend{name: "sftp", Type: "sftp", Path: "foo"}, want: "sftp:foo"},
|
||||||
|
{name: "rclone backend", backend: Backend{name: "rclone", Type: "rclone", Path: "foo"}, want: "rclone:foo"},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range backendTests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
got, err := tt.backend.generateRepo()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, got, tt.want)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetEnv(t *testing.T) {
|
||||||
|
t.Run("env in key field", func(t *testing.T) {
|
||||||
|
b := Backend{
|
||||||
|
name: "",
|
||||||
|
Type: "local",
|
||||||
|
Path: "/foo/bar",
|
||||||
|
Key: "secret123",
|
||||||
|
}
|
||||||
|
result, err := b.getEnv()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result["RESTIC_REPOSITORY"], "/foo/bar")
|
||||||
|
assertEqual(t, result["RESTIC_PASSWORD"], "secret123")
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("env in config file", func(t *testing.T) {
|
||||||
|
b := Backend{
|
||||||
|
name: "",
|
||||||
|
Type: "local",
|
||||||
|
Path: "/foo/bar",
|
||||||
|
Env: map[string]string{
|
||||||
|
"B2_ACCOUNT_ID": "foo123",
|
||||||
|
"B2_ACCOUNT_KEY": "foo456",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
result, err := b.getEnv()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result["RESTIC_REPOSITORY"], "/foo/bar")
|
||||||
|
assertEqual(t, result["RESTIC_PASSWORD"], "")
|
||||||
|
assertEqual(t, result["B2_ACCOUNT_ID"], "foo123")
|
||||||
|
assertEqual(t, result["B2_ACCOUNT_KEY"], "foo456")
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("env in Envfile or env vars", func(t *testing.T) {
|
||||||
|
// generate env variables
|
||||||
|
// TODO better way to teardown
|
||||||
|
defer os.Unsetenv("AUTORESTIC_FOO_RESTIC_PASSWORD")
|
||||||
|
defer os.Unsetenv("AUTORESTIC_FOO_B2_ACCOUNT_ID")
|
||||||
|
defer os.Unsetenv("AUTORESTIC_FOO_B2_ACCOUNT_KEY")
|
||||||
|
os.Setenv("AUTORESTIC_FOO_RESTIC_PASSWORD", "secret123")
|
||||||
|
os.Setenv("AUTORESTIC_FOO_B2_ACCOUNT_ID", "foo123")
|
||||||
|
os.Setenv("AUTORESTIC_FOO_B2_ACCOUNT_KEY", "foo456")
|
||||||
|
|
||||||
|
b := Backend{
|
||||||
|
name: "foo",
|
||||||
|
Type: "local",
|
||||||
|
Path: "/foo/bar",
|
||||||
|
}
|
||||||
|
result, err := b.getEnv()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result["RESTIC_REPOSITORY"], "/foo/bar")
|
||||||
|
assertEqual(t, result["RESTIC_PASSWORD"], "secret123")
|
||||||
|
assertEqual(t, result["B2_ACCOUNT_ID"], "foo123")
|
||||||
|
assertEqual(t, result["B2_ACCOUNT_KEY"], "foo456")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestValidate(t *testing.T) {
|
||||||
|
t.Run("no type given", func(t *testing.T) {
|
||||||
|
b := Backend{
|
||||||
|
name: "foo",
|
||||||
|
Type: "",
|
||||||
|
Path: "/foo/bar",
|
||||||
|
}
|
||||||
|
err := b.validate()
|
||||||
|
if err == nil {
|
||||||
|
t.Error("expected to get error")
|
||||||
|
}
|
||||||
|
assertEqual(t, err.Error(), "Backend \"foo\" has no \"type\"")
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("no path given", func(t *testing.T) {
|
||||||
|
b := Backend{
|
||||||
|
name: "foo",
|
||||||
|
Type: "local",
|
||||||
|
Path: "",
|
||||||
|
}
|
||||||
|
err := b.validate()
|
||||||
|
if err == nil {
|
||||||
|
t.Error("expected to get error")
|
||||||
|
}
|
||||||
|
assertEqual(t, err.Error(), "Backend \"foo\" has no \"path\"")
|
||||||
|
})
|
||||||
|
}
|
@@ -16,6 +16,7 @@ import (
|
|||||||
"github.com/blang/semver/v4"
|
"github.com/blang/semver/v4"
|
||||||
"github.com/cupcakearmy/autorestic/internal"
|
"github.com/cupcakearmy/autorestic/internal"
|
||||||
"github.com/cupcakearmy/autorestic/internal/colors"
|
"github.com/cupcakearmy/autorestic/internal/colors"
|
||||||
|
"github.com/cupcakearmy/autorestic/internal/flags"
|
||||||
)
|
)
|
||||||
|
|
||||||
const INSTALL_PATH = "/usr/local/bin"
|
const INSTALL_PATH = "/usr/local/bin"
|
||||||
@@ -128,10 +129,9 @@ func InstallRestic() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func upgradeRestic() error {
|
func upgradeRestic() error {
|
||||||
out, err := internal.ExecuteCommand(internal.ExecuteOptions{
|
_, _, err := internal.ExecuteCommand(internal.ExecuteOptions{
|
||||||
Command: "restic",
|
Command: flags.RESTIC_BIN,
|
||||||
}, "self-update")
|
}, "self-update")
|
||||||
colors.Faint.Println(out)
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,6 +9,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/cupcakearmy/autorestic/internal/colors"
|
"github.com/cupcakearmy/autorestic/internal/colors"
|
||||||
|
"github.com/cupcakearmy/autorestic/internal/flags"
|
||||||
"github.com/cupcakearmy/autorestic/internal/lock"
|
"github.com/cupcakearmy/autorestic/internal/lock"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
"github.com/mitchellh/go-homedir"
|
"github.com/mitchellh/go-homedir"
|
||||||
@@ -16,21 +17,17 @@ import (
|
|||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
const VERSION = "1.5.1"
|
const VERSION = "1.7.11"
|
||||||
|
|
||||||
var CI bool = false
|
|
||||||
var VERBOSE bool = false
|
|
||||||
var CRON_LEAN bool = false
|
|
||||||
|
|
||||||
type OptionMap map[string][]interface{}
|
type OptionMap map[string][]interface{}
|
||||||
type Options map[string]OptionMap
|
type Options map[string]OptionMap
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Version string `yaml:"version"`
|
Version string `mapstructure:"version"`
|
||||||
Extras interface{} `yaml:"extras"`
|
Extras interface{} `mapstructure:"extras"`
|
||||||
Locations map[string]Location `yaml:"locations"`
|
Locations map[string]Location `mapstructure:"locations"`
|
||||||
Backends map[string]Backend `yaml:"backends"`
|
Backends map[string]Backend `mapstructure:"backends"`
|
||||||
Global Options `yaml:"global"`
|
Global Options `mapstructure:"global"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var once sync.Once
|
var once sync.Once
|
||||||
@@ -52,18 +49,28 @@ func GetConfig() *Config {
|
|||||||
if config == nil {
|
if config == nil {
|
||||||
once.Do(func() {
|
once.Do(func() {
|
||||||
if err := viper.ReadInConfig(); err == nil {
|
if err := viper.ReadInConfig(); err == nil {
|
||||||
if !CRON_LEAN {
|
|
||||||
absConfig, _ := filepath.Abs(viper.ConfigFileUsed())
|
absConfig, _ := filepath.Abs(viper.ConfigFileUsed())
|
||||||
|
if !flags.CRON_LEAN {
|
||||||
colors.Faint.Println("Using config: \t", absConfig)
|
colors.Faint.Println("Using config: \t", absConfig)
|
||||||
|
}
|
||||||
// Load env file
|
// Load env file
|
||||||
envFile := filepath.Join(filepath.Dir(absConfig), ".autorestic.env")
|
envFile := filepath.Join(filepath.Dir(absConfig), ".autorestic.env")
|
||||||
err = godotenv.Load(envFile)
|
err = godotenv.Load(envFile)
|
||||||
if err == nil {
|
if err == nil && !flags.CRON_LEAN {
|
||||||
colors.Faint.Println("Using env:\t", envFile)
|
colors.Faint.Println("Using env:\t", envFile)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return
|
text := err.Error()
|
||||||
|
if strings.Contains(text, "no such file or directory") {
|
||||||
|
cfgFileName := ".autorestic"
|
||||||
|
colors.Error.Println(
|
||||||
|
fmt.Sprintf(
|
||||||
|
"cannot find configuration file '%s.yml' or '%s.yaml'.",
|
||||||
|
cfgFileName, cfgFileName))
|
||||||
|
} else {
|
||||||
|
colors.Error.Println("could not load config file\n" + text)
|
||||||
|
}
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
var versionConfig interface{}
|
var versionConfig interface{}
|
||||||
@@ -178,7 +185,7 @@ func CheckConfig() error {
|
|||||||
return fmt.Errorf("config could not be loaded/found")
|
return fmt.Errorf("config could not be loaded/found")
|
||||||
}
|
}
|
||||||
if !CheckIfResticIsCallable() {
|
if !CheckIfResticIsCallable() {
|
||||||
return fmt.Errorf(`%s was not found. Install either with "autorestic install" or manually`, RESTIC_BIN)
|
return fmt.Errorf(`%s was not found. Install either with "autorestic install" or manually`, flags.RESTIC_BIN)
|
||||||
}
|
}
|
||||||
for name, backend := range c.Backends {
|
for name, backend := range c.Backends {
|
||||||
backend.name = name
|
backend.name = name
|
||||||
@@ -259,7 +266,7 @@ func (c *Config) SaveConfig() error {
|
|||||||
if err := CopyFile(file, file+".old"); err != nil {
|
if err := CopyFile(file, file+".old"); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
colors.Secondary.Println("Saved a backup copy of your file next the the original.")
|
colors.Secondary.Println("Saved a backup copy of your file next to the original.")
|
||||||
|
|
||||||
viper.Set("backends", c.Backends)
|
viper.Set("backends", c.Backends)
|
||||||
viper.Set("locations", c.Locations)
|
viper.Set("locations", c.Locations)
|
||||||
@@ -288,24 +295,30 @@ func appendOptionsToSlice(str *[]string, options OptionMap) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func getOptions(options Options, key string) []string {
|
func getOptions(options Options, keys []string) []string {
|
||||||
var selected []string
|
var selected []string
|
||||||
var keys = []string{"all"}
|
|
||||||
if key != "" {
|
|
||||||
keys = append(keys, key)
|
|
||||||
}
|
|
||||||
for _, key := range keys {
|
for _, key := range keys {
|
||||||
appendOptionsToSlice(&selected, options[key])
|
appendOptionsToSlice(&selected, options[key])
|
||||||
}
|
}
|
||||||
return selected
|
return selected
|
||||||
}
|
}
|
||||||
|
|
||||||
func combineOptions(key string, l Location, b Backend) []string {
|
func combineBackendOptions(key string, b Backend) []string {
|
||||||
|
// Priority: backend > global
|
||||||
|
var options []string
|
||||||
|
gFlags := getOptions(GetConfig().Global, []string{key})
|
||||||
|
bFlags := getOptions(b.Options, []string{"all", key})
|
||||||
|
options = append(options, gFlags...)
|
||||||
|
options = append(options, bFlags...)
|
||||||
|
return options
|
||||||
|
}
|
||||||
|
|
||||||
|
func combineAllOptions(key string, l Location, b Backend) []string {
|
||||||
// Priority: location > backend > global
|
// Priority: location > backend > global
|
||||||
var options []string
|
var options []string
|
||||||
gFlags := getOptions(GetConfig().Global, key)
|
gFlags := getOptions(GetConfig().Global, []string{key})
|
||||||
bFlags := getOptions(b.Options, key)
|
bFlags := getOptions(b.Options, []string{"all", key})
|
||||||
lFlags := getOptions(l.Options, key)
|
lFlags := getOptions(l.Options, []string{"all", key})
|
||||||
options = append(options, gFlags...)
|
options = append(options, gFlags...)
|
||||||
options = append(options, bFlags...)
|
options = append(options, bFlags...)
|
||||||
options = append(options, lFlags...)
|
options = append(options, lFlags...)
|
||||||
|
164
internal/config_test.go
Normal file
164
internal/config_test.go
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
package internal
|
||||||
|
|
||||||
|
import (
|
||||||
|
"reflect"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestOptionToString(t *testing.T) {
|
||||||
|
t.Run("no prefix", func(t *testing.T) {
|
||||||
|
opt := "test"
|
||||||
|
result := optionToString(opt)
|
||||||
|
assertEqual(t, result, "--test")
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("single prefix", func(t *testing.T) {
|
||||||
|
opt := "-test"
|
||||||
|
result := optionToString(opt)
|
||||||
|
assertEqual(t, result, "-test")
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("double prefix", func(t *testing.T) {
|
||||||
|
opt := "--test"
|
||||||
|
result := optionToString(opt)
|
||||||
|
assertEqual(t, result, "--test")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestAppendOneOptionToSlice(t *testing.T) {
|
||||||
|
t.Run("string flag", func(t *testing.T) {
|
||||||
|
result := []string{}
|
||||||
|
optionMap := OptionMap{"string-flag": []interface{}{"/root"}}
|
||||||
|
|
||||||
|
appendOptionsToSlice(&result, optionMap)
|
||||||
|
expected := []string{
|
||||||
|
"--string-flag", "/root",
|
||||||
|
}
|
||||||
|
assertSliceEqual(t, result, expected)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("bool flag", func(t *testing.T) {
|
||||||
|
result := []string{}
|
||||||
|
optionMap := OptionMap{"boolean-flag": []interface{}{true}}
|
||||||
|
|
||||||
|
appendOptionsToSlice(&result, optionMap)
|
||||||
|
expected := []string{
|
||||||
|
"--boolean-flag",
|
||||||
|
}
|
||||||
|
assertSliceEqual(t, result, expected)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("int flag", func(t *testing.T) {
|
||||||
|
result := []string{}
|
||||||
|
optionMap := OptionMap{"int-flag": []interface{}{123}}
|
||||||
|
|
||||||
|
appendOptionsToSlice(&result, optionMap)
|
||||||
|
expected := []string{
|
||||||
|
"--int-flag", "123",
|
||||||
|
}
|
||||||
|
assertSliceEqual(t, result, expected)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestAppendMultipleOptionsToSlice(t *testing.T) {
|
||||||
|
result := []string{}
|
||||||
|
optionMap := OptionMap{
|
||||||
|
"string-flag": []interface{}{"/root"},
|
||||||
|
"int-flag": []interface{}{123},
|
||||||
|
}
|
||||||
|
|
||||||
|
appendOptionsToSlice(&result, optionMap)
|
||||||
|
expected := []string{
|
||||||
|
"--string-flag", "/root",
|
||||||
|
"--int-flag", "123",
|
||||||
|
}
|
||||||
|
if len(result) != len(expected) {
|
||||||
|
t.Errorf("got length %d, want length %d", len(result), len(expected))
|
||||||
|
}
|
||||||
|
|
||||||
|
// checks that expected option comes after flag, regardless of key order in map
|
||||||
|
for i, v := range expected {
|
||||||
|
v = strings.TrimPrefix(v, "--")
|
||||||
|
|
||||||
|
if value, ok := optionMap[v]; ok {
|
||||||
|
if val, ok := value[0].(int); ok {
|
||||||
|
if expected[i+1] != strconv.Itoa(val) {
|
||||||
|
t.Errorf("Flags and options order are mismatched. got %v, want %v", result, expected)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestAppendOptionWithMultipleValuesToSlice(t *testing.T) {
|
||||||
|
result := []string{}
|
||||||
|
optionMap := OptionMap{
|
||||||
|
"string-flag": []interface{}{"/root", "/bin"},
|
||||||
|
}
|
||||||
|
|
||||||
|
appendOptionsToSlice(&result, optionMap)
|
||||||
|
expected := []string{
|
||||||
|
"--string-flag", "/root",
|
||||||
|
"--string-flag", "/bin",
|
||||||
|
}
|
||||||
|
assertSliceEqual(t, result, expected)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetOptionsOneKey(t *testing.T) {
|
||||||
|
optionMap := OptionMap{
|
||||||
|
"string-flag": []interface{}{"/root"},
|
||||||
|
}
|
||||||
|
options := Options{"backend": optionMap}
|
||||||
|
keys := []string{"backend"}
|
||||||
|
|
||||||
|
result := getOptions(options, keys)
|
||||||
|
expected := []string{
|
||||||
|
"--string-flag", "/root",
|
||||||
|
}
|
||||||
|
assertSliceEqual(t, result, expected)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetOptionsMultipleKeys(t *testing.T) {
|
||||||
|
firstOptionMap := OptionMap{
|
||||||
|
"string-flag": []interface{}{"/root"},
|
||||||
|
}
|
||||||
|
secondOptionMap := OptionMap{
|
||||||
|
"boolean-flag": []interface{}{true},
|
||||||
|
"int-flag": []interface{}{123},
|
||||||
|
}
|
||||||
|
options := Options{
|
||||||
|
"all": firstOptionMap,
|
||||||
|
"forget": secondOptionMap,
|
||||||
|
}
|
||||||
|
keys := []string{"all", "forget"}
|
||||||
|
|
||||||
|
result := getOptions(options, keys)
|
||||||
|
expected := []string{
|
||||||
|
"--string-flag", "/root",
|
||||||
|
"--boolean-flag",
|
||||||
|
"--int-flag", "123",
|
||||||
|
}
|
||||||
|
reflect.DeepEqual(result, expected)
|
||||||
|
}
|
||||||
|
|
||||||
|
func assertEqual[T comparable](t testing.TB, result, expected T) {
|
||||||
|
t.Helper()
|
||||||
|
|
||||||
|
if result != expected {
|
||||||
|
t.Errorf("got %v, want %v", result, expected)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func assertSliceEqual(t testing.TB, result, expected []string) {
|
||||||
|
t.Helper()
|
||||||
|
|
||||||
|
if len(result) != len(expected) {
|
||||||
|
t.Errorf("got length %d, want length %d", len(result), len(expected))
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := range result {
|
||||||
|
assertEqual(t, result[i], expected[i])
|
||||||
|
}
|
||||||
|
}
|
9
internal/flags/flags.go
Normal file
9
internal/flags/flags.go
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
package flags
|
||||||
|
|
||||||
|
var (
|
||||||
|
CI bool = false
|
||||||
|
VERBOSE bool = false
|
||||||
|
CRON_LEAN bool = false
|
||||||
|
RESTIC_BIN string
|
||||||
|
DOCKER_IMAGE string
|
||||||
|
)
|
@@ -9,6 +9,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cupcakearmy/autorestic/internal/colors"
|
"github.com/cupcakearmy/autorestic/internal/colors"
|
||||||
|
"github.com/cupcakearmy/autorestic/internal/flags"
|
||||||
"github.com/cupcakearmy/autorestic/internal/lock"
|
"github.com/cupcakearmy/autorestic/internal/lock"
|
||||||
"github.com/cupcakearmy/autorestic/internal/metadata"
|
"github.com/cupcakearmy/autorestic/internal/metadata"
|
||||||
"github.com/robfig/cron"
|
"github.com/robfig/cron"
|
||||||
@@ -23,22 +24,34 @@ const (
|
|||||||
|
|
||||||
type HookArray = []string
|
type HookArray = []string
|
||||||
|
|
||||||
|
type LocationForgetOption string
|
||||||
|
|
||||||
|
const (
|
||||||
|
LocationForgetYes LocationForgetOption = "yes"
|
||||||
|
LocationForgetNo LocationForgetOption = "no"
|
||||||
|
LocationForgetPrune LocationForgetOption = "prune"
|
||||||
|
)
|
||||||
|
|
||||||
type Hooks struct {
|
type Hooks struct {
|
||||||
Dir string `yaml:"dir"`
|
Dir string `mapstructure:"dir"`
|
||||||
Before HookArray `yaml:"before,omitempty"`
|
Before HookArray `mapstructure:"before,omitempty"`
|
||||||
After HookArray `yaml:"after,omitempty"`
|
After HookArray `mapstructure:"after,omitempty"`
|
||||||
Success HookArray `yaml:"success,omitempty"`
|
Success HookArray `mapstructure:"success,omitempty"`
|
||||||
Failure HookArray `yaml:"failure,omitempty"`
|
Failure HookArray `mapstructure:"failure,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LocationCopy = map[string][]string
|
||||||
|
|
||||||
type Location struct {
|
type Location struct {
|
||||||
name string `yaml:",omitempty"`
|
name string `mapstructure:",omitempty"`
|
||||||
From []string `yaml:"from,omitempty"`
|
From []string `mapstructure:"from,omitempty"`
|
||||||
Type string `yaml:"type,omitempty"`
|
Type string `mapstructure:"type,omitempty"`
|
||||||
To []string `yaml:"to,omitempty"`
|
To []string `mapstructure:"to,omitempty"`
|
||||||
Hooks Hooks `yaml:"hooks,omitempty"`
|
Hooks Hooks `mapstructure:"hooks,omitempty"`
|
||||||
Cron string `yaml:"cron,omitempty"`
|
Cron string `mapstructure:"cron,omitempty"`
|
||||||
Options Options `yaml:"options,omitempty"`
|
Options Options `mapstructure:"options,omitempty"`
|
||||||
|
ForgetOption LocationForgetOption `mapstructure:"forget,omitempty"`
|
||||||
|
CopyOption LocationCopy `mapstructure:"copy,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetLocation(name string) (Location, bool) {
|
func GetLocation(name string) (Location, bool) {
|
||||||
@@ -61,12 +74,8 @@ func (l Location) validate() error {
|
|||||||
if from, err := GetPathRelativeToConfig(path); err != nil {
|
if from, err := GetPathRelativeToConfig(path); err != nil {
|
||||||
return err
|
return err
|
||||||
} else {
|
} else {
|
||||||
if stat, err := os.Stat(from); err != nil {
|
if _, err := os.Stat(from); err != nil {
|
||||||
return err
|
return err
|
||||||
} else {
|
|
||||||
if !stat.IsDir() {
|
|
||||||
return fmt.Errorf("\"%s\" is not valid directory for location \"%s\"", from, l.name)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,13 +86,38 @@ func (l Location) validate() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(l.To) == 0 {
|
if len(l.To) == 0 {
|
||||||
return fmt.Errorf(`Location "%s" has no "to" targets`, l.name)
|
return fmt.Errorf(`location "%s" has no "to" targets`, l.name)
|
||||||
}
|
}
|
||||||
// Check if backends are all valid
|
// Check if backends are all valid
|
||||||
for _, to := range l.To {
|
for _, to := range l.To {
|
||||||
_, ok := GetBackend(to)
|
_, ok := GetBackend(to)
|
||||||
if !ok {
|
if !ok {
|
||||||
return fmt.Errorf("invalid backend `%s`", to)
|
return fmt.Errorf(`location "%s" has an invalid backend "%s"`, l.name, to)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check copy option
|
||||||
|
for copyFrom, copyTo := range l.CopyOption {
|
||||||
|
if _, ok := GetBackend(copyFrom); !ok {
|
||||||
|
return fmt.Errorf(`location "%s" has an invalid backend "%s" in copy option`, l.name, copyFrom)
|
||||||
|
}
|
||||||
|
if !ArrayContains(l.To, copyFrom) {
|
||||||
|
return fmt.Errorf(`location "%s" has an invalid copy from "%s"`, l.name, copyFrom)
|
||||||
|
}
|
||||||
|
for _, copyToTarget := range copyTo {
|
||||||
|
if _, ok := GetBackend(copyToTarget); !ok {
|
||||||
|
return fmt.Errorf(`location "%s" has an invalid backend "%s" in copy option`, l.name, copyToTarget)
|
||||||
|
}
|
||||||
|
if ArrayContains(l.To, copyToTarget) {
|
||||||
|
return fmt.Errorf(`location "%s" cannot copy to "%s" as it's already a target`, l.name, copyToTarget)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if forget type is correct
|
||||||
|
if l.ForgetOption != "" {
|
||||||
|
if l.ForgetOption != LocationForgetYes && l.ForgetOption != LocationForgetNo && l.ForgetOption != LocationForgetPrune {
|
||||||
|
return fmt.Errorf("invalid value for forget option: %s", l.ForgetOption)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -103,14 +137,11 @@ func (l Location) ExecuteHooks(commands []string, options ExecuteOptions) error
|
|||||||
colors.Secondary.Println("\nRunning hooks")
|
colors.Secondary.Println("\nRunning hooks")
|
||||||
for _, command := range commands {
|
for _, command := range commands {
|
||||||
colors.Body.Println("> " + command)
|
colors.Body.Println("> " + command)
|
||||||
out, err := ExecuteCommand(options, "-c", command)
|
_, out, err := ExecuteCommand(options, "-c", command)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
colors.Error.Println(out)
|
colors.Error.Println(out)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if VERBOSE {
|
|
||||||
colors.Faint.Println(out)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
colors.Body.Println("")
|
colors.Body.Println("")
|
||||||
return nil
|
return nil
|
||||||
@@ -185,7 +216,7 @@ func (l Location) Backup(cron bool, specificBackend string) []error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd := []string{"backup"}
|
cmd := []string{"backup"}
|
||||||
cmd = append(cmd, combineOptions("backup", l, backend)...)
|
cmd = append(cmd, combineAllOptions("backup", l, backend)...)
|
||||||
if cron {
|
if cron {
|
||||||
cmd = append(cmd, "--tag", buildTag("cron"))
|
cmd = append(cmd, "--tag", buildTag("cron"))
|
||||||
}
|
}
|
||||||
@@ -194,6 +225,7 @@ func (l Location) Backup(cron bool, specificBackend string) []error {
|
|||||||
Envs: env,
|
Envs: env,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var code int = 0
|
||||||
var out string
|
var out string
|
||||||
switch t {
|
switch t {
|
||||||
case TypeLocal:
|
case TypeLocal:
|
||||||
@@ -205,7 +237,7 @@ func (l Location) Backup(cron bool, specificBackend string) []error {
|
|||||||
}
|
}
|
||||||
cmd = append(cmd, path)
|
cmd = append(cmd, path)
|
||||||
}
|
}
|
||||||
out, err = ExecuteResticCommand(backupOptions, cmd...)
|
code, out, err = ExecuteResticCommand(backupOptions, cmd...)
|
||||||
case TypeVolume:
|
case TypeVolume:
|
||||||
ok := CheckIfVolumeExists(l.From[0])
|
ok := CheckIfVolumeExists(l.From[0])
|
||||||
if !ok {
|
if !ok {
|
||||||
@@ -213,22 +245,47 @@ func (l Location) Backup(cron bool, specificBackend string) []error {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
cmd = append(cmd, "/data")
|
cmd = append(cmd, "/data")
|
||||||
out, err = backend.ExecDocker(l, cmd)
|
code, out, err = backend.ExecDocker(l, cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Extract metadata
|
||||||
|
md := metadata.ExtractMetadataFromBackupLog(out)
|
||||||
|
md.ExitCode = fmt.Sprint(code)
|
||||||
|
mdEnv := metadata.MakeEnvFromMetadata(&md)
|
||||||
|
for k, v := range mdEnv {
|
||||||
|
options.Envs[k+"_"+fmt.Sprint(i)] = v
|
||||||
|
options.Envs[k+"_"+strings.ToUpper(backend.name)] = v
|
||||||
|
}
|
||||||
|
|
||||||
|
// If error save it and continue
|
||||||
if err != nil {
|
if err != nil {
|
||||||
colors.Error.Println(out)
|
colors.Error.Println(out)
|
||||||
errors = append(errors, fmt.Errorf("%s@%s:\n%s%s", l.name, backend.name, out, err))
|
errors = append(errors, fmt.Errorf("%s@%s:\n%s%s", l.name, backend.name, out, err))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
md := metadata.ExtractMetadataFromBackupLog(out)
|
// Copy
|
||||||
mdEnv := metadata.MakeEnvFromMetadata(&md)
|
if md.SnapshotID != "" {
|
||||||
for k, v := range mdEnv {
|
for copyFrom, copyTo := range l.CopyOption {
|
||||||
options.Envs[k+"_"+fmt.Sprint(i)] = v
|
b1, _ := GetBackend(copyFrom)
|
||||||
options.Envs[k+"_"+strings.ToUpper(backend.name)] = v
|
for _, copyToTarget := range copyTo {
|
||||||
|
b2, _ := GetBackend(copyToTarget)
|
||||||
|
colors.Secondary.Println("Copying " + copyFrom + " → " + copyToTarget)
|
||||||
|
env, _ := b1.getEnv()
|
||||||
|
env2, _ := b2.getEnv()
|
||||||
|
// Add the second repo to the env with a "2" suffix
|
||||||
|
for k, v := range env2 {
|
||||||
|
env[k+"2"] = v
|
||||||
|
}
|
||||||
|
_, _, err := ExecuteResticCommand(ExecuteOptions{
|
||||||
|
Envs: env,
|
||||||
|
}, "copy", md.SnapshotID)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
errors = append(errors, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if VERBOSE {
|
|
||||||
colors.Faint.Println(out)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,15 +296,24 @@ func (l Location) Backup(cron bool, specificBackend string) []error {
|
|||||||
|
|
||||||
after:
|
after:
|
||||||
var commands []string
|
var commands []string
|
||||||
if len(errors) > 0 {
|
var isSuccess = len(errors) == 0
|
||||||
commands = l.Hooks.Failure
|
if isSuccess {
|
||||||
} else {
|
|
||||||
commands = l.Hooks.Success
|
commands = l.Hooks.Success
|
||||||
|
} else {
|
||||||
|
commands = l.Hooks.Failure
|
||||||
}
|
}
|
||||||
if err := l.ExecuteHooks(commands, options); err != nil {
|
if err := l.ExecuteHooks(commands, options); err != nil {
|
||||||
errors = append(errors, err)
|
errors = append(errors, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Forget and optionally prune
|
||||||
|
if isSuccess && l.ForgetOption != "" && l.ForgetOption != LocationForgetNo {
|
||||||
|
err := l.Forget(l.ForgetOption == LocationForgetPrune, false)
|
||||||
|
if err != nil {
|
||||||
|
errors = append(errors, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if len(errors) == 0 {
|
if len(errors) == 0 {
|
||||||
colors.Success.Println("Done")
|
colors.Success.Println("Done")
|
||||||
}
|
}
|
||||||
@@ -257,7 +323,12 @@ after:
|
|||||||
func (l Location) Forget(prune bool, dry bool) error {
|
func (l Location) Forget(prune bool, dry bool) error {
|
||||||
colors.PrimaryPrint("Forgetting for location \"%s\"", l.name)
|
colors.PrimaryPrint("Forgetting for location \"%s\"", l.name)
|
||||||
|
|
||||||
for _, to := range l.To {
|
backendsToForget := l.To
|
||||||
|
for _, copyBackends := range l.CopyOption {
|
||||||
|
backendsToForget = append(backendsToForget, copyBackends...)
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, to := range backendsToForget {
|
||||||
backend, _ := GetBackend(to)
|
backend, _ := GetBackend(to)
|
||||||
colors.Secondary.Printf("For backend \"%s\"\n", backend.name)
|
colors.Secondary.Printf("For backend \"%s\"\n", backend.name)
|
||||||
env, err := backend.getEnv()
|
env, err := backend.getEnv()
|
||||||
@@ -274,11 +345,8 @@ func (l Location) Forget(prune bool, dry bool) error {
|
|||||||
if dry {
|
if dry {
|
||||||
cmd = append(cmd, "--dry-run")
|
cmd = append(cmd, "--dry-run")
|
||||||
}
|
}
|
||||||
cmd = append(cmd, combineOptions("forget", l, backend)...)
|
cmd = append(cmd, combineAllOptions("forget", l, backend)...)
|
||||||
out, err := ExecuteResticCommand(options, cmd...)
|
_, _, err = ExecuteResticCommand(options, cmd...)
|
||||||
if VERBOSE {
|
|
||||||
colors.Faint.Println(out)
|
|
||||||
}
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -296,18 +364,19 @@ func (l Location) hasBackend(backend string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l Location) Restore(to, from string, force bool, snapshot string) error {
|
func buildRestoreCommand(l Location, to string, snapshot string, options []string) []string {
|
||||||
|
base := []string{"restore", "--target", to, "--tag", l.getLocationTags(), snapshot}
|
||||||
|
base = append(base, options...)
|
||||||
|
return base
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l Location) Restore(to, from string, force bool, snapshot string, options []string) error {
|
||||||
if from == "" {
|
if from == "" {
|
||||||
from = l.To[0]
|
from = l.To[0]
|
||||||
} else if !l.hasBackend(from) {
|
} else if !l.hasBackend(from) {
|
||||||
return fmt.Errorf("invalid backend: \"%s\"", from)
|
return fmt.Errorf("invalid backend: \"%s\"", from)
|
||||||
}
|
}
|
||||||
|
|
||||||
to, err := filepath.Abs(to)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if snapshot == "" {
|
if snapshot == "" {
|
||||||
snapshot = "latest"
|
snapshot = "latest"
|
||||||
}
|
}
|
||||||
@@ -322,6 +391,10 @@ func (l Location) Restore(to, from string, force bool, snapshot string) error {
|
|||||||
}
|
}
|
||||||
switch t {
|
switch t {
|
||||||
case TypeLocal:
|
case TypeLocal:
|
||||||
|
to, err = filepath.Abs(to)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
// Check if target is empty
|
// Check if target is empty
|
||||||
if !force {
|
if !force {
|
||||||
notEmptyError := fmt.Errorf("target %s is not empty", to)
|
notEmptyError := fmt.Errorf("target %s is not empty", to)
|
||||||
@@ -340,9 +413,9 @@ func (l Location) Restore(to, from string, force bool, snapshot string) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = backend.Exec([]string{"restore", "--target", to, "--tag", l.getLocationTags(), snapshot})
|
err = backend.Exec(buildRestoreCommand(l, to, snapshot, options))
|
||||||
case TypeVolume:
|
case TypeVolume:
|
||||||
_, err = backend.ExecDocker(l, []string{"restore", "--target", "/", "--tag", l.getLocationTags(), snapshot})
|
_, _, err = backend.ExecDocker(l, buildRestoreCommand(l, "/", snapshot, options))
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -367,7 +440,7 @@ func (l Location) RunCron() error {
|
|||||||
lock.SetCron(l.name, now.Unix())
|
lock.SetCron(l.name, now.Unix())
|
||||||
l.Backup(true, "")
|
l.Backup(true, "")
|
||||||
} else {
|
} else {
|
||||||
if !CRON_LEAN {
|
if !flags.CRON_LEAN {
|
||||||
colors.Body.Printf("Skipping \"%s\", not due yet.\n", l.name)
|
colors.Body.Printf("Skipping \"%s\", not due yet.\n", l.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
93
internal/location_test.go
Normal file
93
internal/location_test.go
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
package internal
|
||||||
|
|
||||||
|
import "testing"
|
||||||
|
|
||||||
|
func TestGetType(t *testing.T) {
|
||||||
|
|
||||||
|
t.Run("TypeLocal", func(t *testing.T) {
|
||||||
|
l := Location{
|
||||||
|
Type: "local",
|
||||||
|
}
|
||||||
|
result, err := l.getType()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error: %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result, TypeLocal)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("TypeVolume", func(t *testing.T) {
|
||||||
|
l := Location{
|
||||||
|
Type: "volume",
|
||||||
|
}
|
||||||
|
result, err := l.getType()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error: %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result, TypeVolume)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Empty type", func(t *testing.T) {
|
||||||
|
l := Location{
|
||||||
|
Type: "",
|
||||||
|
}
|
||||||
|
result, err := l.getType()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error: %v", err)
|
||||||
|
}
|
||||||
|
assertEqual(t, result, TypeLocal)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Invalid type", func(t *testing.T) {
|
||||||
|
l := Location{
|
||||||
|
Type: "foo",
|
||||||
|
}
|
||||||
|
_, err := l.getType()
|
||||||
|
if err == nil {
|
||||||
|
t.Error("expected error")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBuildTag(t *testing.T) {
|
||||||
|
result := buildTag("foo", "bar")
|
||||||
|
expected := "ar:foo:bar"
|
||||||
|
assertEqual(t, result, expected)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetLocationTags(t *testing.T) {
|
||||||
|
l := Location{
|
||||||
|
name: "foo",
|
||||||
|
}
|
||||||
|
result := l.getLocationTags()
|
||||||
|
expected := "ar:location:foo"
|
||||||
|
assertEqual(t, result, expected)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestHasBackend(t *testing.T) {
|
||||||
|
t.Run("backend present", func(t *testing.T) {
|
||||||
|
l := Location{
|
||||||
|
name: "foo",
|
||||||
|
To: []string{"foo", "bar"},
|
||||||
|
}
|
||||||
|
result := l.hasBackend("foo")
|
||||||
|
assertEqual(t, result, true)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("backend absent", func(t *testing.T) {
|
||||||
|
l := Location{
|
||||||
|
name: "foo",
|
||||||
|
To: []string{"bar", "baz"},
|
||||||
|
}
|
||||||
|
result := l.hasBackend("foo")
|
||||||
|
assertEqual(t, result, false)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBuildRestoreCommand(t *testing.T) {
|
||||||
|
l := Location{
|
||||||
|
name: "foo",
|
||||||
|
}
|
||||||
|
result := buildRestoreCommand(l, "to", "snapshot", []string{"options"})
|
||||||
|
expected := []string{"restore", "--target", "to", "--tag", "ar:location:foo", "snapshot", "options"}
|
||||||
|
assertSliceEqual(t, result, expected)
|
||||||
|
}
|
@@ -6,6 +6,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/cupcakearmy/autorestic/internal/colors"
|
"github.com/cupcakearmy/autorestic/internal/colors"
|
||||||
|
"github.com/cupcakearmy/autorestic/internal/flags"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -13,6 +14,10 @@ var lock *viper.Viper
|
|||||||
var file string
|
var file string
|
||||||
var once sync.Once
|
var once sync.Once
|
||||||
|
|
||||||
|
const (
|
||||||
|
RUNNING = "running"
|
||||||
|
)
|
||||||
|
|
||||||
func getLock() *viper.Viper {
|
func getLock() *viper.Viper {
|
||||||
if lock == nil {
|
if lock == nil {
|
||||||
|
|
||||||
@@ -25,7 +30,9 @@ func getLock() *viper.Viper {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
file = path.Join(path.Dir(p), ".autorestic.lock.yml")
|
file = path.Join(path.Dir(p), ".autorestic.lock.yml")
|
||||||
|
if !flags.CRON_LEAN {
|
||||||
colors.Faint.Println("Using lock:\t", file)
|
colors.Faint.Println("Using lock:\t", file)
|
||||||
|
}
|
||||||
lock.SetConfigFile(file)
|
lock.SetConfigFile(file)
|
||||||
lock.SetConfigType("yml")
|
lock.SetConfigType("yml")
|
||||||
lock.ReadInConfig()
|
lock.ReadInConfig()
|
||||||
@@ -34,36 +41,38 @@ func getLock() *viper.Viper {
|
|||||||
return lock
|
return lock
|
||||||
}
|
}
|
||||||
|
|
||||||
func setLock(locked bool) error {
|
func setLockValue(key string, value interface{}) (*viper.Viper, error) {
|
||||||
lock := getLock()
|
lock := getLock()
|
||||||
if locked {
|
|
||||||
running := lock.GetBool("running")
|
if key == RUNNING {
|
||||||
if running {
|
value := value.(bool)
|
||||||
|
if value && lock.GetBool(key) {
|
||||||
colors.Error.Println("an instance is already running. exiting")
|
colors.Error.Println("an instance is already running. exiting")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lock.Set("running", locked)
|
|
||||||
|
lock.Set(key, value)
|
||||||
if err := lock.WriteConfigAs(file); err != nil {
|
if err := lock.WriteConfigAs(file); err != nil {
|
||||||
return err
|
return nil, err
|
||||||
}
|
}
|
||||||
return nil
|
return lock, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetCron(location string) int64 {
|
func GetCron(location string) int64 {
|
||||||
lock := getLock()
|
return getLock().GetInt64("cron." + location)
|
||||||
return lock.GetInt64("cron." + location)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetCron(location string, value int64) {
|
func SetCron(location string, value int64) {
|
||||||
lock.Set("cron."+location, value)
|
setLockValue("cron."+location, value)
|
||||||
lock.WriteConfigAs(file)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func Lock() error {
|
func Lock() error {
|
||||||
return setLock(true)
|
_, err := setLockValue(RUNNING, true)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func Unlock() error {
|
func Unlock() error {
|
||||||
return setLock(false)
|
_, err := setLockValue(RUNNING, false)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
114
internal/lock/lock_test.go
Normal file
114
internal/lock/lock_test.go
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
package lock
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
"strconv"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/spf13/viper"
|
||||||
|
)
|
||||||
|
|
||||||
|
var testDirectory = "autorestic_test_tmp"
|
||||||
|
|
||||||
|
// All tests must share the same lock file as it is only initialized once
|
||||||
|
func setup(t *testing.T) {
|
||||||
|
d, err := os.MkdirTemp("", testDirectory)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("error creating temp dir: %v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// set config file location
|
||||||
|
viper.SetConfigFile(d + "/.autorestic.yml")
|
||||||
|
|
||||||
|
t.Cleanup(func() {
|
||||||
|
os.RemoveAll(d)
|
||||||
|
viper.Reset()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestLock(t *testing.T) {
|
||||||
|
setup(t)
|
||||||
|
|
||||||
|
t.Run("getLock", func(t *testing.T) {
|
||||||
|
result := getLock().GetBool(RUNNING)
|
||||||
|
|
||||||
|
if result {
|
||||||
|
t.Errorf("got %v, want %v", result, false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("lock", func(t *testing.T) {
|
||||||
|
lock, err := setLockValue(RUNNING, true)
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
result := lock.GetBool(RUNNING)
|
||||||
|
if !result {
|
||||||
|
t.Errorf("got %v, want %v", result, true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("unlock", func(t *testing.T) {
|
||||||
|
lock, err := setLockValue(RUNNING, false)
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
result := lock.GetBool(RUNNING)
|
||||||
|
if result {
|
||||||
|
t.Errorf("got %v, want %v", result, false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// locking a locked instance exits the instance
|
||||||
|
// this trick to capture os.Exit(1) is discussed here:
|
||||||
|
// https://talks.golang.org/2014/testing.slide#23
|
||||||
|
t.Run("lock twice", func(t *testing.T) {
|
||||||
|
if os.Getenv("CRASH") == "1" {
|
||||||
|
err := Lock()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error: %v", err)
|
||||||
|
}
|
||||||
|
// should fail
|
||||||
|
Lock()
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd := exec.Command(os.Args[0], "-test.run=TestLock/lock_twice")
|
||||||
|
cmd.Env = append(os.Environ(), "CRASH=1")
|
||||||
|
err := cmd.Run()
|
||||||
|
|
||||||
|
err, ok := err.(*exec.ExitError)
|
||||||
|
if !ok {
|
||||||
|
t.Error("unexpected error")
|
||||||
|
}
|
||||||
|
expected := "exit status 1"
|
||||||
|
if err.Error() != expected {
|
||||||
|
t.Errorf("got %q, want %q", err.Error(), expected)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("set cron", func(t *testing.T) {
|
||||||
|
expected := int64(5)
|
||||||
|
SetCron("foo", expected)
|
||||||
|
|
||||||
|
result, err := strconv.ParseInt(getLock().GetString("cron.foo"), 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("unexpected error: %v", err)
|
||||||
|
}
|
||||||
|
if result != expected {
|
||||||
|
t.Errorf("got %d, want %d", result, expected)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("get cron", func(t *testing.T) {
|
||||||
|
expected := int64(5)
|
||||||
|
result := GetCron("foo")
|
||||||
|
|
||||||
|
if result != expected {
|
||||||
|
t.Errorf("got %d, want %d", result, expected)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
@@ -14,9 +14,9 @@ func (e addedExtractor) Matches(line string) bool {
|
|||||||
}
|
}
|
||||||
func (e addedExtractor) Extract(metadata *BackupLogMetadata, line string) {
|
func (e addedExtractor) Extract(metadata *BackupLogMetadata, line string) {
|
||||||
// Sample line: "Added to the repo: 0 B"
|
// Sample line: "Added to the repo: 0 B"
|
||||||
metadata.AddedSize = strings.TrimSpace(e.re.ReplaceAllString(line, ""))
|
metadata.AddedSize = strings.TrimSpace(e.re.ReplaceAllString(line, "$2"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewAddedExtractor() MetadatExtractor {
|
func NewAddedExtractor() MetadatExtractor {
|
||||||
return addedExtractor{regexp.MustCompile(`(?i)^Added to the repo:`)}
|
return addedExtractor{regexp.MustCompile(`(?i)^Added to the repo(sitory)?: ([\d\.]+ \w+)( \([\d\.]+[\w\s]+\))?`)}
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,7 @@ type BackupLogMetadata struct {
|
|||||||
AddedSize string
|
AddedSize string
|
||||||
Processed BackupLogMetadataProcessed
|
Processed BackupLogMetadataProcessed
|
||||||
SnapshotID string
|
SnapshotID string
|
||||||
|
ExitCode string
|
||||||
}
|
}
|
||||||
|
|
||||||
type MetadatExtractor interface {
|
type MetadatExtractor interface {
|
||||||
@@ -67,6 +68,7 @@ func MakeEnvFromMetadata(metadata *BackupLogMetadata) map[string]string {
|
|||||||
env[prefix+"PROCESSED_FILES"] = metadata.Processed.Files
|
env[prefix+"PROCESSED_FILES"] = metadata.Processed.Files
|
||||||
env[prefix+"PROCESSED_SIZE"] = metadata.Processed.Size
|
env[prefix+"PROCESSED_SIZE"] = metadata.Processed.Size
|
||||||
env[prefix+"PROCESSED_DURATION"] = metadata.Processed.Duration
|
env[prefix+"PROCESSED_DURATION"] = metadata.Processed.Duration
|
||||||
|
env[prefix+"EXIT_CODE"] = metadata.ExitCode
|
||||||
|
|
||||||
return env
|
return env
|
||||||
}
|
}
|
||||||
|
@@ -8,26 +8,38 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
"github.com/cupcakearmy/autorestic/internal/colors"
|
"github.com/cupcakearmy/autorestic/internal/colors"
|
||||||
|
"github.com/cupcakearmy/autorestic/internal/flags"
|
||||||
|
"github.com/fatih/color"
|
||||||
)
|
)
|
||||||
|
|
||||||
var RESTIC_BIN string
|
|
||||||
|
|
||||||
func CheckIfCommandIsCallable(cmd string) bool {
|
func CheckIfCommandIsCallable(cmd string) bool {
|
||||||
_, err := exec.LookPath(cmd)
|
_, err := exec.LookPath(cmd)
|
||||||
return err == nil
|
return err == nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func CheckIfResticIsCallable() bool {
|
func CheckIfResticIsCallable() bool {
|
||||||
return CheckIfCommandIsCallable(RESTIC_BIN)
|
return CheckIfCommandIsCallable(flags.RESTIC_BIN)
|
||||||
}
|
}
|
||||||
|
|
||||||
type ExecuteOptions struct {
|
type ExecuteOptions struct {
|
||||||
Command string
|
Command string
|
||||||
Envs map[string]string
|
Envs map[string]string
|
||||||
Dir string
|
Dir string
|
||||||
|
Silent bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExecuteCommand(options ExecuteOptions, args ...string) (string, error) {
|
type ColoredWriter struct {
|
||||||
|
target io.Writer
|
||||||
|
color *color.Color
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w ColoredWriter) Write(p []byte) (n int, err error) {
|
||||||
|
colored := []byte(w.color.Sprint(string(p)))
|
||||||
|
w.target.Write(colored)
|
||||||
|
return len(p), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func ExecuteCommand(options ExecuteOptions, args ...string) (int, string, error) {
|
||||||
cmd := exec.Command(options.Command, args...)
|
cmd := exec.Command(options.Command, args...)
|
||||||
env := os.Environ()
|
env := os.Environ()
|
||||||
for k, v := range options.Envs {
|
for k, v := range options.Envs {
|
||||||
@@ -36,37 +48,50 @@ func ExecuteCommand(options ExecuteOptions, args ...string) (string, error) {
|
|||||||
cmd.Env = env
|
cmd.Env = env
|
||||||
cmd.Dir = options.Dir
|
cmd.Dir = options.Dir
|
||||||
|
|
||||||
if VERBOSE {
|
if flags.VERBOSE {
|
||||||
colors.Faint.Printf("> Executing: %s\n", cmd)
|
colors.Faint.Printf("> Executing: %s\n", cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
var out bytes.Buffer
|
var out bytes.Buffer
|
||||||
var error bytes.Buffer
|
var error bytes.Buffer
|
||||||
|
if flags.VERBOSE && !options.Silent {
|
||||||
|
var colored ColoredWriter = ColoredWriter{
|
||||||
|
target: os.Stdout,
|
||||||
|
color: colors.Faint,
|
||||||
|
}
|
||||||
|
mw := io.MultiWriter(colored, &out)
|
||||||
|
cmd.Stdout = mw
|
||||||
|
} else {
|
||||||
cmd.Stdout = &out
|
cmd.Stdout = &out
|
||||||
|
}
|
||||||
cmd.Stderr = &error
|
cmd.Stderr = &error
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return error.String(), err
|
code := -1
|
||||||
|
if exitError, ok := err.(*exec.ExitError); ok {
|
||||||
|
code = exitError.ExitCode()
|
||||||
}
|
}
|
||||||
return out.String(), nil
|
return code, error.String(), err
|
||||||
|
}
|
||||||
|
return 0, out.String(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExecuteResticCommand(options ExecuteOptions, args ...string) (string, error) {
|
func ExecuteResticCommand(options ExecuteOptions, args ...string) (int, string, error) {
|
||||||
options.Command = RESTIC_BIN
|
options.Command = flags.RESTIC_BIN
|
||||||
var c = GetConfig()
|
var c = GetConfig()
|
||||||
var optionsAsString = getOptions(c.Global, "")
|
var optionsAsString = getOptions(c.Global, []string{"all"})
|
||||||
args = append(optionsAsString, args...)
|
args = append(optionsAsString, args...)
|
||||||
return ExecuteCommand(options, args...)
|
return ExecuteCommand(options, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func CopyFile(from, to string) error {
|
func CopyFile(from, to string) error {
|
||||||
original, err := os.Open("original.txt")
|
original, err := os.Open(from)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
defer original.Close()
|
defer original.Close()
|
||||||
|
|
||||||
new, err := os.Create("new.txt")
|
new, err := os.Create(to)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -79,6 +104,15 @@ func CopyFile(from, to string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func CheckIfVolumeExists(volume string) bool {
|
func CheckIfVolumeExists(volume string) bool {
|
||||||
_, err := ExecuteCommand(ExecuteOptions{Command: "docker"}, "volume", "inspect", volume)
|
_, _, err := ExecuteCommand(ExecuteOptions{Command: "docker"}, "volume", "inspect", volume)
|
||||||
return err == nil
|
return err == nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ArrayContains[T comparable](arr []T, needle T) bool {
|
||||||
|
for _, item := range arr {
|
||||||
|
if item == needle {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user