Compare commits
130 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
425dfc5e50 | ||
|
|
6436dd9998 | ||
|
|
e75600c878 | ||
|
|
7545af2c15 | ||
|
|
5c65877bb3 | ||
|
|
09acb664c5 | ||
|
|
77d2dd96e1 | ||
|
|
2443ca3b0a | ||
|
|
c3f78c7b63 | ||
|
|
db1a3b2d47 | ||
|
|
65fb377f8e | ||
|
|
15035f5199 | ||
|
|
337d39076c | ||
|
|
3cd0463054 | ||
|
|
1556ce4830 | ||
|
|
7065f0797a | ||
|
|
afe9894632 | ||
|
|
35f95fd1fb | ||
|
|
a66e41b8f3 | ||
|
|
29a8202ce7 | ||
|
|
91cf1a1e6f | ||
|
|
16ed9c28bf | ||
|
|
578bc69498 | ||
|
|
f17f049f62 | ||
|
|
662b177acf | ||
|
|
31d91adb42 | ||
|
|
630d9c8eef | ||
|
|
97d3b0f2a9 | ||
|
|
0206e6173f | ||
|
|
ff104f543d | ||
|
|
ec3b5d7956 | ||
|
|
389cf12c1f | ||
|
|
39e81fb74b | ||
|
|
8818c584b8 | ||
|
|
f2891135f8 | ||
|
|
5a764f7fdf | ||
|
|
c129df4049 | ||
|
|
b93cbda566 | ||
|
|
f55137852d | ||
|
|
e9aa9d7420 | ||
|
|
113070b14e | ||
|
|
e66f4e5a83 | ||
|
|
3b33623a46 | ||
|
|
8d85b58ce4 | ||
|
|
dddd5b2e43 | ||
|
|
ff8e2d60d0 | ||
|
|
8c7bd73e8e | ||
|
|
0dc24effa9 | ||
|
|
809d7b2ad8 | ||
|
|
1119c96d5f | ||
|
|
e71add0c82 | ||
|
|
a4095d6833 | ||
|
|
5038326e36 | ||
|
|
c8800b9589 | ||
|
|
339ea56d18 | ||
|
|
76f6097847 | ||
|
|
71ff6dc3c5 | ||
|
|
25966fb186 | ||
|
|
488d2acb01 | ||
|
|
467c7ddeb7 | ||
|
|
bbb885e155 | ||
|
|
7a946b2096 | ||
|
|
08f8a9970e | ||
|
|
ec458fd04a | ||
|
|
2703cad2be | ||
|
|
79bea82c78 | ||
|
|
93e735306e | ||
|
|
bf940aae0f | ||
|
|
6bb795d622 | ||
|
|
afde0d7f3a | ||
|
|
d6d810fd42 | ||
|
|
7cc6ba75e9 | ||
|
|
250a3490ce | ||
|
|
0fdb80b04d | ||
|
|
b85b927add | ||
|
|
a4dbc6d85d | ||
|
|
0711dd746c | ||
|
|
90d1d6b110 | ||
|
|
5d85896a5f | ||
|
|
5cd27f4684 | ||
|
|
bd799912f6 | ||
|
|
9c1a3bc2ca | ||
|
|
22a0dc9df0 | ||
|
|
3112ba6c24 | ||
|
|
39b8821b08 | ||
|
|
75aaeacbb3 | ||
|
|
ff954f8716 | ||
|
|
1a4e0b2a93 | ||
|
|
4b27fdec7f | ||
|
|
a1d94898cb | ||
|
|
9fc886e151 | ||
|
|
5cfff24dbb | ||
|
|
cec0f89b24 | ||
|
|
13eb4f5385 | ||
|
|
1057e1263d | ||
|
|
f256b5ca81 | ||
|
|
103d78d0ee | ||
|
|
ad64fdeda6 | ||
|
|
7aea49c315 | ||
|
|
b3a1b4ee83 | ||
|
|
0ddd7f8c0d | ||
|
|
7b2c187590 | ||
|
|
620f555c90 | ||
|
|
0a5f6a4750 | ||
|
|
265172dd69 | ||
|
|
ee930cc905 | ||
|
|
f28a00fb58 | ||
|
|
5fe0e24839 | ||
|
|
8a6f73f9c2 | ||
|
|
a7d15ce655 | ||
|
|
8a5c005d91 | ||
|
|
462f0ef7e8 | ||
|
|
e28134f6b4 | ||
|
|
d2a6f0aa20 | ||
|
|
484cf26119 | ||
|
|
5c2e0b966e | ||
|
|
36a589aa85 | ||
|
|
4cd7134941 | ||
|
|
aca26f449e | ||
|
|
f2de32a2c1 | ||
|
|
3da4ced3c6 | ||
|
|
752563eb79 | ||
|
|
a7873abf16 | ||
|
|
7483f994d7 | ||
|
|
dfdf0d33a6 | ||
|
|
dd18873552 | ||
|
|
4cca9ff588 | ||
|
|
61fa17893a | ||
|
|
00f353bac4 | ||
|
|
d19cca6fcf |
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -20,7 +20,7 @@ Steps to reproduce the behavior:
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
**Log Files**
|
||||
If applicable, add log files or json responses from AdGuardHome to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
|
||||
10
.github/ISSUE_TEMPLATE/custom.md
vendored
10
.github/ISSUE_TEMPLATE/custom.md
vendored
@@ -1,10 +0,0 @@
|
||||
---
|
||||
name: Custom issue template
|
||||
about: Describe this issue template's purpose here.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@@ -9,3 +9,7 @@ updates:
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
70
.github/workflows/codeql-analysis.yml
vendored
Normal file
70
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '32 19 * * 6'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'go' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
41
.github/workflows/go.yml
vendored
41
.github/workflows/go.yml
vendored
@@ -11,28 +11,31 @@ jobs:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||
version: v1.36
|
||||
go-version-file: "go.mod"
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
|
||||
test:
|
||||
name: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ^1.16
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version-file: "go.mod"
|
||||
|
||||
- name: Test
|
||||
run: make test
|
||||
run: make test-ci
|
||||
|
||||
- name: Send coverage
|
||||
uses: shogo82148/actions-goveralls@v1
|
||||
@@ -44,16 +47,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ^1.16
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version-file: "go.mod"
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
version: latest
|
||||
args: --skip-publish --snapshot --rm-dist
|
||||
|
||||
76
.github/workflows/publish.yml
vendored
76
.github/workflows/publish.yml
vendored
@@ -1,44 +1,96 @@
|
||||
name: quay
|
||||
name: docker-image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
branches:
|
||||
- main
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
main:
|
||||
images:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
build:
|
||||
- fromImage: scratch
|
||||
tagPrefix: ""
|
||||
- fromImage: alpine:latest
|
||||
tagPrefix: "alpine-"
|
||||
steps:
|
||||
- name: Get current date
|
||||
run: echo "curr_date=$(date --utc +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to Quay
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: quay.io
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
- name: Login to ghcr.io
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Modify Dockerfile
|
||||
run: |
|
||||
sed -i -e "s|FROM scratch|FROM ${{ matrix.build.fromImage }}|g" Dockerfile
|
||||
|
||||
- name: Build and push ${{github.event.release.tag_name }}
|
||||
id: docker_build_release
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v3
|
||||
if: ${{ github.event.release.tag_name != '' }}
|
||||
with:
|
||||
context: .
|
||||
pull: true
|
||||
push: true
|
||||
tags: quay.io/bakito/adguardhome-sync:latest,quay.io/bakito/adguardhome-sync:${{ github.event.release.tag_name }}
|
||||
tags: quay.io/bakito/adguardhome-sync:${{ matrix.build.tagPrefix }}latest,quay.io/bakito/adguardhome-sync:${{ matrix.build.tagPrefix }}${{ github.event.release.tag_name }},ghcr.io/bakito/adguardhome-sync:${{ matrix.build.tagPrefix }}latest,ghcr.io/bakito/adguardhome-sync:${{ matrix.build.tagPrefix }}${{ github.event.release.tag_name }}
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
build-args: VERSION=${{ github.event.release.tag_name }}
|
||||
build-args: |
|
||||
VERSION=${{ github.event.release.tag_name }}
|
||||
BUILD=${{ env.curr_date }}
|
||||
|
||||
- name: Build and push main
|
||||
id: docker_build_main
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v3
|
||||
if: ${{ github.event.release.tag_name == '' }}
|
||||
with:
|
||||
context: .
|
||||
pull: true
|
||||
push: true
|
||||
tags: quay.io/bakito/adguardhome-sync:main
|
||||
tags: quay.io/bakito/adguardhome-sync:${{ matrix.build.tagPrefix }}main,ghcr.io/bakito/adguardhome-sync:${{ matrix.build.tagPrefix }}main
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
build-args: VERSION=main
|
||||
build-args: |
|
||||
VERSION=main
|
||||
BUILD=${{ env.curr_date }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
test:
|
||||
needs: images
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Create kind cluster
|
||||
uses: helm/kind-action@v1.4.0
|
||||
with:
|
||||
version: v0.14.0
|
||||
kubectl_version: v1.24.0
|
||||
- name: Install Helm Chart
|
||||
run: ./testdata/e2e/bin/install-chart.sh
|
||||
- name: Wait for sync to finish
|
||||
run: ./testdata/e2e/bin/wait-for-sync.sh
|
||||
- name: Show origin Logs
|
||||
run: ./testdata/e2e/bin/show-origin-logs.sh
|
||||
- name: Show Replica Logs
|
||||
run: ./testdata/e2e/bin/show-replica-logs.sh
|
||||
- name: Show Sync Logs
|
||||
run: ./testdata/e2e/bin/show-sync-logs.sh
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ dist
|
||||
adguardhome-sync
|
||||
main
|
||||
.adguardhome-sync.yaml
|
||||
tmp
|
||||
|
||||
40
.golangci.yml
Normal file
40
.golangci.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
run:
|
||||
timeout: 5m
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- asciicheck
|
||||
- bodyclose
|
||||
- depguard
|
||||
- dogsled
|
||||
- durationcheck
|
||||
- errcheck
|
||||
- errorlint
|
||||
- exportloopref
|
||||
- gci
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goimports
|
||||
- gosec
|
||||
- gosimple
|
||||
- govet
|
||||
- importas
|
||||
- ineffassign
|
||||
- megacheck
|
||||
- misspell
|
||||
- nakedret
|
||||
- nolintlint
|
||||
- revive
|
||||
- staticcheck
|
||||
- unconvert
|
||||
- unparam
|
||||
- unused
|
||||
- wastedassign
|
||||
linters-settings:
|
||||
gosec:
|
||||
# Exclude generated files
|
||||
exclude-generated: true
|
||||
gofmt:
|
||||
# simplify code: gofmt with `-s` option, true by default
|
||||
simplify: true
|
||||
|
||||
@@ -4,7 +4,7 @@ builds:
|
||||
- env:
|
||||
- CGO_ENABLED=0
|
||||
ldflags:
|
||||
- -s -w -X github.com/bakito/adguardhome-sync/version.Version={{.Version}}
|
||||
- -s -w -X github.com/bakito/adguardhome-sync/version.Version={{.Version}} -X github.com/bakito/adguardhome-sync/version.Build={{.Date}}
|
||||
goos:
|
||||
- linux
|
||||
- windows
|
||||
@@ -43,3 +43,5 @@ changelog:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
release:
|
||||
prerelease: auto
|
||||
12
Dockerfile
12
Dockerfile
@@ -1,18 +1,19 @@
|
||||
FROM docker.io/library/golang:1.16 as builder
|
||||
FROM golang:1.18 as builder
|
||||
|
||||
WORKDIR /go/src/app
|
||||
|
||||
RUN apt-get update && apt-get install -y upx
|
||||
|
||||
ARG VERSION=main
|
||||
ENV GOPROXY=https://goproxy.io \
|
||||
GO111MODULE=on \
|
||||
ARG BUILD="N/A"
|
||||
|
||||
ENV GO111MODULE=on \
|
||||
CGO_ENABLED=0 \
|
||||
GOOS=linux
|
||||
|
||||
ADD . /go/src/app/
|
||||
COPY . /go/src/app/
|
||||
|
||||
RUN go build -a -installsuffix cgo -ldflags="-w -s -X github.com/bakito/adguardhome-sync/version.Version=${VERSION}" -o adguardhome-sync . \
|
||||
RUN go build -a -installsuffix cgo -ldflags="-w -s -X github.com/bakito/adguardhome-sync/version.Version=${VERSION} -X github.com/bakito/adguardhome-sync/version.Build=${BUILD}" -o adguardhome-sync . \
|
||||
&& upx -q adguardhome-sync
|
||||
|
||||
# application image
|
||||
@@ -24,4 +25,5 @@ EXPOSE 8080
|
||||
ENTRYPOINT ["/opt/go/adguardhome-sync"]
|
||||
CMD ["run", "--config", "/config/adguardhome-sync.yaml"]
|
||||
COPY --from=builder /go/src/app/adguardhome-sync /opt/go/adguardhome-sync
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
USER 1001
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -186,7 +186,7 @@
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
Copyright 2021 bakito
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
55
Makefile
55
Makefile
@@ -1,27 +1,25 @@
|
||||
# Run go fmt against code
|
||||
fmt:
|
||||
go fmt ./...
|
||||
gofmt -s -w .
|
||||
|
||||
# Run go vet against code
|
||||
vet:
|
||||
go vet ./...
|
||||
|
||||
# Run golangci-lint
|
||||
# Run go lint against code
|
||||
lint:
|
||||
golangci-lint run
|
||||
golangci-lint run --fix
|
||||
|
||||
# Run go mod tidy
|
||||
tidy:
|
||||
go mod tidy
|
||||
|
||||
generate: deepcopy-gen
|
||||
touch ./tmp/deepcopy-gen-boilerplate.go.txt
|
||||
deepcopy-gen -h ./tmp/deepcopy-gen-boilerplate.go.txt -i ./pkg/types
|
||||
|
||||
# Run tests
|
||||
test: mocks tidy fmt vet
|
||||
test: generate lint test-ci
|
||||
|
||||
# Run ci tests
|
||||
test-ci: mocks tidy
|
||||
go test ./... -coverprofile=coverage.out
|
||||
go tool cover -func=coverage.out
|
||||
|
||||
mocks: mockgen
|
||||
mockgen -destination pkg/mocks/client/mock.go github.com/bakito/adguardhome-sync/pkg/client Client
|
||||
mockgen -package client -destination pkg/mocks/client/mock.go github.com/bakito/adguardhome-sync/pkg/client Client
|
||||
|
||||
release: semver
|
||||
@version=$$(semver); \
|
||||
@@ -33,10 +31,37 @@ test-release:
|
||||
|
||||
semver:
|
||||
ifeq (, $(shell which semver))
|
||||
$(shell go get -u github.com/bakito/semver)
|
||||
$(shell go install github.com/bakito/semver@latest)
|
||||
endif
|
||||
|
||||
mockgen:
|
||||
ifeq (, $(shell which mockgen))
|
||||
$(shell go get github.com/golang/mock/mockgen@v1.5)
|
||||
$(shell go install github.com/golang/mock/mockgen@v1.6.0)
|
||||
endif
|
||||
|
||||
deepcopy-gen:
|
||||
ifeq (, $(shell which deepcopy-gen))
|
||||
$(shell go install k8s.io/code-generator/cmd/deepcopy-gen@latest)
|
||||
endif
|
||||
|
||||
start-replica:
|
||||
docker run --pull always --name adguardhome-replica -p 9090:80 -p 9091:3000 --rm adguard/adguardhome
|
||||
# docker run --pull always --name adguardhome-replica -p 9090:80 -p 9091:3000 --rm adguard/adguardhome:v0.107.13
|
||||
|
||||
check_defined = \
|
||||
$(strip $(foreach 1,$1, \
|
||||
$(call __check_defined,$1,$(strip $(value 2)))))
|
||||
__check_defined = \
|
||||
$(if $(value $1),, \
|
||||
$(error Undefined $1$(if $2, ($2))))
|
||||
|
||||
build-image:
|
||||
$(call check_defined, AGH_SYNC_VERSION)
|
||||
docker build --build-arg VERSION=${AGH_SYNC_VERSION} --build-arg BUILD=$(shell date -u +'%Y-%m-%dT%H:%M:%S.%3NZ') --name adgardhome-replica -t ghcr.io/bakito/adguardhome-sync:${AGH_SYNC_VERSION} .
|
||||
|
||||
kind-create:
|
||||
kind delete cluster
|
||||
kind create cluster
|
||||
|
||||
kind-test:
|
||||
@./testdata/e2e/bin/install-chart.sh
|
||||
|
||||
107
README.md
107
README.md
@@ -4,7 +4,7 @@
|
||||
|
||||
# AdGuardHome sync
|
||||
|
||||
Synchronize [AdGuardHome](https://github.com/AdguardTeam/AdGuardHome) config to a replica instance.
|
||||
Synchronize [AdGuardHome](https://github.com/AdguardTeam/AdGuardHome) config to replica instances.
|
||||
|
||||
## Current sync features
|
||||
|
||||
@@ -13,25 +13,31 @@ Synchronize [AdGuardHome](https://github.com/AdguardTeam/AdGuardHome) config to
|
||||
- Rewrites
|
||||
- Services
|
||||
- Clients
|
||||
- DNS Config
|
||||
- DHCP Config
|
||||
|
||||
By default, all features are enabled. Single features can be disabled in the config.
|
||||
|
||||
### Setup of initial instances
|
||||
|
||||
New AdGuardHome replica instances can be automatically installed if enabled via the config autoSetup.
|
||||
During automatic installation, the admin interface will be listening on port 3000 in runtime.
|
||||
New AdGuardHome replica instances can be automatically installed if enabled via the config autoSetup. During automatic
|
||||
installation, the admin interface will be listening on port 3000 in runtime.
|
||||
|
||||
To skip automatic setup
|
||||
|
||||
## Install
|
||||
|
||||
Get from [releases](https://github.com/bakito/adguardhome-sync/releases) or install from source
|
||||
|
||||
```bash
|
||||
go get -u github.com/bakito/adguardhome-sync
|
||||
go install github.com/bakito/adguardhome-sync@latest
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Both the origin instance must be initially setup via the AdguardHome installation wizard.
|
||||
|
||||
## Run
|
||||
## Run Linux/Mac
|
||||
|
||||
```bash
|
||||
|
||||
@@ -49,6 +55,36 @@ adguardhome-sync run
|
||||
adguardhome-sync run --cron "*/10 * * * *"
|
||||
```
|
||||
|
||||
## Run Windows
|
||||
|
||||
```bash
|
||||
@ECHO OFF
|
||||
@TITLE AdGuardHome-Sync
|
||||
|
||||
REM set LOG_LEVEL=debug
|
||||
set LOG_LEVEL=info
|
||||
REM set LOG_LEVEL=warn
|
||||
REM set LOG_LEVEL=error
|
||||
|
||||
set ORIGIN_URL=http://192.168.1.2:3000
|
||||
set ORIGIN_USERNAME=username
|
||||
set ORIGIN_PASSWORD=password
|
||||
|
||||
set REPLICA_URL=http://192.168.2.2:3000
|
||||
set REPLICA_USERNAME=username
|
||||
set REPLICA_PASSWORD=password
|
||||
|
||||
set FEATURES_DHCP=false
|
||||
set FEATURES_DHCP_SERVERCONFIG=false
|
||||
set FEATURES_DHCP_STATICLEASES=false
|
||||
|
||||
# run once
|
||||
adguardhome-sync run
|
||||
|
||||
# run as daemon
|
||||
adguardhome-sync run --cron "*/10 * * * *"
|
||||
```
|
||||
|
||||
## docker cli
|
||||
|
||||
```bash
|
||||
@@ -57,7 +93,7 @@ docker run -d \
|
||||
-p 8080:8080 \
|
||||
-v /path/to/appdata/config/adguardhome-sync.yaml:/config/adguardhome-sync.yaml \
|
||||
--restart unless-stopped \
|
||||
quay.io/bakito/adguardhome-sync:latest
|
||||
ghcr.io/bakito/adguardhome-sync:latest
|
||||
```
|
||||
|
||||
## docker compose
|
||||
@@ -69,8 +105,9 @@ docker run -d \
|
||||
version: "2.1"
|
||||
services:
|
||||
adguardhome-sync:
|
||||
image: quay.io/bakito/adguardhome-sync
|
||||
image: ghcr.io/bakito/adguardhome-sync
|
||||
container_name: adguardhome-sync
|
||||
command: run --config /config/adguardhome-sync.yaml
|
||||
volumes:
|
||||
- /path/to/appdata/config/adguardhome-sync.yaml:/config/adguardhome-sync.yaml
|
||||
ports:
|
||||
@@ -85,23 +122,36 @@ services:
|
||||
version: "2.1"
|
||||
services:
|
||||
adguardhome-sync:
|
||||
image: quay.io/bakito/adguardhome-sync
|
||||
image: ghcr.io/bakito/adguardhome-sync
|
||||
container_name: adguardhome-sync
|
||||
command: run
|
||||
environment:
|
||||
- ORIGIN_URL=https://192.168.1.2:3000
|
||||
- ORIGIN_USERNAME=username
|
||||
- ORIGIN_PASSWORD=password
|
||||
- REPLICA_URL=http://192.168.1.3
|
||||
- REPLICA_USERNAME=username
|
||||
- REPLICA_PASSWORD=password
|
||||
- REPLICA1_URL=http://192.168.1.4
|
||||
- REPLICA1_USERNAME=username
|
||||
- REPLICA1_PASSWORD=password
|
||||
- REPLICA1_APIPATH=/some/path/control
|
||||
# - REPLICA1_AUTOSETUP=true # if true, AdGuardHome is automatically initialized.
|
||||
- CRON=*/10 * * * * # run every 10 minutes
|
||||
- RUNONSTART=true
|
||||
ORIGIN_URL: 'https://192.168.1.2:3000'
|
||||
ORIGIN_USERNAME: 'username'
|
||||
ORIGIN_PASSWORD: 'password'
|
||||
REPLICA_URL: 'http://192.168.1.3'
|
||||
REPLICA_USERNAME: 'username'
|
||||
REPLICA_PASSWORD: 'password'
|
||||
REPLICA1_URL: 'http://192.168.1.4'
|
||||
REPLICA1_USERNAME: 'username'
|
||||
REPLICA1_PASSWORD: 'password'
|
||||
REPLICA1_APIPATH: '/some/path/control'
|
||||
# REPLICA1_AUTOSETUP: true # if true, AdGuardHome is automatically initialized.
|
||||
# REPLICA1_INTERFACENAME: 'ens18' # use custom dhcp interface name
|
||||
CRON: '*/10 * * * *' # run every 10 minutes
|
||||
RUNONSTART: true
|
||||
# Configure sync features; by default all features are enabled.
|
||||
# FEATURES_GENERALSETTINGS: true
|
||||
# FEATURES_QUERYLOGCONFIG: true
|
||||
# FEATURES_STATSCONFIG: true
|
||||
# FEATURES_CLIENTSETTINGS: true
|
||||
# FEATURES_SERVICES: true
|
||||
# FEATURES_FILTERS: true
|
||||
# FEATURES_DHCP_SERVERCONFIG: true
|
||||
# FEATURES_DHCP_STATICLEASES: true
|
||||
# FEATURES_DNS_SERVERCONFIG: true
|
||||
# FEATURES_DNS_ACCESSLISTS: true
|
||||
# FEATURES_DNS_REWRITES: true
|
||||
ports:
|
||||
- 8080:8080
|
||||
restart: unless-stopped
|
||||
@@ -152,6 +202,21 @@ api:
|
||||
username: username
|
||||
password: password
|
||||
|
||||
# Configure sync features; by default all features are enabled.
|
||||
features:
|
||||
generalSettings: true
|
||||
queryLogConfig: true
|
||||
statsConfig: true
|
||||
clientSettings: true
|
||||
services: true
|
||||
filters: true
|
||||
dhcp:
|
||||
serverConfig: true
|
||||
staticLeases: true
|
||||
dns:
|
||||
serverConfig: true
|
||||
accessLists: true
|
||||
rewrites: true
|
||||
```
|
||||
|
||||
## Log Level
|
||||
|
||||
13
cmd/cmd_suite_test.go
Normal file
13
cmd/cmd_suite_test.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package cmd_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
func TestCmd(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "Cmd Suite")
|
||||
}
|
||||
26
cmd/root.go
26
cmd/root.go
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/bakito/adguardhome-sync/pkg/log"
|
||||
"github.com/bakito/adguardhome-sync/pkg/types"
|
||||
"github.com/bakito/adguardhome-sync/version"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
@@ -20,6 +21,19 @@ const (
|
||||
configAPIPort = "api.port"
|
||||
configAPIUsername = "api.username"
|
||||
configAPIPassword = "api.password"
|
||||
configAPIDarkMode = "api.darkMode"
|
||||
|
||||
configFeatureDHCPServerConfig = "features.dhcp.serverConfig"
|
||||
configFeatureDHCPStaticLeases = "features.dhcp.staticLeases"
|
||||
configFeatureDNServerConfig = "features.dns.serverConfig"
|
||||
configFeatureDNSPAccessLists = "features.dns.accessLists"
|
||||
configFeatureDNSRewrites = "features.dns.rewrites"
|
||||
configFeatureGeneralSettings = "features.generalSettings"
|
||||
configFeatureQueryLogConfig = "features.queryLogConfig"
|
||||
configFeatureStatsConfig = "features.statsConfig"
|
||||
configFeatureClientSettings = "features.clientSettings"
|
||||
configFeatureServices = "features.services"
|
||||
configFeatureFilters = "features.filters"
|
||||
|
||||
configOriginURL = "origin.url"
|
||||
configOriginAPIPath = "origin.apiPath"
|
||||
@@ -33,12 +47,14 @@ const (
|
||||
configReplicaPassword = "replica.password"
|
||||
configReplicaInsecureSkipVerify = "replica.insecureSkipVerify"
|
||||
configReplicaAutoSetup = "replica.autoSetup"
|
||||
configReplicaInterfaceName = "replica.interfaceName"
|
||||
|
||||
envReplicasUsernameFormat = "REPLICA%s_USERNAME"
|
||||
envReplicasPasswordFormat = "REPLICA%s_PASSWORD"
|
||||
envReplicasUsernameFormat = "REPLICA%s_USERNAME" // #nosec G101
|
||||
envReplicasPasswordFormat = "REPLICA%s_PASSWORD" // #nosec G101
|
||||
envReplicasAPIPathFormat = "REPLICA%s_APIPATH"
|
||||
envReplicasInsecureSkipVerifyFormat = "REPLICA%s_INSECURESKIPVERIFY"
|
||||
envReplicasAutoSetup = "REPLICA%s_AUTOSETUP"
|
||||
envReplicasInterfaceName = "REPLICA%s_INTERFACWENAME"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -49,8 +65,9 @@ var (
|
||||
|
||||
// rootCmd represents the base command when called without any subcommands
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "adguardhome-sync",
|
||||
Short: "Synchronize config from one AdGuardHome instance to another",
|
||||
Use: "adguardhome-sync",
|
||||
Short: "Synchronize config from one AdGuardHome instance to another",
|
||||
Version: version.Version,
|
||||
}
|
||||
|
||||
// Execute adds all child commands to the root command and sets flags appropriately.
|
||||
@@ -130,6 +147,7 @@ func collectEnvReplicas() []types.AdGuardInstance {
|
||||
APIPath: os.Getenv(fmt.Sprintf(envReplicasAPIPathFormat, sm[1])),
|
||||
InsecureSkipVerify: strings.EqualFold(os.Getenv(fmt.Sprintf(envReplicasInsecureSkipVerifyFormat, sm[1])), "true"),
|
||||
AutoSetup: strings.EqualFold(os.Getenv(fmt.Sprintf(envReplicasAutoSetup, sm[1])), "true"),
|
||||
InterfaceName: os.Getenv(fmt.Sprintf(envReplicasInterfaceName, sm[1])),
|
||||
}
|
||||
replicas = append(replicas, re)
|
||||
}
|
||||
|
||||
61
cmd/root_test.go
Normal file
61
cmd/root_test.go
Normal file
@@ -0,0 +1,61 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/bakito/adguardhome-sync/pkg/types"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var envVars = []string{
|
||||
"FEATURES_GENERALSETTINGS",
|
||||
"FEATURES_QUERYLOGCONFIG",
|
||||
"FEATURES_STATSCONFIG",
|
||||
"FEATURES_CLIENTSETTINGS",
|
||||
"FEATURES_SERVICES",
|
||||
"FEATURES_FILTERS",
|
||||
"FEATURES_DHCP_SERVERCONFIG",
|
||||
"FEATURES_DHCP_STATICLEASES",
|
||||
"FEATURES_DNS_SERVERCONFIG",
|
||||
"FEATURES_DNS_ACCESSLISTS",
|
||||
"FEATURES_DNS_REWRITES",
|
||||
}
|
||||
|
||||
var _ = Describe("Run", func() {
|
||||
BeforeEach(func() {
|
||||
for _, envVar := range envVars {
|
||||
Ω(os.Unsetenv(envVar)).ShouldNot(HaveOccurred())
|
||||
}
|
||||
initConfig()
|
||||
})
|
||||
Context("getConfig", func() {
|
||||
It("features should be true by default", func() {
|
||||
cfg, err := getConfig()
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
verifyFeatures(cfg, true)
|
||||
})
|
||||
It("features should be false", func() {
|
||||
for _, envVar := range envVars {
|
||||
Ω(os.Setenv(envVar, "false")).ShouldNot(HaveOccurred())
|
||||
}
|
||||
cfg, err := getConfig()
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
verifyFeatures(cfg, false)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
func verifyFeatures(cfg *types.Config, value bool) {
|
||||
Ω(cfg.Features.GeneralSettings).Should(Equal(value))
|
||||
Ω(cfg.Features.QueryLogConfig).Should(Equal(value))
|
||||
Ω(cfg.Features.StatsConfig).Should(Equal(value))
|
||||
Ω(cfg.Features.ClientSettings).Should(Equal(value))
|
||||
Ω(cfg.Features.Services).Should(Equal(value))
|
||||
Ω(cfg.Features.Filters).Should(Equal(value))
|
||||
Ω(cfg.Features.DHCP.ServerConfig).Should(Equal(value))
|
||||
Ω(cfg.Features.DHCP.StaticLeases).Should(Equal(value))
|
||||
Ω(cfg.Features.DNS.ServerConfig).Should(Equal(value))
|
||||
Ω(cfg.Features.DNS.AccessLists).Should(Equal(value))
|
||||
Ω(cfg.Features.DNS.Rewrites).Should(Equal(value))
|
||||
}
|
||||
29
cmd/run.go
29
cmd/run.go
@@ -36,6 +36,33 @@ func init() {
|
||||
_ = viper.BindPFlag(configAPIUsername, doCmd.PersistentFlags().Lookup("api-username"))
|
||||
doCmd.PersistentFlags().String("api-password", "", "Sync API password")
|
||||
_ = viper.BindPFlag(configAPIPassword, doCmd.PersistentFlags().Lookup("api-password"))
|
||||
doCmd.PersistentFlags().String("api-darkMode", "", "API UI in dark mode")
|
||||
_ = viper.BindPFlag(configAPIDarkMode, doCmd.PersistentFlags().Lookup("api-darkMode"))
|
||||
|
||||
doCmd.PersistentFlags().Bool("feature-dhcp-server-config", true, "Enable DHCP server config feature")
|
||||
_ = viper.BindPFlag(configFeatureDHCPServerConfig, doCmd.PersistentFlags().Lookup("feature-dhcp-server-config"))
|
||||
doCmd.PersistentFlags().Bool("feature-dhcp-static-leases", true, "Enable DHCP server static leases feature")
|
||||
_ = viper.BindPFlag(configFeatureDHCPStaticLeases, doCmd.PersistentFlags().Lookup("feature-dhcp-static-leases"))
|
||||
|
||||
doCmd.PersistentFlags().Bool("feature-dns-server-config", true, "Enable DNS server config feature")
|
||||
_ = viper.BindPFlag(configFeatureDNServerConfig, doCmd.PersistentFlags().Lookup("feature-dns-server-config"))
|
||||
doCmd.PersistentFlags().Bool("feature-dns-access-lists", true, "Enable DNS server access lists feature")
|
||||
_ = viper.BindPFlag(configFeatureDNSPAccessLists, doCmd.PersistentFlags().Lookup("feature-dns-access-lists"))
|
||||
doCmd.PersistentFlags().Bool("feature-dns-rewrites", true, "Enable DNS rewrites feature")
|
||||
_ = viper.BindPFlag(configFeatureDNSRewrites, doCmd.PersistentFlags().Lookup("feature-dns-rewrites"))
|
||||
doCmd.PersistentFlags().Bool("feature-general-settings", true, "Enable general settings feature")
|
||||
_ = viper.BindPFlag(configFeatureGeneralSettings, doCmd.PersistentFlags().Lookup("feature-general-settings"))
|
||||
_ = viper.BindPFlag("features.generalSettings", doCmd.PersistentFlags().Lookup("feature-general-settings"))
|
||||
doCmd.PersistentFlags().Bool("feature-query-log-config", true, "Enable query log config feature")
|
||||
_ = viper.BindPFlag(configFeatureQueryLogConfig, doCmd.PersistentFlags().Lookup("feature-query-log-config"))
|
||||
doCmd.PersistentFlags().Bool("feature-stats-config", true, "Enable stats config feature")
|
||||
_ = viper.BindPFlag(configFeatureStatsConfig, doCmd.PersistentFlags().Lookup("feature-stats-config"))
|
||||
doCmd.PersistentFlags().Bool("feature-client-settings", true, "Enable client settings feature")
|
||||
_ = viper.BindPFlag(configFeatureClientSettings, doCmd.PersistentFlags().Lookup("feature-client-settings"))
|
||||
doCmd.PersistentFlags().Bool("feature-services", true, "Enable services sync feature")
|
||||
_ = viper.BindPFlag(configFeatureServices, doCmd.PersistentFlags().Lookup("feature-services"))
|
||||
doCmd.PersistentFlags().Bool("feature-filters", true, "Enable filters sync feature")
|
||||
_ = viper.BindPFlag(configFeatureFilters, doCmd.PersistentFlags().Lookup("feature-filters"))
|
||||
|
||||
doCmd.PersistentFlags().String("origin-url", "", "Origin instance url")
|
||||
_ = viper.BindPFlag(configOriginURL, doCmd.PersistentFlags().Lookup("origin-url"))
|
||||
@@ -60,4 +87,6 @@ func init() {
|
||||
_ = viper.BindPFlag(configReplicaInsecureSkipVerify, doCmd.PersistentFlags().Lookup("replica-insecure-skip-verify"))
|
||||
doCmd.PersistentFlags().Bool("replica-auto-setup", false, "Enable automatic setup of new AdguardHome instances. This replaces the setup wizard.")
|
||||
_ = viper.BindPFlag(configReplicaAutoSetup, doCmd.PersistentFlags().Lookup("replica-auto-setup"))
|
||||
doCmd.PersistentFlags().Bool("replica-interface-name", false, "Optional change the interface name of the replica if it differs from the master")
|
||||
_ = viper.BindPFlag(configReplicaInterfaceName, doCmd.PersistentFlags().Lookup("replica-interface-name"))
|
||||
}
|
||||
|
||||
59
go.mod
59
go.mod
@@ -1,16 +1,57 @@
|
||||
module github.com/bakito/adguardhome-sync
|
||||
|
||||
go 1.16
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/go-resty/resty/v2 v2.6.0
|
||||
github.com/golang/mock v1.5.0
|
||||
github.com/google/uuid v1.2.0
|
||||
github.com/gin-gonic/gin v1.8.1
|
||||
github.com/go-resty/resty/v2 v2.7.0
|
||||
github.com/golang/mock v1.6.0
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/jinzhu/copier v0.3.5
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/onsi/ginkgo v1.16.1
|
||||
github.com/onsi/gomega v1.11.0
|
||||
github.com/onsi/ginkgo/v2 v2.4.0
|
||||
github.com/onsi/gomega v1.24.0
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
github.com/spf13/cobra v1.1.3
|
||||
github.com/spf13/viper v1.7.1
|
||||
go.uber.org/zap v1.16.0
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/spf13/viper v1.14.0
|
||||
go.uber.org/zap v1.23.0
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-playground/locales v0.14.0 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.0 // indirect
|
||||
github.com/go-playground/validator/v10 v10.10.0 // indirect
|
||||
github.com/goccy/go-json v0.9.7 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.1 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/leodido/go-urn v1.2.1 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
|
||||
github.com/spf13/afero v1.9.2 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/subosito/gotenv v1.4.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.7 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/multierr v1.8.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
|
||||
golang.org/x/net v0.1.0 // indirect
|
||||
golang.org/x/sys v0.1.0 // indirect
|
||||
golang.org/x/text v0.4.0 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
595
go.sum
595
go.sum
@@ -3,248 +3,277 @@ 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.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.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
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.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.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/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.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.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=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
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/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/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
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/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
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/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
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/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8=
|
||||
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
|
||||
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-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-resty/resty/v2 v2.6.0 h1:joIR5PNLM2EFqqESUjCMGXrWmXNHEU9CEiK813oKYS4=
|
||||
github.com/go-resty/resty/v2 v2.6.0/go.mod h1:PwvJS6hvaPkjtjNg9ph+VrSD92bi5Zq73w/BIH7cC3Q=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
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/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
|
||||
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
|
||||
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
|
||||
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
|
||||
github.com/go-playground/validator/v10 v10.10.0 h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh+BF8dHX5nt/dr0=
|
||||
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
|
||||
github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
|
||||
github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
|
||||
github.com/goccy/go-json v0.9.7 h1:IcB+Aqpx/iMHu5Yooh7jEzJk1JZ7Pjtmys2ukPr7EeM=
|
||||
github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
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.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.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g=
|
||||
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
|
||||
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/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
|
||||
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
|
||||
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.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 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
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/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.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/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
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-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/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
|
||||
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/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.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
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/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
||||
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/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/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||
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/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
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/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
|
||||
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg=
|
||||
github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
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/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/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
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/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/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
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/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.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
|
||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
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-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.1 h1:foqVmeWDD6yYpK+Yz3fHyNIxFYNxswxqNFjSKe+vI54=
|
||||
github.com/onsi/ginkgo v1.16.1/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.11.0 h1:+CqWgvj0OZycCaqclBD1pxKHAU+tOkHmQIWvDHq2aug=
|
||||
github.com/onsi/gomega v1.11.0/go.mod h1:azGKhqFUon9Vuj0YmTfLSmx0FUwqXYSTl5re8lQLTUg=
|
||||
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 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs=
|
||||
github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo=
|
||||
github.com/onsi/gomega v1.24.0 h1:+0glovB9Jd6z3VR+ScSwQqXVTIfJcGA9UBM8yzQxhqg=
|
||||
github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg=
|
||||
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
||||
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg=
|
||||
github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
|
||||
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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
||||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
||||
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/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
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/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
|
||||
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
|
||||
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
|
||||
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
|
||||
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
|
||||
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
|
||||
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
|
||||
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
||||
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/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk=
|
||||
github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU=
|
||||
github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As=
|
||||
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/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
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/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
|
||||
github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
|
||||
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
|
||||
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
|
||||
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
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.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
|
||||
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A=
|
||||
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM=
|
||||
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
|
||||
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
|
||||
go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8=
|
||||
go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
|
||||
go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY=
|
||||
go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY=
|
||||
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-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-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
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-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-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-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
@@ -253,21 +282,26 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/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-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=
|
||||
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-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.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
|
||||
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/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
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-20180906233101-161cd47e91fd/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-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
@@ -276,27 +310,52 @@ 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-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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
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-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
|
||||
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/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
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-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-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-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-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/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -304,59 +363,131 @@ 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-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-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/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-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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44 h1:Bli41pIlzTzf3KEY06n+xnzK/BESIg2ze4Pgfh/aI8c=
|
||||
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-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
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-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
|
||||
golang.org/x/sys v0.1.0/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.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
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.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
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/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-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-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-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-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-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-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-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/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-20201224043029-2b0845dc783e h1:4nW4NLDYnU28ojHaHO8OVxFHk/aQ33U01a9cjED+pzE=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
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/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
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 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
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.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.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
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.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.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-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
@@ -366,37 +497,83 @@ 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-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-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.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
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.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
|
||||
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=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
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=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=
|
||||
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
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/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
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.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/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-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.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
|
||||
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-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/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"strconv"
|
||||
|
||||
"github.com/bakito/adguardhome-sync/pkg/log"
|
||||
"github.com/bakito/adguardhome-sync/pkg/types"
|
||||
@@ -14,11 +16,25 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
const envRedirectPolicyNoOfRedirects = "REDIRECT_POLICY_NO_OF_REDIRECTS"
|
||||
|
||||
var (
|
||||
l = log.GetLogger("client")
|
||||
SetupNeededError = errors.New("setup needed")
|
||||
l = log.GetLogger("client")
|
||||
// ErrSetupNeeded custom error
|
||||
ErrSetupNeeded = errors.New("setup needed")
|
||||
)
|
||||
|
||||
func detailedError(resp *resty.Response, err error) error {
|
||||
e := resp.Status()
|
||||
if len(resp.Body()) > 0 {
|
||||
e += fmt.Sprintf("(%s)", string(resp.Body()))
|
||||
}
|
||||
if err != nil {
|
||||
e += fmt.Sprintf(": %s", err.Error())
|
||||
}
|
||||
return errors.New(e)
|
||||
}
|
||||
|
||||
// New create a new client
|
||||
func New(config types.AdGuardInstance) (Client, error) {
|
||||
var apiURL string
|
||||
@@ -32,9 +48,10 @@ func New(config types.AdGuardInstance) (Client, error) {
|
||||
return nil, err
|
||||
}
|
||||
u.Path = path.Clean(u.Path)
|
||||
cl := resty.New().SetHostURL(u.String()).SetDisableWarn(true)
|
||||
cl := resty.New().SetBaseURL(u.String()).SetDisableWarn(true)
|
||||
|
||||
if config.InsecureSkipVerify {
|
||||
// #nosec G402 has to be explicitly enabled
|
||||
cl.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
|
||||
}
|
||||
|
||||
@@ -42,8 +59,16 @@ func New(config types.AdGuardInstance) (Client, error) {
|
||||
cl = cl.SetBasicAuth(config.Username, config.Password)
|
||||
}
|
||||
|
||||
// no redirect
|
||||
cl.SetRedirectPolicy(resty.NoRedirectPolicy())
|
||||
if v, ok := os.LookupEnv(envRedirectPolicyNoOfRedirects); ok {
|
||||
nbr, err := strconv.Atoi(v)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error parsing env var %q value must be an integer", envRedirectPolicyNoOfRedirects)
|
||||
}
|
||||
cl.SetRedirectPolicy(resty.FlexibleRedirectPolicy(nbr))
|
||||
} else {
|
||||
// no redirect
|
||||
cl.SetRedirectPolicy(resty.NoRedirectPolicy())
|
||||
}
|
||||
|
||||
return &client{
|
||||
host: u.Host,
|
||||
@@ -55,47 +80,50 @@ func New(config types.AdGuardInstance) (Client, error) {
|
||||
// Client AdguardHome API client interface
|
||||
type Client interface {
|
||||
Host() string
|
||||
|
||||
Status() (*types.Status, error)
|
||||
ToggleProtection(enable bool) error
|
||||
RewriteList() (*types.RewriteEntries, error)
|
||||
AddRewriteEntries(e ...types.RewriteEntry) error
|
||||
DeleteRewriteEntries(e ...types.RewriteEntry) error
|
||||
|
||||
Filtering() (*types.FilteringStatus, error)
|
||||
ToggleFiltering(enabled bool, interval int) error
|
||||
ToggleFiltering(enabled bool, interval float64) error
|
||||
AddFilters(whitelist bool, e ...types.Filter) error
|
||||
DeleteFilters(whitelist bool, e ...types.Filter) error
|
||||
UpdateFilters(whitelist bool, e ...types.Filter) error
|
||||
RefreshFilters(whitelist bool) error
|
||||
SetCustomRules(rules types.UserRules) error
|
||||
|
||||
SafeBrowsing() (bool, error)
|
||||
ToggleSafeBrowsing(enable bool) error
|
||||
Parental() (bool, error)
|
||||
ToggleParental(enable bool) error
|
||||
SafeSearch() (bool, error)
|
||||
ToggleSafeSearch(enable bool) error
|
||||
|
||||
Services() (types.Services, error)
|
||||
SetServices(services types.Services) error
|
||||
|
||||
Clients() (*types.Clients, error)
|
||||
AddClients(client ...types.Client) error
|
||||
UpdateClients(client ...types.Client) error
|
||||
DeleteClients(client ...types.Client) error
|
||||
|
||||
QueryLogConfig() (*types.QueryLogConfig, error)
|
||||
SetQueryLogConfig(enabled bool, interval int, anonymizeClientIP bool) error
|
||||
SetQueryLogConfig(enabled bool, interval float64, anonymizeClientIP bool) error
|
||||
StatsConfig() (*types.IntervalConfig, error)
|
||||
SetStatsConfig(interval int) error
|
||||
SetStatsConfig(interval float64) error
|
||||
Setup() error
|
||||
AccessList() (*types.AccessList, error)
|
||||
SetAccessList(*types.AccessList) error
|
||||
DNSConfig() (*types.DNSConfig, error)
|
||||
SetDNSConfig(*types.DNSConfig) error
|
||||
DHCPServerConfig() (*types.DHCPServerConfig, error)
|
||||
SetDHCPServerConfig(*types.DHCPServerConfig) error
|
||||
AddDHCPStaticLeases(leases ...types.Lease) error
|
||||
DeleteDHCPStaticLeases(leases ...types.Lease) error
|
||||
}
|
||||
|
||||
type client struct {
|
||||
client *resty.Client
|
||||
log *zap.SugaredLogger
|
||||
host string
|
||||
client *resty.Client
|
||||
log *zap.SugaredLogger
|
||||
host string
|
||||
version string
|
||||
}
|
||||
|
||||
func (cl *client) Host() string {
|
||||
@@ -107,20 +135,26 @@ func (cl *client) doGet(req *resty.Request, url string) error {
|
||||
if cl.client.UserInfo != nil {
|
||||
rl = rl.With("username", cl.client.UserInfo.Username)
|
||||
}
|
||||
req.ForceContentType("application/json")
|
||||
rl.Debug("do get")
|
||||
resp, err := req.Get(url)
|
||||
if err != nil {
|
||||
if resp != nil && resp.StatusCode() == http.StatusFound {
|
||||
loc := resp.Header().Get("Location")
|
||||
if loc == "/install.html" {
|
||||
return SetupNeededError
|
||||
return ErrSetupNeeded
|
||||
}
|
||||
}
|
||||
return err
|
||||
rl.With("status", resp.StatusCode(), "body", string(resp.Body()), "error", err).Debug("error in do get")
|
||||
return detailedError(resp, err)
|
||||
}
|
||||
rl.With("status", resp.StatusCode(), "body", string(resp.Body())).Debug("got response")
|
||||
rl.With(
|
||||
"status", resp.StatusCode(),
|
||||
"body", string(resp.Body()),
|
||||
"content-type", resp.Header()["Content-Type"],
|
||||
).Debug("got response")
|
||||
if resp.StatusCode() != http.StatusOK {
|
||||
return errors.New(resp.Status())
|
||||
return detailedError(resp, nil)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -133,18 +167,34 @@ func (cl *client) doPost(req *resty.Request, url string) error {
|
||||
rl.Debug("do post")
|
||||
resp, err := req.Post(url)
|
||||
if err != nil {
|
||||
return err
|
||||
rl.With("status", resp.StatusCode(), "body", string(resp.Body()), "error", err).Debug("error in do post")
|
||||
return detailedError(resp, err)
|
||||
}
|
||||
rl.With("status", resp.StatusCode(), "body", string(resp.Body())).Debug("got response")
|
||||
rl.With(
|
||||
"status", resp.StatusCode(),
|
||||
"body", string(resp.Body()),
|
||||
"content-type", contentType(resp),
|
||||
).Debug("got response")
|
||||
if resp.StatusCode() != http.StatusOK {
|
||||
return errors.New(resp.Status())
|
||||
return detailedError(resp, nil)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func contentType(resp *resty.Response) string {
|
||||
if ct, ok := resp.Header()["Content-Type"]; ok {
|
||||
if len(ct) != 1 {
|
||||
return fmt.Sprintf("%v", ct)
|
||||
}
|
||||
return ct[0]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (cl *client) Status() (*types.Status, error) {
|
||||
status := &types.Status{}
|
||||
err := cl.doGet(cl.client.R().EnableTrace().SetResult(status), "status")
|
||||
cl.version = status.Version
|
||||
return status, err
|
||||
}
|
||||
|
||||
@@ -155,7 +205,8 @@ func (cl *client) RewriteList() (*types.RewriteEntries, error) {
|
||||
}
|
||||
|
||||
func (cl *client) AddRewriteEntries(entries ...types.RewriteEntry) error {
|
||||
for _, e := range entries {
|
||||
for i := range entries {
|
||||
e := entries[i]
|
||||
cl.log.With("domain", e.Domain, "answer", e.Answer).Info("Add rewrite entry")
|
||||
err := cl.doPost(cl.client.R().EnableTrace().SetBody(&e), "/rewrite/add")
|
||||
if err != nil {
|
||||
@@ -166,7 +217,8 @@ func (cl *client) AddRewriteEntries(entries ...types.RewriteEntry) error {
|
||||
}
|
||||
|
||||
func (cl *client) DeleteRewriteEntries(entries ...types.RewriteEntry) error {
|
||||
for _, e := range entries {
|
||||
for i := range entries {
|
||||
e := entries[i]
|
||||
cl.log.With("domain", e.Domain, "answer", e.Answer).Info("Delete rewrite entry")
|
||||
err := cl.doPost(cl.client.R().EnableTrace().SetBody(&e), "/rewrite/delete")
|
||||
if err != nil {
|
||||
@@ -271,10 +323,10 @@ func (cl *client) ToggleProtection(enable bool) error {
|
||||
|
||||
func (cl *client) SetCustomRules(rules types.UserRules) error {
|
||||
cl.log.With("rules", len(rules)).Info("Set user rules")
|
||||
return cl.doPost(cl.client.R().EnableTrace().SetBody(rules.String()), "/filtering/set_rules")
|
||||
return cl.doPost(cl.client.R().EnableTrace().SetBody(rules.ToPayload(cl.version)), "/filtering/set_rules")
|
||||
}
|
||||
|
||||
func (cl *client) ToggleFiltering(enabled bool, interval int) error {
|
||||
func (cl *client) ToggleFiltering(enabled bool, interval float64) error {
|
||||
cl.log.With("enabled", enabled, "interval", interval).Info("Toggle filtering")
|
||||
return cl.doPost(cl.client.R().EnableTrace().SetBody(&types.FilteringConfig{
|
||||
EnableConfig: types.EnableConfig{Enabled: enabled},
|
||||
@@ -300,7 +352,8 @@ func (cl *client) Clients() (*types.Clients, error) {
|
||||
}
|
||||
|
||||
func (cl *client) AddClients(clients ...types.Client) error {
|
||||
for _, client := range clients {
|
||||
for i := range clients {
|
||||
client := clients[i]
|
||||
cl.log.With("name", client.Name).Info("Add client")
|
||||
err := cl.doPost(cl.client.R().EnableTrace().SetBody(&client), "/clients/add")
|
||||
if err != nil {
|
||||
@@ -322,7 +375,8 @@ func (cl *client) UpdateClients(clients ...types.Client) error {
|
||||
}
|
||||
|
||||
func (cl *client) DeleteClients(clients ...types.Client) error {
|
||||
for _, client := range clients {
|
||||
for i := range clients {
|
||||
client := clients[i]
|
||||
cl.log.With("name", client.Name).Info("Delete client")
|
||||
err := cl.doPost(cl.client.R().EnableTrace().SetBody(&client), "/clients/delete")
|
||||
if err != nil {
|
||||
@@ -338,7 +392,7 @@ func (cl *client) QueryLogConfig() (*types.QueryLogConfig, error) {
|
||||
return qlc, err
|
||||
}
|
||||
|
||||
func (cl *client) SetQueryLogConfig(enabled bool, interval int, anonymizeClientIP bool) error {
|
||||
func (cl *client) SetQueryLogConfig(enabled bool, interval float64, anonymizeClientIP bool) error {
|
||||
cl.log.With("enabled", enabled, "interval", interval, "anonymizeClientIP", anonymizeClientIP).Info("Set query log config")
|
||||
return cl.doPost(cl.client.R().EnableTrace().SetBody(&types.QueryLogConfig{
|
||||
EnableConfig: types.EnableConfig{Enabled: enabled},
|
||||
@@ -353,7 +407,7 @@ func (cl *client) StatsConfig() (*types.IntervalConfig, error) {
|
||||
return stats, err
|
||||
}
|
||||
|
||||
func (cl *client) SetStatsConfig(interval int) error {
|
||||
func (cl *client) SetStatsConfig(interval float64) error {
|
||||
cl.log.With("interval", interval).Info("Set stats config")
|
||||
return cl.doPost(cl.client.R().EnableTrace().SetBody(&types.IntervalConfig{Interval: interval}), "/stats_config")
|
||||
}
|
||||
@@ -383,3 +437,58 @@ func (cl *client) Setup() error {
|
||||
req.UserInfo = nil
|
||||
return cl.doPost(req, "/install/configure")
|
||||
}
|
||||
|
||||
func (cl *client) AccessList() (*types.AccessList, error) {
|
||||
al := &types.AccessList{}
|
||||
err := cl.doGet(cl.client.R().EnableTrace().SetResult(al), "/access/list")
|
||||
return al, err
|
||||
}
|
||||
|
||||
func (cl *client) SetAccessList(list *types.AccessList) error {
|
||||
cl.log.Info("Set access list")
|
||||
return cl.doPost(cl.client.R().EnableTrace().SetBody(list), "/access/set")
|
||||
}
|
||||
|
||||
func (cl *client) DNSConfig() (*types.DNSConfig, error) {
|
||||
cfg := &types.DNSConfig{}
|
||||
err := cl.doGet(cl.client.R().EnableTrace().SetResult(cfg), "/dns_info")
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
func (cl *client) SetDNSConfig(config *types.DNSConfig) error {
|
||||
cl.log.Info("Set dns config list")
|
||||
return cl.doPost(cl.client.R().EnableTrace().SetBody(config), "/dns_config")
|
||||
}
|
||||
|
||||
func (cl *client) DHCPServerConfig() (*types.DHCPServerConfig, error) {
|
||||
cfg := &types.DHCPServerConfig{}
|
||||
err := cl.doGet(cl.client.R().EnableTrace().SetResult(cfg), "/dhcp/status")
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
func (cl *client) SetDHCPServerConfig(config *types.DHCPServerConfig) error {
|
||||
cl.log.Info("Set dhcp server config")
|
||||
return cl.doPost(cl.client.R().EnableTrace().SetBody(config), "/dhcp/set_config")
|
||||
}
|
||||
|
||||
func (cl *client) AddDHCPStaticLeases(leases ...types.Lease) error {
|
||||
for _, l := range leases {
|
||||
cl.log.With("mac", l.HWAddr, "ip", l.IP, "hostname", l.Hostname).Info("Add static dhcp lease")
|
||||
err := cl.doPost(cl.client.R().EnableTrace().SetBody(l), "/dhcp/add_static_lease")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cl *client) DeleteDHCPStaticLeases(leases ...types.Lease) error {
|
||||
for _, l := range leases {
|
||||
cl.log.With("mac", l.HWAddr, "ip", l.IP, "hostname", l.Hostname).Info("Delete static dhcp lease")
|
||||
err := cl.doPost(cl.client.R().EnableTrace().SetBody(l), "/dhcp/remove_static_lease")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package client_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,17 +2,17 @@ package client_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"github.com/bakito/adguardhome-sync/pkg/client"
|
||||
"github.com/bakito/adguardhome-sync/pkg/types"
|
||||
"github.com/google/uuid"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -21,7 +21,6 @@ var (
|
||||
)
|
||||
|
||||
var _ = Describe("Client", func() {
|
||||
|
||||
var (
|
||||
cl client.Client
|
||||
ts *httptest.Server
|
||||
@@ -107,7 +106,7 @@ bar`)
|
||||
Ω(fs.DNSAddresses[0]).Should(Equal("192.168.1.2"))
|
||||
Ω(fs.Version).Should(Equal("v0.105.2"))
|
||||
})
|
||||
It("should return SetupNeededError", func() {
|
||||
It("should return ErrSetupNeeded", func() {
|
||||
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Location", "/install.html")
|
||||
w.WriteHeader(http.StatusFound)
|
||||
@@ -116,7 +115,7 @@ bar`)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
_, err = cl.Status()
|
||||
Ω(err).Should(HaveOccurred())
|
||||
Ω(err).Should(Equal(client.SetupNeededError))
|
||||
Ω(err).Should(Equal(client.ErrSetupNeeded))
|
||||
})
|
||||
})
|
||||
|
||||
@@ -267,7 +266,7 @@ bar`)
|
||||
qlc, err := cl.QueryLogConfig()
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
Ω(qlc.Enabled).Should(BeTrue())
|
||||
Ω(qlc.Interval).Should(Equal(90))
|
||||
Ω(qlc.Interval).Should(Equal(90.0))
|
||||
})
|
||||
It("should set QueryLogConfig", func() {
|
||||
ts, cl = ClientPost("/querylog_config", `{"enabled":true,"interval":123,"anonymize_client_ip":true}`)
|
||||
@@ -280,19 +279,17 @@ bar`)
|
||||
ts, cl = ClientGet("stats_info.json", "/stats_info")
|
||||
sc, err := cl.StatsConfig()
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
Ω(sc.Interval).Should(Equal(1))
|
||||
Ω(sc.Interval).Should(Equal(1.0))
|
||||
})
|
||||
It("should set StatsConfig", func() {
|
||||
ts, cl = ClientPost("/stats_config", `{"interval":123}`)
|
||||
err := cl.SetStatsConfig(123)
|
||||
err := cl.SetStatsConfig(123.0)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
||||
Context("helper functions", func() {
|
||||
var (
|
||||
cl client.Client
|
||||
)
|
||||
var cl client.Client
|
||||
BeforeEach(func() {
|
||||
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
@@ -322,7 +319,7 @@ bar`)
|
||||
func ClientGet(file string, path string) (*httptest.Server, client.Client) {
|
||||
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
Ω(r.URL.Path).Should(Equal(types.DefaultAPIPath + path))
|
||||
b, err := ioutil.ReadFile(filepath.Join("../../testdata", file))
|
||||
b, err := os.ReadFile(filepath.Join("../../testdata", file))
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
_, err = w.Write(b)
|
||||
@@ -337,7 +334,7 @@ func ClientPost(path string, content ...string) (*httptest.Server, client.Client
|
||||
index := 0
|
||||
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
Ω(r.URL.Path).Should(Equal(types.DefaultAPIPath + path))
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
body, err := io.ReadAll(r.Body)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
Ω(body).Should(Equal([]byte(content[index])))
|
||||
index++
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: github.com/bakito/adguardhome-sync/pkg/client (interfaces: Client)
|
||||
|
||||
// Package mock_client is a generated GoMock package.
|
||||
package mock_client
|
||||
// Package client is a generated GoMock package.
|
||||
package client
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
@@ -34,6 +34,21 @@ func (m *MockClient) EXPECT() *MockClientMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// AccessList mocks base method.
|
||||
func (m *MockClient) AccessList() (*types.AccessList, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "AccessList")
|
||||
ret0, _ := ret[0].(*types.AccessList)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// AccessList indicates an expected call of AccessList.
|
||||
func (mr *MockClientMockRecorder) AccessList() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccessList", reflect.TypeOf((*MockClient)(nil).AccessList))
|
||||
}
|
||||
|
||||
// AddClients mocks base method.
|
||||
func (m *MockClient) AddClients(arg0 ...types.Client) error {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -52,6 +67,24 @@ func (mr *MockClientMockRecorder) AddClients(arg0 ...interface{}) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddClients", reflect.TypeOf((*MockClient)(nil).AddClients), arg0...)
|
||||
}
|
||||
|
||||
// AddDHCPStaticLeases mocks base method.
|
||||
func (m *MockClient) AddDHCPStaticLeases(arg0 ...types.Lease) error {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{}
|
||||
for _, a := range arg0 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "AddDHCPStaticLeases", varargs...)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// AddDHCPStaticLeases indicates an expected call of AddDHCPStaticLeases.
|
||||
func (mr *MockClientMockRecorder) AddDHCPStaticLeases(arg0 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddDHCPStaticLeases", reflect.TypeOf((*MockClient)(nil).AddDHCPStaticLeases), arg0...)
|
||||
}
|
||||
|
||||
// AddFilters mocks base method.
|
||||
func (m *MockClient) AddFilters(arg0 bool, arg1 ...types.Filter) error {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -104,6 +137,36 @@ func (mr *MockClientMockRecorder) Clients() *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clients", reflect.TypeOf((*MockClient)(nil).Clients))
|
||||
}
|
||||
|
||||
// DHCPServerConfig mocks base method.
|
||||
func (m *MockClient) DHCPServerConfig() (*types.DHCPServerConfig, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DHCPServerConfig")
|
||||
ret0, _ := ret[0].(*types.DHCPServerConfig)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// DHCPServerConfig indicates an expected call of DHCPServerConfig.
|
||||
func (mr *MockClientMockRecorder) DHCPServerConfig() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DHCPServerConfig", reflect.TypeOf((*MockClient)(nil).DHCPServerConfig))
|
||||
}
|
||||
|
||||
// DNSConfig mocks base method.
|
||||
func (m *MockClient) DNSConfig() (*types.DNSConfig, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DNSConfig")
|
||||
ret0, _ := ret[0].(*types.DNSConfig)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// DNSConfig indicates an expected call of DNSConfig.
|
||||
func (mr *MockClientMockRecorder) DNSConfig() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DNSConfig", reflect.TypeOf((*MockClient)(nil).DNSConfig))
|
||||
}
|
||||
|
||||
// DeleteClients mocks base method.
|
||||
func (m *MockClient) DeleteClients(arg0 ...types.Client) error {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -122,6 +185,24 @@ func (mr *MockClientMockRecorder) DeleteClients(arg0 ...interface{}) *gomock.Cal
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteClients", reflect.TypeOf((*MockClient)(nil).DeleteClients), arg0...)
|
||||
}
|
||||
|
||||
// DeleteDHCPStaticLeases mocks base method.
|
||||
func (m *MockClient) DeleteDHCPStaticLeases(arg0 ...types.Lease) error {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{}
|
||||
for _, a := range arg0 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "DeleteDHCPStaticLeases", varargs...)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// DeleteDHCPStaticLeases indicates an expected call of DeleteDHCPStaticLeases.
|
||||
func (mr *MockClientMockRecorder) DeleteDHCPStaticLeases(arg0 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDHCPStaticLeases", reflect.TypeOf((*MockClient)(nil).DeleteDHCPStaticLeases), arg0...)
|
||||
}
|
||||
|
||||
// DeleteFilters mocks base method.
|
||||
func (m *MockClient) DeleteFilters(arg0 bool, arg1 ...types.Filter) error {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -292,6 +373,20 @@ func (mr *MockClientMockRecorder) Services() *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Services", reflect.TypeOf((*MockClient)(nil).Services))
|
||||
}
|
||||
|
||||
// SetAccessList mocks base method.
|
||||
func (m *MockClient) SetAccessList(arg0 *types.AccessList) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetAccessList", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetAccessList indicates an expected call of SetAccessList.
|
||||
func (mr *MockClientMockRecorder) SetAccessList(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccessList", reflect.TypeOf((*MockClient)(nil).SetAccessList), arg0)
|
||||
}
|
||||
|
||||
// SetCustomRules mocks base method.
|
||||
func (m *MockClient) SetCustomRules(arg0 types.UserRules) error {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -306,8 +401,36 @@ func (mr *MockClientMockRecorder) SetCustomRules(arg0 interface{}) *gomock.Call
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCustomRules", reflect.TypeOf((*MockClient)(nil).SetCustomRules), arg0)
|
||||
}
|
||||
|
||||
// SetDHCPServerConfig mocks base method.
|
||||
func (m *MockClient) SetDHCPServerConfig(arg0 *types.DHCPServerConfig) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetDHCPServerConfig", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetDHCPServerConfig indicates an expected call of SetDHCPServerConfig.
|
||||
func (mr *MockClientMockRecorder) SetDHCPServerConfig(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDHCPServerConfig", reflect.TypeOf((*MockClient)(nil).SetDHCPServerConfig), arg0)
|
||||
}
|
||||
|
||||
// SetDNSConfig mocks base method.
|
||||
func (m *MockClient) SetDNSConfig(arg0 *types.DNSConfig) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetDNSConfig", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetDNSConfig indicates an expected call of SetDNSConfig.
|
||||
func (mr *MockClientMockRecorder) SetDNSConfig(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDNSConfig", reflect.TypeOf((*MockClient)(nil).SetDNSConfig), arg0)
|
||||
}
|
||||
|
||||
// SetQueryLogConfig mocks base method.
|
||||
func (m *MockClient) SetQueryLogConfig(arg0 bool, arg1 int, arg2 bool) error {
|
||||
func (m *MockClient) SetQueryLogConfig(arg0 bool, arg1 float64, arg2 bool) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetQueryLogConfig", arg0, arg1, arg2)
|
||||
ret0, _ := ret[0].(error)
|
||||
@@ -335,7 +458,7 @@ func (mr *MockClientMockRecorder) SetServices(arg0 interface{}) *gomock.Call {
|
||||
}
|
||||
|
||||
// SetStatsConfig mocks base method.
|
||||
func (m *MockClient) SetStatsConfig(arg0 int) error {
|
||||
func (m *MockClient) SetStatsConfig(arg0 float64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetStatsConfig", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
@@ -393,7 +516,7 @@ func (mr *MockClientMockRecorder) Status() *gomock.Call {
|
||||
}
|
||||
|
||||
// ToggleFiltering mocks base method.
|
||||
func (m *MockClient) ToggleFiltering(arg0 bool, arg1 int) error {
|
||||
func (m *MockClient) ToggleFiltering(arg0 bool, arg1 float64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ToggleFiltering", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
|
||||
BIN
pkg/sync/favicon.ico
Normal file
BIN
pkg/sync/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
@@ -2,7 +2,10 @@ package sync
|
||||
|
||||
import (
|
||||
"context"
|
||||
_ "embed"
|
||||
"errors"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -13,76 +16,64 @@ import (
|
||||
|
||||
"github.com/bakito/adguardhome-sync/pkg/log"
|
||||
"github.com/bakito/adguardhome-sync/version"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func (w *worker) handleSync(rw http.ResponseWriter, req *http.Request) {
|
||||
switch req.Method {
|
||||
case http.MethodPost:
|
||||
l.With("remote-addr", req.RemoteAddr).Info("Starting sync from API")
|
||||
w.sync()
|
||||
default:
|
||||
http.Error(rw, "only POST allowed", http.StatusBadRequest)
|
||||
}
|
||||
var (
|
||||
//go:embed index.html
|
||||
index []byte
|
||||
//go:embed favicon.ico
|
||||
favicon []byte
|
||||
)
|
||||
|
||||
func (w *worker) handleSync(c *gin.Context) {
|
||||
l.With("remote-addr", c.Request.RemoteAddr).Info("Starting sync from API")
|
||||
w.sync()
|
||||
}
|
||||
|
||||
func (w *worker) handleRoot(rw http.ResponseWriter, _ *http.Request) {
|
||||
_, _ = rw.Write([]byte("adguardhome-sync"))
|
||||
func (w *worker) handleRoot(c *gin.Context) {
|
||||
c.HTML(http.StatusOK, "index.html", map[string]interface{}{
|
||||
"DarkMode": w.cfg.API.DarkMode,
|
||||
"Version": version.Version,
|
||||
"Build": version.Build,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
func (w *worker) handleLogs(rw http.ResponseWriter, _ *http.Request) {
|
||||
_, _ = rw.Write([]byte(strings.Join(log.Logs(), "")))
|
||||
func (w *worker) handleFavicon(c *gin.Context) {
|
||||
c.Data(http.StatusOK, "image/x-icon", favicon)
|
||||
}
|
||||
|
||||
func (w *worker) basicAuth(h http.HandlerFunc) http.HandlerFunc {
|
||||
return func(rw http.ResponseWriter, r *http.Request) {
|
||||
|
||||
rw.Header().Set("WWW-Authenticate", `Basic realm="Restricted"`)
|
||||
|
||||
username, password, authOK := r.BasicAuth()
|
||||
if !authOK {
|
||||
http.Error(rw, "Not authorized", 401)
|
||||
return
|
||||
}
|
||||
|
||||
if username != w.cfg.API.Username || password != w.cfg.API.Password {
|
||||
http.Error(rw, "Not authorized", 401)
|
||||
return
|
||||
}
|
||||
|
||||
h.ServeHTTP(rw, r)
|
||||
}
|
||||
}
|
||||
|
||||
func use(h http.HandlerFunc, middleware ...func(http.HandlerFunc) http.HandlerFunc) http.HandlerFunc {
|
||||
for _, m := range middleware {
|
||||
h = m(h)
|
||||
}
|
||||
|
||||
return h
|
||||
func (w *worker) handleLogs(c *gin.Context) {
|
||||
c.Data(http.StatusOK, "text/plain", []byte(strings.Join(log.Logs(), "")))
|
||||
}
|
||||
|
||||
func (w *worker) listenAndServe() {
|
||||
l.With("version", version.Version, "port", w.cfg.API.Port).Info("Starting API server")
|
||||
l.With("port", w.cfg.API.Port).Info("Starting API server")
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
mux := http.NewServeMux()
|
||||
httpServer := &http.Server{
|
||||
Addr: fmt.Sprintf(":%d", w.cfg.API.Port),
|
||||
Handler: mux,
|
||||
BaseContext: func(_ net.Listener) context.Context { return ctx },
|
||||
}
|
||||
|
||||
var mw []func(http.HandlerFunc) http.HandlerFunc
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
r := gin.New()
|
||||
r.Use(gin.Recovery())
|
||||
if w.cfg.API.Username != "" && w.cfg.API.Password != "" {
|
||||
mw = append(mw, w.basicAuth)
|
||||
r.Use(gin.BasicAuth(map[string]string{w.cfg.API.Username: w.cfg.API.Password}))
|
||||
}
|
||||
httpServer := &http.Server{
|
||||
Addr: fmt.Sprintf(":%d", w.cfg.API.Port),
|
||||
Handler: r,
|
||||
BaseContext: func(_ net.Listener) context.Context { return ctx },
|
||||
ReadHeaderTimeout: 1 * time.Second,
|
||||
}
|
||||
|
||||
mux.HandleFunc("/api/v1/sync", use(w.handleSync, mw...))
|
||||
mux.HandleFunc("/api/v1/logs", use(w.handleLogs, mw...))
|
||||
mux.HandleFunc("/", use(w.handleRoot, mw...))
|
||||
r.SetHTMLTemplate(template.Must(template.New("index.html").Parse(string(index))))
|
||||
r.POST("/api/v1/sync", w.handleSync)
|
||||
r.GET("/api/v1/logs", w.handleLogs)
|
||||
r.GET("/favicon.ico", w.handleFavicon)
|
||||
r.GET("/", w.handleRoot)
|
||||
|
||||
go func() {
|
||||
if err := httpServer.ListenAndServe(); err != http.ErrServerClosed {
|
||||
if err := httpServer.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) {
|
||||
l.With("error", err).Fatalf("HTTP server ListenAndServe")
|
||||
}
|
||||
}()
|
||||
|
||||
52
pkg/sync/index.html
Normal file
52
pkg/sync/index.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>AdGuardHome sync</title>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js">
|
||||
</script>
|
||||
{{- if .DarkMode }}
|
||||
<link rel="stylesheet" href="https://bootswatch.com/5/darkly/bootstrap.min.css"
|
||||
crossorigin="anonymous">
|
||||
{{- else }}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We"
|
||||
crossOrigin="anonymous">
|
||||
{{- end }}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$("#showLogs").click(function () {
|
||||
$.get("api/v1/logs", {}, function (data) {
|
||||
$('#logs').html(data);
|
||||
}
|
||||
);
|
||||
});
|
||||
$("#sync").click(function () {
|
||||
$.post("api/v1/sync", {}, function (data) {
|
||||
});
|
||||
});
|
||||
$("#showLogs").click()
|
||||
});
|
||||
</script>
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid px-4">
|
||||
<div class="row">
|
||||
<p class="h1">AdGuardHome sync
|
||||
<p class="h6">{{ .Version }} ({{ .Build }})</p></p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="btn-group" role="group">
|
||||
<input class="btn btn-success" type="button" id="sync" value="Synchronize"/>
|
||||
<input class="btn btn-secondary" type="button" id="showLogs" value="Update Logs"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12">
|
||||
<pre class="p-3 border"><code id="logs"></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
353
pkg/sync/sync.go
353
pkg/sync/sync.go
@@ -3,22 +3,21 @@ package sync
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/bakito/adguardhome-sync/pkg/client"
|
||||
"github.com/bakito/adguardhome-sync/pkg/log"
|
||||
"github.com/bakito/adguardhome-sync/pkg/types"
|
||||
"github.com/bakito/adguardhome-sync/pkg/versions"
|
||||
"github.com/bakito/adguardhome-sync/version"
|
||||
"github.com/robfig/cron/v3"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
var (
|
||||
l = log.GetLogger("sync")
|
||||
)
|
||||
var l = log.GetLogger("sync")
|
||||
|
||||
// Sync config from origin to replica
|
||||
func Sync(cfg *types.Config) error {
|
||||
|
||||
if cfg.Origin.URL == "" {
|
||||
return fmt.Errorf("origin URL is required")
|
||||
}
|
||||
@@ -27,6 +26,8 @@ func Sync(cfg *types.Config) error {
|
||||
return fmt.Errorf("no replicas configured")
|
||||
}
|
||||
|
||||
l.With("version", version.Version, "build", version.Build).Info("AdGuardHome sync")
|
||||
cfg.Features.LogDisabled(l)
|
||||
cfg.Origin.AutoSetup = false
|
||||
|
||||
w := &worker{
|
||||
@@ -37,8 +38,14 @@ func Sync(cfg *types.Config) error {
|
||||
}
|
||||
if cfg.Cron != "" {
|
||||
w.cron = cron.New()
|
||||
cl := l.With("version", version.Version, "cron", cfg.Cron)
|
||||
_, err := w.cron.AddFunc(cfg.Cron, func() {
|
||||
cl := l.With("cron", cfg.Cron)
|
||||
sched, err := cron.ParseStandard(cfg.Cron)
|
||||
if err != nil {
|
||||
cl.With("error", err).Error("Error parsing cron expression")
|
||||
return err
|
||||
}
|
||||
cl = cl.With("next-execution", sched.Next(time.Now()))
|
||||
_, err = w.cron.AddFunc(cfg.Cron, func() {
|
||||
w.sync()
|
||||
})
|
||||
if err != nil {
|
||||
@@ -52,13 +59,19 @@ func Sync(cfg *types.Config) error {
|
||||
w.cron.Run()
|
||||
}
|
||||
}
|
||||
if cfg.RunOnStart {
|
||||
l.With("version", version.Version).Info("Run on startup")
|
||||
if cfg.API.Port != 0 {
|
||||
if cfg.RunOnStart {
|
||||
go func() {
|
||||
l.Info("Running sync on startup")
|
||||
w.sync()
|
||||
}()
|
||||
}
|
||||
w.listenAndServe()
|
||||
} else if cfg.RunOnStart {
|
||||
l.Info("Running sync on startup")
|
||||
w.sync()
|
||||
}
|
||||
if cfg.API.Port != 0 {
|
||||
w.listenAndServe()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -92,6 +105,13 @@ func (w *worker) sync() {
|
||||
return
|
||||
}
|
||||
|
||||
if versions.IsNewerThan(versions.MinAgh, o.status.Version) {
|
||||
sl.With("error", err, "version", o.status.Version).Errorf("Origin AdGuard Home version must be >= %s", versions.MinAgh)
|
||||
return
|
||||
}
|
||||
|
||||
sl.With("version", o.status.Version).Info("Connected to origin")
|
||||
|
||||
o.parental, err = oc.Parental()
|
||||
if err != nil {
|
||||
sl.With("error", err).Error("Error getting parental status")
|
||||
@@ -141,6 +161,24 @@ func (w *worker) sync() {
|
||||
return
|
||||
}
|
||||
|
||||
o.accessList, err = oc.AccessList()
|
||||
if err != nil {
|
||||
sl.With("error", err).Error("Error getting access list")
|
||||
return
|
||||
}
|
||||
|
||||
o.dnsConfig, err = oc.DNSConfig()
|
||||
if err != nil {
|
||||
sl.With("error", err).Error("Error getting dns config")
|
||||
return
|
||||
}
|
||||
|
||||
o.dhcpServerConfig, err = oc.DHCPServerConfig()
|
||||
if err != nil {
|
||||
sl.With("error", err).Error("Error getting dhcp server config")
|
||||
return
|
||||
}
|
||||
|
||||
replicas := w.cfg.UniqueReplicas()
|
||||
for _, replica := range replicas {
|
||||
w.syncTo(sl, o, replica)
|
||||
@@ -148,7 +186,6 @@ func (w *worker) sync() {
|
||||
}
|
||||
|
||||
func (w *worker) syncTo(l *zap.SugaredLogger, o *origin, replica types.AdGuardInstance) {
|
||||
|
||||
rc, err := w.createClient(replica)
|
||||
if err != nil {
|
||||
l.With("error", err, "url", replica.URL).Error("Error creating replica client")
|
||||
@@ -164,6 +201,18 @@ func (w *worker) syncTo(l *zap.SugaredLogger, o *origin, replica types.AdGuardIn
|
||||
return
|
||||
}
|
||||
|
||||
rl.With("version", rs.Version).Info("Connected to replica")
|
||||
|
||||
if versions.IsNewerThan(versions.MinAgh, rs.Version) {
|
||||
rl.With("error", err, "version", rs.Version).Errorf("Replica AdGuard Home version must be >= %s", versions.MinAgh)
|
||||
return
|
||||
}
|
||||
|
||||
if versions.IsSame(rs.Version, versions.IncompatibleAPI) {
|
||||
rl.With("error", err, "version", rs.Version).Errorf("Replica AdGuard Home runs with an incompatible API - Please ugrade to version %s or newer", versions.FixedIncompatibleAPI)
|
||||
return
|
||||
}
|
||||
|
||||
if o.status.Version != rs.Version {
|
||||
rl.With("originVersion", o.status.Version, "replicaVersion", rs.Version).Warn("Versions do not match")
|
||||
}
|
||||
@@ -180,7 +229,7 @@ func (w *worker) syncTo(l *zap.SugaredLogger, o *origin, replica types.AdGuardIn
|
||||
return
|
||||
}
|
||||
|
||||
err = w.syncRewrites(o.rewrites, rc)
|
||||
err = w.syncRewrites(rl, o.rewrites, rc)
|
||||
if err != nil {
|
||||
rl.With("error", err).Error("Error syncing rewrites")
|
||||
return
|
||||
@@ -202,13 +251,23 @@ func (w *worker) syncTo(l *zap.SugaredLogger, o *origin, replica types.AdGuardIn
|
||||
return
|
||||
}
|
||||
|
||||
if err = w.syncDNS(o.accessList, o.dnsConfig, rc); err != nil {
|
||||
rl.With("error", err).Error("Error syncing dns")
|
||||
return
|
||||
}
|
||||
|
||||
if err = w.syncDHCPServer(o.dhcpServerConfig, rc, replica); err != nil {
|
||||
rl.With("error", err).Error("Error syncing dns")
|
||||
return
|
||||
}
|
||||
|
||||
rl.Info("Sync done")
|
||||
}
|
||||
|
||||
func (w *worker) statusWithSetup(rl *zap.SugaredLogger, replica types.AdGuardInstance, rc client.Client) (*types.Status, error) {
|
||||
rs, err := rc.Status()
|
||||
if err != nil {
|
||||
if replica.AutoSetup && errors.Is(err, client.SetupNeededError) {
|
||||
if replica.AutoSetup && errors.Is(err, client.ErrSetupNeeded) {
|
||||
if serr := rc.Setup(); serr != nil {
|
||||
rl.With("error", serr).Error("Error setup AdGuardHome")
|
||||
return nil, err
|
||||
@@ -221,40 +280,44 @@ func (w *worker) statusWithSetup(rl *zap.SugaredLogger, replica types.AdGuardIns
|
||||
}
|
||||
|
||||
func (w *worker) syncServices(os types.Services, replica client.Client) error {
|
||||
rs, err := replica.Services()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !os.Equals(rs) {
|
||||
if err := replica.SetServices(os); err != nil {
|
||||
if w.cfg.Features.Services {
|
||||
rs, err := replica.Services()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !os.Equals(rs) {
|
||||
if err := replica.SetServices(os); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *worker) syncFilters(of *types.FilteringStatus, replica client.Client) error {
|
||||
rf, err := replica.Filtering()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = w.syncFilterType(of.Filters, rf.Filters, false, replica); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = w.syncFilterType(of.WhitelistFilters, rf.WhitelistFilters, true, replica); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if of.UserRules.String() != rf.UserRules.String() {
|
||||
return replica.SetCustomRules(of.UserRules)
|
||||
}
|
||||
|
||||
if of.Enabled != rf.Enabled || of.Interval != rf.Interval {
|
||||
if err = replica.ToggleFiltering(of.Enabled, of.Interval); err != nil {
|
||||
if w.cfg.Features.Filters {
|
||||
rf, err := replica.Filtering()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = w.syncFilterType(of.Filters, rf.Filters, false, replica); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = w.syncFilterType(of.WhitelistFilters, rf.WhitelistFilters, true, replica); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if of.UserRules.String() != rf.UserRules.String() {
|
||||
return replica.SetCustomRules(of.UserRules)
|
||||
}
|
||||
|
||||
if of.Enabled != rf.Enabled || of.Interval != rf.Interval {
|
||||
if err = replica.ToggleFiltering(of.Enabled, of.Interval); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -262,6 +325,9 @@ func (w *worker) syncFilters(of *types.FilteringStatus, replica client.Client) e
|
||||
func (w *worker) syncFilterType(of types.Filters, rFilters types.Filters, whitelist bool, replica client.Client) error {
|
||||
fa, fu, fd := rFilters.Merge(of)
|
||||
|
||||
if err := replica.DeleteFilters(whitelist, fd...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := replica.AddFilters(whitelist, fa...); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -274,114 +340,183 @@ func (w *worker) syncFilterType(of types.Filters, rFilters types.Filters, whitel
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err := replica.DeleteFilters(whitelist, fd...); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *worker) syncRewrites(or *types.RewriteEntries, replica client.Client) error {
|
||||
func (w *worker) syncRewrites(rl *zap.SugaredLogger, or *types.RewriteEntries, replica client.Client) error {
|
||||
if w.cfg.Features.DNS.Rewrites {
|
||||
replicaRewrites, err := replica.RewriteList()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
replicaRewrites, err := replica.RewriteList()
|
||||
if err != nil {
|
||||
return err
|
||||
a, r, d := replicaRewrites.Merge(or)
|
||||
|
||||
if err = replica.DeleteRewriteEntries(r...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = replica.AddRewriteEntries(a...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, dupl := range d {
|
||||
rl.With("domain", dupl.Domain, "answer", dupl.Answer).Warn("Skipping duplicated rewrite from source")
|
||||
}
|
||||
}
|
||||
|
||||
a, r := replicaRewrites.Merge(or)
|
||||
|
||||
if err = replica.AddRewriteEntries(a...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = replica.DeleteRewriteEntries(r...); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *worker) syncClients(oc *types.Clients, replica client.Client) error {
|
||||
rc, err := replica.Clients()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if w.cfg.Features.ClientSettings {
|
||||
rc, err := replica.Clients()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
a, u, r := rc.Merge(oc)
|
||||
a, u, r := rc.Merge(oc)
|
||||
|
||||
if err = replica.AddClients(a...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = replica.UpdateClients(u...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = replica.DeleteClients(r...); err != nil {
|
||||
return err
|
||||
if err = replica.DeleteClients(r...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = replica.AddClients(a...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = replica.UpdateClients(u...); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *worker) syncGeneralSettings(o *origin, rs *types.Status, replica client.Client) error {
|
||||
if o.status.ProtectionEnabled != rs.ProtectionEnabled {
|
||||
if err := replica.ToggleProtection(o.status.ProtectionEnabled); err != nil {
|
||||
return err
|
||||
if w.cfg.Features.GeneralSettings {
|
||||
if o.status.ProtectionEnabled != rs.ProtectionEnabled {
|
||||
if err := replica.ToggleProtection(o.status.ProtectionEnabled); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
if rp, err := replica.Parental(); err != nil {
|
||||
return err
|
||||
} else if o.parental != rp {
|
||||
if err = replica.ToggleParental(o.parental); err != nil {
|
||||
if rp, err := replica.Parental(); err != nil {
|
||||
return err
|
||||
} else if o.parental != rp {
|
||||
if err = replica.ToggleParental(o.parental); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
if rs, err := replica.SafeSearch(); err != nil {
|
||||
return err
|
||||
} else if o.safeSearch != rs {
|
||||
if err = replica.ToggleSafeSearch(o.safeSearch); err != nil {
|
||||
if rs, err := replica.SafeSearch(); err != nil {
|
||||
return err
|
||||
} else if o.safeSearch != rs {
|
||||
if err = replica.ToggleSafeSearch(o.safeSearch); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
if rs, err := replica.SafeBrowsing(); err != nil {
|
||||
return err
|
||||
} else if o.safeBrowsing != rs {
|
||||
if err = replica.ToggleSafeBrowsing(o.safeBrowsing); err != nil {
|
||||
if rs, err := replica.SafeBrowsing(); err != nil {
|
||||
return err
|
||||
} else if o.safeBrowsing != rs {
|
||||
if err = replica.ToggleSafeBrowsing(o.safeBrowsing); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *worker) syncConfigs(o *origin, replica client.Client) error {
|
||||
qlc, err := replica.QueryLogConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !o.queryLogConfig.Equals(qlc) {
|
||||
if err = replica.SetQueryLogConfig(o.queryLogConfig.Enabled, o.queryLogConfig.Interval, o.queryLogConfig.AnonymizeClientIP); err != nil {
|
||||
func (w *worker) syncConfigs(o *origin, rc client.Client) error {
|
||||
if w.cfg.Features.QueryLogConfig {
|
||||
qlc, err := rc.QueryLogConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !o.queryLogConfig.Equals(qlc) {
|
||||
if err = rc.SetQueryLogConfig(o.queryLogConfig.Enabled, o.queryLogConfig.Interval, o.queryLogConfig.AnonymizeClientIP); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
if w.cfg.Features.StatsConfig {
|
||||
sc, err := rc.StatsConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if o.statsConfig.Interval != sc.Interval {
|
||||
if err = rc.SetStatsConfig(o.statsConfig.Interval); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sc, err := replica.StatsConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if o.statsConfig.Interval != sc.Interval {
|
||||
if err = replica.SetStatsConfig(o.statsConfig.Interval); err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *worker) syncDNS(oal *types.AccessList, odc *types.DNSConfig, rc client.Client) error {
|
||||
if w.cfg.Features.DNS.AccessLists {
|
||||
al, err := rc.AccessList()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !al.Equals(oal) {
|
||||
if err = rc.SetAccessList(oal); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
if w.cfg.Features.DNS.ServerConfig {
|
||||
dc, err := rc.DNSConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !dc.Equals(odc) {
|
||||
if err = rc.SetDNSConfig(odc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *worker) syncDHCPServer(osc *types.DHCPServerConfig, rc client.Client, replica types.AdGuardInstance) error {
|
||||
sc, err := rc.DHCPServerConfig()
|
||||
if w.cfg.Features.DHCP.ServerConfig {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
origClone := osc.Clone()
|
||||
if replica.InterfaceName != "" {
|
||||
// overwrite interface name
|
||||
origClone.InterfaceName = replica.InterfaceName
|
||||
}
|
||||
if !sc.Equals(origClone) {
|
||||
if err = rc.SetDHCPServerConfig(origClone); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if w.cfg.Features.DHCP.StaticLeases {
|
||||
a, r := sc.StaticLeases.Merge(osc.StaticLeases)
|
||||
|
||||
if err = rc.DeleteDHCPStaticLeases(r...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = rc.AddDHCPStaticLeases(a...); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type origin struct {
|
||||
status *types.Status
|
||||
rewrites *types.RewriteEntries
|
||||
services types.Services
|
||||
filters *types.FilteringStatus
|
||||
clients *types.Clients
|
||||
queryLogConfig *types.QueryLogConfig
|
||||
statsConfig *types.IntervalConfig
|
||||
parental bool
|
||||
safeSearch bool
|
||||
safeBrowsing bool
|
||||
status *types.Status
|
||||
rewrites *types.RewriteEntries
|
||||
services types.Services
|
||||
filters *types.FilteringStatus
|
||||
clients *types.Clients
|
||||
queryLogConfig *types.QueryLogConfig
|
||||
statsConfig *types.IntervalConfig
|
||||
accessList *types.AccessList
|
||||
dnsConfig *types.DNSConfig
|
||||
dhcpServerConfig *types.DHCPServerConfig
|
||||
parental bool
|
||||
safeSearch bool
|
||||
safeBrowsing bool
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package sync_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,31 +4,49 @@ import (
|
||||
"errors"
|
||||
|
||||
"github.com/bakito/adguardhome-sync/pkg/client"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
mc "github.com/bakito/adguardhome-sync/pkg/mocks/client"
|
||||
clientmock "github.com/bakito/adguardhome-sync/pkg/mocks/client"
|
||||
"github.com/bakito/adguardhome-sync/pkg/types"
|
||||
"github.com/bakito/adguardhome-sync/pkg/versions"
|
||||
gm "github.com/golang/mock/gomock"
|
||||
"github.com/google/uuid"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("Sync", func() {
|
||||
var (
|
||||
mockCtrl *gm.Controller
|
||||
cl *mc.MockClient
|
||||
cl *clientmock.MockClient
|
||||
w *worker
|
||||
te error
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
mockCtrl = gm.NewController(GinkgoT())
|
||||
cl = mc.NewMockClient(mockCtrl)
|
||||
cl = clientmock.NewMockClient(mockCtrl)
|
||||
w = &worker{
|
||||
createClient: func(instance types.AdGuardInstance) (client.Client, error) {
|
||||
return cl, nil
|
||||
},
|
||||
cfg: &types.Config{
|
||||
Features: types.Features{
|
||||
DHCP: types.DHCP{
|
||||
ServerConfig: true,
|
||||
StaticLeases: true,
|
||||
},
|
||||
DNS: types.DNS{
|
||||
ServerConfig: true,
|
||||
Rewrites: true,
|
||||
AccessLists: true,
|
||||
},
|
||||
Filters: true,
|
||||
ClientSettings: true,
|
||||
Services: true,
|
||||
GeneralSettings: true,
|
||||
StatsConfig: true,
|
||||
QueryLogConfig: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
te = errors.New(uuid.NewString())
|
||||
})
|
||||
@@ -55,7 +73,7 @@ var _ = Describe("Sync", func() {
|
||||
cl.EXPECT().RewriteList().Return(&reR, nil)
|
||||
cl.EXPECT().AddRewriteEntries()
|
||||
cl.EXPECT().DeleteRewriteEntries()
|
||||
err := w.syncRewrites(&reO, cl)
|
||||
err := w.syncRewrites(l, &reO, cl)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
It("should add one rewrite entry", func() {
|
||||
@@ -63,7 +81,7 @@ var _ = Describe("Sync", func() {
|
||||
cl.EXPECT().RewriteList().Return(&reR, nil)
|
||||
cl.EXPECT().AddRewriteEntries(reO[0])
|
||||
cl.EXPECT().DeleteRewriteEntries()
|
||||
err := w.syncRewrites(&reO, cl)
|
||||
err := w.syncRewrites(l, &reO, cl)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
It("should remove one rewrite entry", func() {
|
||||
@@ -71,7 +89,7 @@ var _ = Describe("Sync", func() {
|
||||
cl.EXPECT().RewriteList().Return(&reR, nil)
|
||||
cl.EXPECT().AddRewriteEntries()
|
||||
cl.EXPECT().DeleteRewriteEntries(reR[0])
|
||||
err := w.syncRewrites(&reO, cl)
|
||||
err := w.syncRewrites(l, &reO, cl)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
It("should remove one rewrite entry", func() {
|
||||
@@ -79,25 +97,25 @@ var _ = Describe("Sync", func() {
|
||||
cl.EXPECT().RewriteList().Return(&reR, nil)
|
||||
cl.EXPECT().AddRewriteEntries()
|
||||
cl.EXPECT().DeleteRewriteEntries(reR[0])
|
||||
err := w.syncRewrites(&reO, cl)
|
||||
err := w.syncRewrites(l, &reO, cl)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
It("should return error when error on RewriteList()", func() {
|
||||
cl.EXPECT().RewriteList().Return(nil, te)
|
||||
err := w.syncRewrites(&reO, cl)
|
||||
err := w.syncRewrites(l, &reO, cl)
|
||||
Ω(err).Should(HaveOccurred())
|
||||
})
|
||||
It("should return error when error on AddRewriteEntries()", func() {
|
||||
cl.EXPECT().RewriteList().Return(&reR, nil)
|
||||
cl.EXPECT().DeleteRewriteEntries()
|
||||
cl.EXPECT().AddRewriteEntries().Return(te)
|
||||
err := w.syncRewrites(&reO, cl)
|
||||
err := w.syncRewrites(l, &reO, cl)
|
||||
Ω(err).Should(HaveOccurred())
|
||||
})
|
||||
It("should return error when error on DeleteRewriteEntries()", func() {
|
||||
cl.EXPECT().RewriteList().Return(&reR, nil)
|
||||
cl.EXPECT().AddRewriteEntries()
|
||||
cl.EXPECT().DeleteRewriteEntries().Return(te)
|
||||
err := w.syncRewrites(&reO, cl)
|
||||
err := w.syncRewrites(l, &reO, cl)
|
||||
Ω(err).Should(HaveOccurred())
|
||||
})
|
||||
})
|
||||
@@ -154,12 +172,14 @@ var _ = Describe("Sync", func() {
|
||||
})
|
||||
It("should return error when error on AddClients()", func() {
|
||||
cl.EXPECT().Clients().Return(clR, nil)
|
||||
cl.EXPECT().DeleteClients()
|
||||
cl.EXPECT().AddClients().Return(te)
|
||||
err := w.syncClients(clO, cl)
|
||||
Ω(err).Should(HaveOccurred())
|
||||
})
|
||||
It("should return error when error on UpdateClients()", func() {
|
||||
cl.EXPECT().Clients().Return(clR, nil)
|
||||
cl.EXPECT().DeleteClients()
|
||||
cl.EXPECT().AddClients()
|
||||
cl.EXPECT().UpdateClients().Return(te)
|
||||
err := w.syncClients(clO, cl)
|
||||
@@ -167,8 +187,6 @@ var _ = Describe("Sync", func() {
|
||||
})
|
||||
It("should return error when error on DeleteClients()", func() {
|
||||
cl.EXPECT().Clients().Return(clR, nil)
|
||||
cl.EXPECT().AddClients()
|
||||
cl.EXPECT().UpdateClients()
|
||||
cl.EXPECT().DeleteClients().Return(te)
|
||||
err := w.syncClients(clO, cl)
|
||||
Ω(err).Should(HaveOccurred())
|
||||
@@ -252,7 +270,7 @@ var _ = Describe("Sync", func() {
|
||||
It("should have QueryLogConfig changes", func() {
|
||||
o.queryLogConfig.Interval = 123
|
||||
cl.EXPECT().QueryLogConfig().Return(qlc, nil)
|
||||
cl.EXPECT().SetQueryLogConfig(false, 123, false)
|
||||
cl.EXPECT().SetQueryLogConfig(false, 123.0, false)
|
||||
cl.EXPECT().StatsConfig().Return(sc, nil)
|
||||
err := w.syncConfigs(o, cl)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
@@ -261,7 +279,7 @@ var _ = Describe("Sync", func() {
|
||||
o.statsConfig.Interval = 123
|
||||
cl.EXPECT().QueryLogConfig().Return(qlc, nil)
|
||||
cl.EXPECT().StatsConfig().Return(sc, nil)
|
||||
cl.EXPECT().SetStatsConfig(123)
|
||||
cl.EXPECT().SetStatsConfig(123.0)
|
||||
err := w.syncConfigs(o, cl)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
@@ -284,7 +302,7 @@ var _ = Describe("Sync", func() {
|
||||
Ω(st).Should(Equal(status))
|
||||
})
|
||||
It("should runs setup before getting replica status", func() {
|
||||
cl.EXPECT().Status().Return(nil, client.SetupNeededError)
|
||||
cl.EXPECT().Status().Return(nil, client.ErrSetupNeeded)
|
||||
cl.EXPECT().Setup()
|
||||
cl.EXPECT().Status().Return(status, nil)
|
||||
st, err := w.statusWithSetup(l, inst, cl)
|
||||
@@ -292,7 +310,7 @@ var _ = Describe("Sync", func() {
|
||||
Ω(st).Should(Equal(status))
|
||||
})
|
||||
It("should fail on setup", func() {
|
||||
cl.EXPECT().Status().Return(nil, client.SetupNeededError)
|
||||
cl.EXPECT().Status().Return(nil, client.ErrSetupNeeded)
|
||||
cl.EXPECT().Setup().Return(te)
|
||||
st, err := w.statusWithSetup(l, inst, cl)
|
||||
Ω(err).Should(HaveOccurred())
|
||||
@@ -369,16 +387,104 @@ var _ = Describe("Sync", func() {
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
})
|
||||
Context("sync", func() {
|
||||
|
||||
Context("syncDNS", func() {
|
||||
var (
|
||||
oal *types.AccessList
|
||||
ral *types.AccessList
|
||||
odc *types.DNSConfig
|
||||
rdc *types.DNSConfig
|
||||
)
|
||||
BeforeEach(func() {
|
||||
oal = &types.AccessList{}
|
||||
ral = &types.AccessList{}
|
||||
odc = &types.DNSConfig{}
|
||||
rdc = &types.DNSConfig{}
|
||||
})
|
||||
It("should have no changes", func() {
|
||||
cl.EXPECT().AccessList().Return(ral, nil)
|
||||
cl.EXPECT().DNSConfig().Return(rdc, nil)
|
||||
err := w.syncDNS(oal, odc, cl)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
It("should have access list changes", func() {
|
||||
ral.BlockedHosts = []string{"foo"}
|
||||
cl.EXPECT().AccessList().Return(ral, nil)
|
||||
cl.EXPECT().DNSConfig().Return(rdc, nil)
|
||||
cl.EXPECT().SetAccessList(oal)
|
||||
err := w.syncDNS(oal, odc, cl)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
It("should have dns config changes", func() {
|
||||
rdc.Bootstraps = []string{"foo"}
|
||||
cl.EXPECT().AccessList().Return(ral, nil)
|
||||
cl.EXPECT().DNSConfig().Return(rdc, nil)
|
||||
cl.EXPECT().SetDNSConfig(odc)
|
||||
err := w.syncDNS(oal, odc, cl)
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
||||
Context("syncDHCPServer", func() {
|
||||
var (
|
||||
osc *types.DHCPServerConfig
|
||||
rsc *types.DHCPServerConfig
|
||||
)
|
||||
BeforeEach(func() {
|
||||
osc = &types.DHCPServerConfig{}
|
||||
rsc = &types.DHCPServerConfig{}
|
||||
w.cfg.Features.DHCP.StaticLeases = false
|
||||
})
|
||||
It("should have no changes", func() {
|
||||
cl.EXPECT().DHCPServerConfig().Return(rsc, nil)
|
||||
err := w.syncDHCPServer(osc, cl, types.AdGuardInstance{})
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
It("should have changes", func() {
|
||||
rsc.Enabled = true
|
||||
cl.EXPECT().DHCPServerConfig().Return(rsc, nil)
|
||||
cl.EXPECT().SetDHCPServerConfig(osc)
|
||||
err := w.syncDHCPServer(osc, cl, types.AdGuardInstance{})
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
It("should use replica interface name", func() {
|
||||
cl.EXPECT().DHCPServerConfig().Return(rsc, nil)
|
||||
oscClone := osc.Clone()
|
||||
oscClone.InterfaceName = "foo"
|
||||
cl.EXPECT().SetDHCPServerConfig(oscClone)
|
||||
err := w.syncDHCPServer(osc, cl, types.AdGuardInstance{InterfaceName: "foo"})
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
||||
Context("sync", func() {
|
||||
BeforeEach(func() {
|
||||
w.cfg = &types.Config{
|
||||
Origin: types.AdGuardInstance{},
|
||||
Replica: types.AdGuardInstance{URL: "foo"},
|
||||
Features: types.Features{
|
||||
DHCP: types.DHCP{
|
||||
ServerConfig: true,
|
||||
StaticLeases: true,
|
||||
},
|
||||
DNS: types.DNS{
|
||||
ServerConfig: true,
|
||||
Rewrites: true,
|
||||
AccessLists: true,
|
||||
},
|
||||
Filters: true,
|
||||
ClientSettings: true,
|
||||
Services: true,
|
||||
GeneralSettings: true,
|
||||
StatsConfig: true,
|
||||
QueryLogConfig: true,
|
||||
},
|
||||
}
|
||||
})
|
||||
It("should have no changes", func() {
|
||||
// origin
|
||||
cl.EXPECT().Host()
|
||||
cl.EXPECT().Status().Return(&types.Status{}, nil)
|
||||
cl.EXPECT().Status().Return(&types.Status{Version: versions.MinAgh}, nil)
|
||||
cl.EXPECT().Parental()
|
||||
cl.EXPECT().SafeSearch()
|
||||
cl.EXPECT().SafeBrowsing()
|
||||
@@ -388,10 +494,13 @@ var _ = Describe("Sync", func() {
|
||||
cl.EXPECT().Clients().Return(&types.Clients{}, nil)
|
||||
cl.EXPECT().QueryLogConfig().Return(&types.QueryLogConfig{}, nil)
|
||||
cl.EXPECT().StatsConfig().Return(&types.IntervalConfig{}, nil)
|
||||
cl.EXPECT().AccessList().Return(&types.AccessList{}, nil)
|
||||
cl.EXPECT().DNSConfig().Return(&types.DNSConfig{}, nil)
|
||||
cl.EXPECT().DHCPServerConfig().Return(&types.DHCPServerConfig{}, nil)
|
||||
|
||||
// replica
|
||||
cl.EXPECT().Host()
|
||||
cl.EXPECT().Status().Return(&types.Status{}, nil)
|
||||
cl.EXPECT().Status().Return(&types.Status{Version: versions.MinAgh}, nil)
|
||||
cl.EXPECT().Parental()
|
||||
cl.EXPECT().SafeSearch()
|
||||
cl.EXPECT().SafeBrowsing()
|
||||
@@ -412,6 +521,61 @@ var _ = Describe("Sync", func() {
|
||||
cl.EXPECT().AddClients()
|
||||
cl.EXPECT().UpdateClients()
|
||||
cl.EXPECT().DeleteClients()
|
||||
cl.EXPECT().AccessList().Return(&types.AccessList{}, nil)
|
||||
cl.EXPECT().DNSConfig().Return(&types.DNSConfig{}, nil)
|
||||
cl.EXPECT().DHCPServerConfig().Return(&types.DHCPServerConfig{}, nil)
|
||||
cl.EXPECT().AddDHCPStaticLeases().Return(nil)
|
||||
cl.EXPECT().DeleteDHCPStaticLeases().Return(nil)
|
||||
w.sync()
|
||||
})
|
||||
It("origin version is too small", func() {
|
||||
// origin
|
||||
cl.EXPECT().Host()
|
||||
cl.EXPECT().Status().Return(&types.Status{Version: "v0.106.9"}, nil)
|
||||
w.sync()
|
||||
})
|
||||
It("replica version is too small", func() {
|
||||
// origin
|
||||
cl.EXPECT().Host()
|
||||
cl.EXPECT().Status().Return(&types.Status{Version: versions.MinAgh}, nil)
|
||||
cl.EXPECT().Parental()
|
||||
cl.EXPECT().SafeSearch()
|
||||
cl.EXPECT().SafeBrowsing()
|
||||
cl.EXPECT().RewriteList().Return(&types.RewriteEntries{}, nil)
|
||||
cl.EXPECT().Services()
|
||||
cl.EXPECT().Filtering().Return(&types.FilteringStatus{}, nil)
|
||||
cl.EXPECT().Clients().Return(&types.Clients{}, nil)
|
||||
cl.EXPECT().QueryLogConfig().Return(&types.QueryLogConfig{}, nil)
|
||||
cl.EXPECT().StatsConfig().Return(&types.IntervalConfig{}, nil)
|
||||
cl.EXPECT().AccessList().Return(&types.AccessList{}, nil)
|
||||
cl.EXPECT().DNSConfig().Return(&types.DNSConfig{}, nil)
|
||||
cl.EXPECT().DHCPServerConfig().Return(&types.DHCPServerConfig{}, nil)
|
||||
|
||||
// replica
|
||||
cl.EXPECT().Host()
|
||||
cl.EXPECT().Status().Return(&types.Status{Version: "v0.106.9"}, nil)
|
||||
w.sync()
|
||||
})
|
||||
It("replica version is with incompatible API", func() {
|
||||
// origin
|
||||
cl.EXPECT().Host()
|
||||
cl.EXPECT().Status().Return(&types.Status{Version: versions.MinAgh}, nil)
|
||||
cl.EXPECT().Parental()
|
||||
cl.EXPECT().SafeSearch()
|
||||
cl.EXPECT().SafeBrowsing()
|
||||
cl.EXPECT().RewriteList().Return(&types.RewriteEntries{}, nil)
|
||||
cl.EXPECT().Services()
|
||||
cl.EXPECT().Filtering().Return(&types.FilteringStatus{}, nil)
|
||||
cl.EXPECT().Clients().Return(&types.Clients{}, nil)
|
||||
cl.EXPECT().QueryLogConfig().Return(&types.QueryLogConfig{}, nil)
|
||||
cl.EXPECT().StatsConfig().Return(&types.IntervalConfig{}, nil)
|
||||
cl.EXPECT().AccessList().Return(&types.AccessList{}, nil)
|
||||
cl.EXPECT().DNSConfig().Return(&types.DNSConfig{}, nil)
|
||||
cl.EXPECT().DHCPServerConfig().Return(&types.DHCPServerConfig{}, nil)
|
||||
|
||||
// replica
|
||||
cl.EXPECT().Host()
|
||||
cl.EXPECT().Status().Return(&types.Status{Version: versions.IncompatibleAPI}, nil)
|
||||
w.sync()
|
||||
})
|
||||
})
|
||||
|
||||
51
pkg/types/deepcopy_generated.go
Normal file
51
pkg/types/deepcopy_generated.go
Normal file
@@ -0,0 +1,51 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
net "net"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DNSConfig) DeepCopyInto(out *DNSConfig) {
|
||||
*out = *in
|
||||
if in.Upstreams != nil {
|
||||
in, out := &in.Upstreams, &out.Upstreams
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Bootstraps != nil {
|
||||
in, out := &in.Bootstraps, &out.Bootstraps
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.BlockingIPv4 != nil {
|
||||
in, out := &in.BlockingIPv4, &out.BlockingIPv4
|
||||
*out = make(net.IP, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.BlockingIPv6 != nil {
|
||||
in, out := &in.BlockingIPv6, &out.BlockingIPv6
|
||||
*out = make(net.IP, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.LocalPTRUpstreams != nil {
|
||||
in, out := &in.LocalPTRUpstreams, &out.LocalPTRUpstreams
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSConfig.
|
||||
func (in *DNSConfig) DeepCopy() *DNSConfig {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DNSConfig)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
89
pkg/types/dhcp.go
Normal file
89
pkg/types/dhcp.go
Normal file
@@ -0,0 +1,89 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/jinzhu/copier"
|
||||
)
|
||||
|
||||
// DHCPServerConfig dhcp server config
|
||||
type DHCPServerConfig struct {
|
||||
V4 *V4ServerConfJSON `json:"v4"`
|
||||
V6 *V6ServerConfJSON `json:"v6"`
|
||||
InterfaceName string `json:"interface_name"`
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
Leases Leases `json:"leases,omitempty"`
|
||||
StaticLeases Leases `json:"static_leases,omitempty"`
|
||||
}
|
||||
|
||||
// Clone the config
|
||||
func (c *DHCPServerConfig) Clone() *DHCPServerConfig {
|
||||
clone := &DHCPServerConfig{}
|
||||
_ = copier.Copy(c, clone)
|
||||
return clone
|
||||
}
|
||||
|
||||
// Equals dhcp server config equal check
|
||||
func (c *DHCPServerConfig) Equals(o *DHCPServerConfig) bool {
|
||||
a, _ := json.Marshal(c)
|
||||
b, _ := json.Marshal(o)
|
||||
return string(a) == string(b)
|
||||
}
|
||||
|
||||
// V4ServerConfJSON v4 server conf
|
||||
type V4ServerConfJSON struct {
|
||||
GatewayIP net.IP `json:"gateway_ip"`
|
||||
SubnetMask net.IP `json:"subnet_mask"`
|
||||
RangeStart net.IP `json:"range_start"`
|
||||
RangeEnd net.IP `json:"range_end"`
|
||||
LeaseDuration uint32 `json:"lease_duration"`
|
||||
}
|
||||
|
||||
// V6ServerConfJSON v6 server conf
|
||||
type V6ServerConfJSON struct {
|
||||
RangeStart net.IP `json:"range_start"`
|
||||
RangeEnd net.IP `json:"range_end"`
|
||||
LeaseDuration uint32 `json:"lease_duration"`
|
||||
}
|
||||
|
||||
// Leases slice of leases type
|
||||
type Leases []Lease
|
||||
|
||||
// Merge the leases
|
||||
func (l Leases) Merge(other Leases) ([]Lease, []Lease) {
|
||||
current := make(map[string]Lease)
|
||||
|
||||
var adds Leases
|
||||
var removes Leases
|
||||
for _, le := range l {
|
||||
current[le.HWAddr] = le
|
||||
}
|
||||
|
||||
for _, le := range other {
|
||||
if _, ok := current[le.HWAddr]; ok {
|
||||
delete(current, le.HWAddr)
|
||||
} else {
|
||||
adds = append(adds, le)
|
||||
}
|
||||
}
|
||||
|
||||
for _, rr := range current {
|
||||
removes = append(removes, rr)
|
||||
}
|
||||
|
||||
return adds, removes
|
||||
}
|
||||
|
||||
// Lease contains the necessary information about a DHCP lease
|
||||
type Lease struct {
|
||||
HWAddr string `json:"mac"`
|
||||
IP net.IP `json:"ip"`
|
||||
Hostname string `json:"hostname"`
|
||||
|
||||
// Lease expiration time
|
||||
// 1: static lease
|
||||
Expiry time.Time `json:"expires"`
|
||||
}
|
||||
71
pkg/types/dns.go
Normal file
71
pkg/types/dns.go
Normal file
@@ -0,0 +1,71 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net"
|
||||
"sort"
|
||||
)
|
||||
|
||||
// DNSConfig dns config
|
||||
// +k8s:deepcopy-gen=true
|
||||
type DNSConfig struct {
|
||||
Upstreams []string `json:"upstream_dns,omitempty"`
|
||||
UpstreamsFile string `json:"upstream_dns_file"`
|
||||
Bootstraps []string `json:"bootstrap_dns,omitempty"`
|
||||
|
||||
ProtectionEnabled bool `json:"protection_enabled"`
|
||||
RateLimit uint32 `json:"ratelimit"`
|
||||
BlockingMode string `json:"blocking_mode,omitempty"`
|
||||
BlockingIPv4 net.IP `json:"blocking_ipv4,omitempty"`
|
||||
BlockingIPv6 net.IP `json:"blocking_ipv6"`
|
||||
EDNSCSEnabled bool `json:"edns_cs_enabled"`
|
||||
DNSSECEnabled bool `json:"dnssec_enabled"`
|
||||
DisableIPv6 bool `json:"disable_ipv6"`
|
||||
UpstreamMode string `json:"upstream_mode,omitempty"`
|
||||
CacheSize uint32 `json:"cache_size"`
|
||||
CacheMinTTL uint32 `json:"cache_ttl_min"`
|
||||
CacheMaxTTL uint32 `json:"cache_ttl_max"`
|
||||
CacheOptimistic bool `json:"cache_optimistic"`
|
||||
ResolveClients bool `json:"resolve_clients"`
|
||||
LocalPTRUpstreams []string `json:"local_ptr_upstreams,omitempty"`
|
||||
}
|
||||
|
||||
// Equals dns config equal check
|
||||
func (c *DNSConfig) Equals(o *DNSConfig) bool {
|
||||
cc := c.DeepCopy()
|
||||
oo := o.DeepCopy()
|
||||
cc.Sort()
|
||||
oo.Sort()
|
||||
|
||||
a, _ := json.Marshal(cc)
|
||||
b, _ := json.Marshal(oo)
|
||||
return string(a) == string(b)
|
||||
}
|
||||
|
||||
// Sort sort dns config
|
||||
func (c *DNSConfig) Sort() {
|
||||
sort.Strings(c.Upstreams)
|
||||
sort.Strings(c.Bootstraps)
|
||||
sort.Strings(c.LocalPTRUpstreams)
|
||||
}
|
||||
|
||||
// AccessList access list
|
||||
type AccessList struct {
|
||||
AllowedClients []string `json:"allowed_clients"`
|
||||
DisallowedClients []string `json:"disallowed_clients"`
|
||||
BlockedHosts []string `json:"blocked_hosts"`
|
||||
}
|
||||
|
||||
// Equals access list equal check
|
||||
func (al *AccessList) Equals(o *AccessList) bool {
|
||||
return equals(al.AllowedClients, o.AllowedClients) &&
|
||||
equals(al.DisallowedClients, o.DisallowedClients) &&
|
||||
equals(al.BlockedHosts, o.BlockedHosts)
|
||||
}
|
||||
|
||||
// Sort sort access list
|
||||
func (al *AccessList) Sort() {
|
||||
sort.Strings(al.AllowedClients)
|
||||
sort.Strings(al.DisallowedClients)
|
||||
sort.Strings(al.BlockedHosts)
|
||||
}
|
||||
72
pkg/types/features.go
Normal file
72
pkg/types/features.go
Normal file
@@ -0,0 +1,72 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// Features feature flags
|
||||
type Features struct {
|
||||
DNS DNS `json:"dns" yaml:"dns"`
|
||||
DHCP DHCP `json:"dhcp" yaml:"dhcp"`
|
||||
GeneralSettings bool `json:"generalSettings" yaml:"generalSettings"`
|
||||
QueryLogConfig bool `json:"queryLogConfig" yaml:"queryLogConfig"`
|
||||
StatsConfig bool `json:"statsConfig" yaml:"statsConfig"`
|
||||
ClientSettings bool `json:"clientSettings" yaml:"clientSettings"`
|
||||
Services bool `json:"services" yaml:"services"`
|
||||
Filters bool `json:"filters" yaml:"filters"`
|
||||
}
|
||||
|
||||
// DHCP features
|
||||
type DHCP struct {
|
||||
ServerConfig bool `json:"serverConfig" yaml:"serverConfig"`
|
||||
StaticLeases bool `json:"staticLeases" yaml:"staticLeases"`
|
||||
}
|
||||
|
||||
// DNS features
|
||||
type DNS struct {
|
||||
AccessLists bool `json:"accessLists" yaml:"accessLists"`
|
||||
ServerConfig bool `json:"serverConfig" yaml:"serverConfig"`
|
||||
Rewrites bool `json:"rewrites" yaml:"rewrites"`
|
||||
}
|
||||
|
||||
// LogDisabled log all disabled features
|
||||
func (f *Features) LogDisabled(l *zap.SugaredLogger) {
|
||||
var features []string
|
||||
if !f.DHCP.ServerConfig {
|
||||
features = append(features, "DHCP.ServerConfig")
|
||||
}
|
||||
if !f.DHCP.StaticLeases {
|
||||
features = append(features, "DHCP.StaticLeases")
|
||||
}
|
||||
if !f.DNS.AccessLists {
|
||||
features = append(features, "DNS.AccessLists")
|
||||
}
|
||||
if !f.DNS.ServerConfig {
|
||||
features = append(features, "DNS.ServerConfig")
|
||||
}
|
||||
if !f.DNS.Rewrites {
|
||||
features = append(features, "DNS.Rewrites")
|
||||
}
|
||||
if !f.GeneralSettings {
|
||||
features = append(features, "GeneralSettings")
|
||||
}
|
||||
if !f.QueryLogConfig {
|
||||
features = append(features, "QueryLogConfig")
|
||||
}
|
||||
if !f.StatsConfig {
|
||||
features = append(features, "StatsConfig")
|
||||
}
|
||||
if !f.ClientSettings {
|
||||
features = append(features, "ClientSettings")
|
||||
}
|
||||
if !f.Services {
|
||||
features = append(features, "Services")
|
||||
}
|
||||
if !f.Filters {
|
||||
features = append(features, "Filters")
|
||||
}
|
||||
|
||||
if len(features) > 0 {
|
||||
l.With("features", features).Info("Disabled features")
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,12 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/bakito/adguardhome-sync/pkg/versions"
|
||||
)
|
||||
|
||||
const (
|
||||
// DefaultAPIPath default api path
|
||||
DefaultAPIPath = "/control"
|
||||
)
|
||||
|
||||
@@ -19,6 +22,7 @@ type Config struct {
|
||||
Cron string `json:"cron,omitempty" yaml:"cron,omitempty"`
|
||||
RunOnStart bool `json:"runOnStart,omitempty" yaml:"runOnStart,omitempty"`
|
||||
API API `json:"api,omitempty" yaml:"api,omitempty"`
|
||||
Features Features `json:"features,omitempty" yaml:"features,omitempty"`
|
||||
}
|
||||
|
||||
// API configuration
|
||||
@@ -26,6 +30,7 @@ type API struct {
|
||||
Port int `json:"port,omitempty" yaml:"port,omitempty"`
|
||||
Username string `json:"username,omitempty" yaml:"username,omitempty"`
|
||||
Password string `json:"password,omitempty" yaml:"password,omitempty"`
|
||||
DarkMode bool `json:"darkMode,omitempty" yaml:"darkMode,omitempty"`
|
||||
}
|
||||
|
||||
// UniqueReplicas get unique replication instances
|
||||
@@ -58,6 +63,7 @@ type AdGuardInstance struct {
|
||||
Password string `json:"password,omitempty" yaml:"password,omitempty"`
|
||||
InsecureSkipVerify bool `json:"insecureSkipVerify" yaml:"insecureSkipVerify"`
|
||||
AutoSetup bool `json:"autoSetup" yaml:"autoSetup"`
|
||||
InterfaceName string `json:"interfaceName" yaml:"interfaceName"`
|
||||
}
|
||||
|
||||
// Key AdGuardInstance key
|
||||
@@ -86,20 +92,34 @@ type Status struct {
|
||||
type RewriteEntries []RewriteEntry
|
||||
|
||||
// Merge RewriteEntries
|
||||
func (rwe *RewriteEntries) Merge(other *RewriteEntries) (RewriteEntries, RewriteEntries) {
|
||||
func (rwe *RewriteEntries) Merge(other *RewriteEntries) (RewriteEntries, RewriteEntries, RewriteEntries) {
|
||||
current := make(map[string]RewriteEntry)
|
||||
|
||||
var adds RewriteEntries
|
||||
var removes RewriteEntries
|
||||
var duplicates RewriteEntries
|
||||
processed := make(map[string]bool)
|
||||
for _, rr := range *rwe {
|
||||
current[rr.Key()] = rr
|
||||
if _, ok := processed[rr.Key()]; !ok {
|
||||
current[rr.Key()] = rr
|
||||
processed[rr.Key()] = true
|
||||
} else {
|
||||
// remove duplicate
|
||||
removes = append(removes, rr)
|
||||
}
|
||||
}
|
||||
|
||||
for _, rr := range *other {
|
||||
if _, ok := current[rr.Key()]; ok {
|
||||
delete(current, rr.Key())
|
||||
} else {
|
||||
adds = append(adds, rr)
|
||||
if _, ok := processed[rr.Key()]; !ok {
|
||||
adds = append(adds, rr)
|
||||
processed[rr.Key()] = true
|
||||
} else {
|
||||
// skip duplicate
|
||||
duplicates = append(duplicates, rr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +127,7 @@ func (rwe *RewriteEntries) Merge(other *RewriteEntries) (RewriteEntries, Rewrite
|
||||
removes = append(removes, rr)
|
||||
}
|
||||
|
||||
return adds, removes
|
||||
return adds, removes, duplicates
|
||||
}
|
||||
|
||||
// RewriteEntry API struct
|
||||
@@ -135,7 +155,8 @@ func (f Filters) Merge(other Filters) (Filters, Filters, Filters) {
|
||||
current[f.URL] = f
|
||||
}
|
||||
|
||||
for _, rr := range other {
|
||||
for i := range other {
|
||||
rr := other[i]
|
||||
if c, ok := current[rr.URL]; ok {
|
||||
if !c.Equals(&rr) {
|
||||
updates = append(updates, rr)
|
||||
@@ -191,6 +212,24 @@ func (ur UserRules) String() string {
|
||||
return strings.Join(ur, "\n")
|
||||
}
|
||||
|
||||
// ToPayload return the version specific payload for user rules
|
||||
func (ur UserRules) ToPayload(version string) interface{} {
|
||||
if versions.IsNewerThan(version, versions.LastStringCustomRules) {
|
||||
return &UserRulesRequest{Rules: ur}
|
||||
}
|
||||
return ur.String()
|
||||
}
|
||||
|
||||
// UserRulesRequest API struct
|
||||
type UserRulesRequest struct {
|
||||
Rules UserRules
|
||||
}
|
||||
|
||||
// String toString of Users
|
||||
func (ur UserRulesRequest) String() string {
|
||||
return ur.Rules.String()
|
||||
}
|
||||
|
||||
// EnableConfig API struct
|
||||
type EnableConfig struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
@@ -198,7 +237,7 @@ type EnableConfig struct {
|
||||
|
||||
// IntervalConfig API struct
|
||||
type IntervalConfig struct {
|
||||
Interval int `json:"interval"`
|
||||
Interval float64 `json:"interval"`
|
||||
}
|
||||
|
||||
// FilteringConfig API struct
|
||||
@@ -243,11 +282,10 @@ func (s Services) Equals(o Services) bool {
|
||||
type Clients struct {
|
||||
Clients []Client `json:"clients"`
|
||||
AutoClients []struct {
|
||||
IP string `json:"ip"`
|
||||
Name string `json:"name"`
|
||||
Source string `json:"source"`
|
||||
WhoisInfo struct {
|
||||
} `json:"whois_info"`
|
||||
IP string `json:"ip"`
|
||||
Name string `json:"name"`
|
||||
Source string `json:"source"`
|
||||
WhoisInfo struct{} `json:"whois_info"`
|
||||
} `json:"auto_clients"`
|
||||
SupportedTags []string `json:"supported_tags"`
|
||||
}
|
||||
@@ -278,8 +316,8 @@ func (cl *Client) Sort() {
|
||||
sort.Strings(cl.Upstreams)
|
||||
}
|
||||
|
||||
// Equal Clients equal check
|
||||
func (cl *Client) Equal(o *Client) bool {
|
||||
// Equals Clients equal check
|
||||
func (cl *Client) Equals(o *Client) bool {
|
||||
cl.Sort()
|
||||
o.Sort()
|
||||
|
||||
@@ -306,7 +344,7 @@ func (clients *Clients) Merge(other *Clients) ([]Client, []Client, []Client) {
|
||||
|
||||
for _, cl := range expected {
|
||||
if oc, ok := current[cl.Name]; ok {
|
||||
if !cl.Equal(&oc) {
|
||||
if !cl.Equals(&oc) {
|
||||
updates = append(updates, cl)
|
||||
}
|
||||
delete(current, cl.Name)
|
||||
|
||||
@@ -3,7 +3,7 @@ package types_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ package types_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
"os"
|
||||
|
||||
"github.com/bakito/adguardhome-sync/pkg/types"
|
||||
"github.com/bakito/adguardhome-sync/pkg/versions"
|
||||
"github.com/google/uuid"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("Types", func() {
|
||||
@@ -23,7 +23,7 @@ var _ = Describe("Types", func() {
|
||||
|
||||
Context("FilteringStatus", func() {
|
||||
It("should correctly parse json", func() {
|
||||
b, err := ioutil.ReadFile("../..//testdata/filtering-status.json")
|
||||
b, err := os.ReadFile("../..//testdata/filtering-status.json")
|
||||
fs := &types.FilteringStatus{}
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
err = json.Unmarshal(b, fs)
|
||||
@@ -162,8 +162,9 @@ var _ = Describe("Types", func() {
|
||||
|
||||
It("should add a missing rewrite entry", func() {
|
||||
originRE = append(originRE, types.RewriteEntry{Domain: domain})
|
||||
a, d := replicaRE.Merge(&originRE)
|
||||
a, r, d := replicaRE.Merge(&originRE)
|
||||
Ω(a).Should(HaveLen(1))
|
||||
Ω(r).Should(BeEmpty())
|
||||
Ω(d).Should(BeEmpty())
|
||||
|
||||
Ω(a[0].Domain).Should(Equal(domain))
|
||||
@@ -171,20 +172,42 @@ var _ = Describe("Types", func() {
|
||||
|
||||
It("should remove additional ewrite entry", func() {
|
||||
replicaRE = append(replicaRE, types.RewriteEntry{Domain: domain})
|
||||
a, d := replicaRE.Merge(&originRE)
|
||||
a, r, d := replicaRE.Merge(&originRE)
|
||||
Ω(a).Should(BeEmpty())
|
||||
Ω(d).Should(HaveLen(1))
|
||||
Ω(r).Should(HaveLen(1))
|
||||
Ω(d).Should(BeEmpty())
|
||||
|
||||
Ω(d[0].Domain).Should(Equal(domain))
|
||||
Ω(r[0].Domain).Should(Equal(domain))
|
||||
})
|
||||
|
||||
It("should have no changes", func() {
|
||||
originRE = append(originRE, types.RewriteEntry{Domain: domain})
|
||||
replicaRE = append(replicaRE, types.RewriteEntry{Domain: domain})
|
||||
a, d := replicaRE.Merge(&originRE)
|
||||
a, r, d := replicaRE.Merge(&originRE)
|
||||
Ω(a).Should(BeEmpty())
|
||||
Ω(r).Should(BeEmpty())
|
||||
Ω(d).Should(BeEmpty())
|
||||
})
|
||||
|
||||
It("should remove target duplicate", func() {
|
||||
originRE = append(originRE, types.RewriteEntry{Domain: domain})
|
||||
replicaRE = append(replicaRE, types.RewriteEntry{Domain: domain})
|
||||
replicaRE = append(replicaRE, types.RewriteEntry{Domain: domain})
|
||||
a, r, d := replicaRE.Merge(&originRE)
|
||||
Ω(a).Should(BeEmpty())
|
||||
Ω(r).Should(HaveLen(1))
|
||||
Ω(d).Should(BeEmpty())
|
||||
})
|
||||
|
||||
It("should remove target duplicate", func() {
|
||||
originRE = append(originRE, types.RewriteEntry{Domain: domain})
|
||||
originRE = append(originRE, types.RewriteEntry{Domain: domain})
|
||||
replicaRE = append(replicaRE, types.RewriteEntry{Domain: domain})
|
||||
a, r, d := replicaRE.Merge(&originRE)
|
||||
Ω(a).Should(BeEmpty())
|
||||
Ω(r).Should(BeEmpty())
|
||||
Ω(d).Should(HaveLen(1))
|
||||
})
|
||||
})
|
||||
})
|
||||
Context("UserRules", func() {
|
||||
@@ -194,11 +217,29 @@ var _ = Describe("Types", func() {
|
||||
ur := types.UserRules([]string{r1, r2})
|
||||
Ω(ur.String()).Should(Equal(r1 + "\n" + r2))
|
||||
})
|
||||
It("should return a string for versions <= "+versions.LastStringCustomRules, func() {
|
||||
r1 := uuid.NewString()
|
||||
r2 := uuid.NewString()
|
||||
pl := types.UserRules([]string{r1, r2}).ToPayload(versions.LastStringCustomRules)
|
||||
Ω(pl).Should(BeAssignableToTypeOf(""))
|
||||
})
|
||||
It("should return a struct for versions > "+versions.IncompatibleAPI, func() {
|
||||
r1 := uuid.NewString()
|
||||
r2 := uuid.NewString()
|
||||
pl := types.UserRules([]string{r1, r2}).ToPayload(versions.FixedIncompatibleAPI)
|
||||
Ω(pl).Should(BeAssignableToTypeOf(&types.UserRulesRequest{}))
|
||||
})
|
||||
})
|
||||
Context("UserRulesRequest", func() {
|
||||
It("should join the rules correctly", func() {
|
||||
r1 := uuid.NewString()
|
||||
r2 := uuid.NewString()
|
||||
urr := types.UserRulesRequest{Rules: []string{r1, r2}}
|
||||
Ω(urr.String()).Should(Equal(r1 + "\n" + r2))
|
||||
})
|
||||
})
|
||||
Context("Config", func() {
|
||||
var (
|
||||
cfg *types.Config
|
||||
)
|
||||
var cfg *types.Config
|
||||
BeforeEach(func() {
|
||||
cfg = &types.Config{}
|
||||
})
|
||||
@@ -305,4 +346,18 @@ var _ = Describe("Types", func() {
|
||||
})
|
||||
})
|
||||
})
|
||||
Context("DNSConfig", func() {
|
||||
Context("Equals", func() {
|
||||
It("should be equal", func() {
|
||||
dc1 := &types.DNSConfig{Upstreams: []string{"a"}}
|
||||
dc2 := &types.DNSConfig{Upstreams: []string{"a"}}
|
||||
Ω(dc1.Equals(dc2)).Should(BeTrue())
|
||||
})
|
||||
It("should not be equal", func() {
|
||||
dc1 := &types.DNSConfig{Upstreams: []string{"a"}}
|
||||
dc2 := &types.DNSConfig{Upstreams: []string{"b"}}
|
||||
Ω(dc1.Equals(dc2)).ShouldNot(BeTrue())
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
25
pkg/versions/versions.go
Normal file
25
pkg/versions/versions.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package versions
|
||||
|
||||
import "golang.org/x/mod/semver"
|
||||
|
||||
const (
|
||||
// MinAgh minimal adguardhome version
|
||||
MinAgh = "v0.107.0"
|
||||
// LastStringCustomRules last adguardhome version with string payload custom rules
|
||||
// https://github.com/bakito/adguardhome-sync/issues/99
|
||||
LastStringCustomRules = "v0.107.13"
|
||||
// IncompatibleAPI adguardhome version with incompatible API
|
||||
// https://github.com/bakito/adguardhome-sync/issues/99
|
||||
IncompatibleAPI = "v0.107.14"
|
||||
// FixedIncompatibleAPI adguardhome version with fixed API
|
||||
// https://github.com/bakito/adguardhome-sync/issues/99
|
||||
FixedIncompatibleAPI = "v0.107.15"
|
||||
)
|
||||
|
||||
func IsNewerThan(v1 string, v2 string) bool {
|
||||
return semver.Compare(v1, v2) == 1
|
||||
}
|
||||
|
||||
func IsSame(v1 string, v2 string) bool {
|
||||
return semver.Compare(v1, v2) == 0
|
||||
}
|
||||
17
testdata/dhcp-status.json
vendored
Normal file
17
testdata/dhcp-status.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"enabled": false,
|
||||
"interface_name": "docker0",
|
||||
"v4": {
|
||||
"gateway_ip": "172.17.0.1",
|
||||
"subnet_mask": "255.255.255.0",
|
||||
"range_start": "172.17.0.100",
|
||||
"range_end": "172.17.0.200",
|
||||
"lease_duration": 888888
|
||||
},
|
||||
"v6": {
|
||||
"range_start": "",
|
||||
"lease_duration": 0
|
||||
},
|
||||
"leases": [],
|
||||
"static_leases": []
|
||||
}
|
||||
22
testdata/dns-info.json
vendored
Normal file
22
testdata/dns-info.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"upstream_dns": [
|
||||
"https://dns10.quad9.net/dns-query"
|
||||
],
|
||||
"upstream_dns_file": "",
|
||||
"bootstrap_dns": [
|
||||
"1.1.1.1:53"
|
||||
],
|
||||
"protection_enabled": true,
|
||||
"ratelimit": 20,
|
||||
"blocking_mode": "default",
|
||||
"blocking_ipv4": "",
|
||||
"blocking_ipv6": "",
|
||||
"edns_cs_enabled": false,
|
||||
"dnssec_enabled": false,
|
||||
"disable_ipv6": false,
|
||||
"upstream_mode": "",
|
||||
"cache_size": 4194304,
|
||||
"cache_ttl_min": 0,
|
||||
"cache_ttl_max": 0
|
||||
}
|
||||
|
||||
23
testdata/e2e/.helmignore
vendored
Normal file
23
testdata/e2e/.helmignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
8
testdata/e2e/Chart.yaml
vendored
Normal file
8
testdata/e2e/Chart.yaml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v2
|
||||
name: agh-e2e
|
||||
description: adguardhome sync test charts
|
||||
type: application
|
||||
|
||||
version: 0.1.0
|
||||
|
||||
appVersion: "1.16.0"
|
||||
9
testdata/e2e/bin/install-chart.sh
vendored
Executable file
9
testdata/e2e/bin/install-chart.sh
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
kubectl config set-context --current --namespace=agh-e2e
|
||||
|
||||
if [[ $(helm list --no-headers -n agh-e2e | grep agh-e2e | wc -l) == "1" ]]; then
|
||||
helm delete agh-e2e -n agh-e2e --wait
|
||||
fi
|
||||
helm install agh-e2e testdata/e2e -n agh-e2e --create-namespace
|
||||
5
testdata/e2e/bin/show-origin-logs.sh
vendored
Executable file
5
testdata/e2e/bin/show-origin-logs.sh
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo Pod adguardhome-origin logs
|
||||
kubectl logs adguardhome-origin
|
||||
10
testdata/e2e/bin/show-replica-logs.sh
vendored
Executable file
10
testdata/e2e/bin/show-replica-logs.sh
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
for pod in $(kubectl get pods -l bakito.net/adguardhome-sync=replica -o name); do
|
||||
echo Pod "${pod} logs"
|
||||
kubectl logs ${pod}
|
||||
ERRORS=$(kubectl logs ${pod} | grep '\[error\]' | wc -l)
|
||||
echo "Found ${ERRORS} error(s) in log"
|
||||
echo "----------------------------------------------"
|
||||
done
|
||||
8
testdata/e2e/bin/show-sync-logs.sh
vendored
Executable file
8
testdata/e2e/bin/show-sync-logs.sh
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo Pod adguardhome-sync logs
|
||||
kubectl logs adguardhome-sync
|
||||
ERRORS=$(kubectl logs adguardhome-sync | grep Error | wc -l)
|
||||
echo "Found ${ERRORS} error(s) in log";
|
||||
if [[ "${ERRORS}" != "0" ]]; then exit 1; fi
|
||||
7
testdata/e2e/bin/wait-for-agh-pods.sh
vendored
Executable file
7
testdata/e2e/bin/wait-for-agh-pods.sh
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "wait for adguardhome pods"
|
||||
for pod in $(kubectl get pods -l bakito.net/adguardhome-sync -o name); do
|
||||
kubectl wait --for condition=Ready ${pod} --timeout=30s
|
||||
done
|
||||
4
testdata/e2e/bin/wait-for-sync.sh
vendored
Executable file
4
testdata/e2e/bin/wait-for-sync.sh
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
kubectl wait --for=jsonpath='{.status.phase}'=Succeeded pod/adguardhome-sync --timeout=1m
|
||||
174
testdata/e2e/templates/configmap-origin.yaml
vendored
Normal file
174
testdata/e2e/templates/configmap-origin.yaml
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: origin-conf
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
AdGuardHome.yaml: |
|
||||
bind_host: 0.0.0.0
|
||||
bind_port: 3000
|
||||
beta_bind_port: 0
|
||||
users:
|
||||
- name: username
|
||||
password: $2a$10$yrrX.EvDpUUnZxr74u6euOMeF6dPFd/mEyohDq1LkpH76JyeObPBm
|
||||
auth_attempts: 5
|
||||
block_auth_min: 15
|
||||
http_proxy: ""
|
||||
language: en
|
||||
debug_pprof: false
|
||||
web_session_ttl: 720
|
||||
dns:
|
||||
bind_hosts:
|
||||
- 0.0.0.0
|
||||
port: 53
|
||||
statistics_interval: 1
|
||||
querylog_enabled: true
|
||||
querylog_file_enabled: true
|
||||
querylog_interval: 6h
|
||||
querylog_size_memory: 1000
|
||||
anonymize_client_ip: false
|
||||
protection_enabled: true
|
||||
blocking_mode: default
|
||||
blocking_ipv4: ""
|
||||
blocking_ipv6: ""
|
||||
blocked_response_ttl: 10
|
||||
parental_block_host: family-block.dns.adguard.com
|
||||
safebrowsing_block_host: standard-block.dns.adguard.com
|
||||
ratelimit: 20
|
||||
ratelimit_whitelist: []
|
||||
refuse_any: true
|
||||
upstream_dns:
|
||||
- https://dns10.quad9.net/dns-query
|
||||
upstream_dns_file: ""
|
||||
bootstrap_dns:
|
||||
- 1.1.1.1:53
|
||||
all_servers: false
|
||||
fastest_addr: false
|
||||
fastest_timeout: 1s
|
||||
allowed_clients: []
|
||||
disallowed_clients: []
|
||||
blocked_hosts:
|
||||
- version.bind
|
||||
- id.server
|
||||
- hostname.bind
|
||||
trusted_proxies:
|
||||
- 127.0.0.0/8
|
||||
- ::1/128
|
||||
cache_size: 4194304
|
||||
cache_ttl_min: 0
|
||||
cache_ttl_max: 0
|
||||
cache_optimistic: true
|
||||
bogus_nxdomain: []
|
||||
aaaa_disabled: false
|
||||
enable_dnssec: false
|
||||
edns_client_subnet: false
|
||||
max_goroutines: 300
|
||||
handle_ddr: true
|
||||
ipset: []
|
||||
ipset_file: ""
|
||||
filtering_enabled: true
|
||||
filters_update_interval: 12
|
||||
parental_enabled: true
|
||||
safesearch_enabled: true
|
||||
safebrowsing_enabled: true
|
||||
safebrowsing_cache_size: 1048576
|
||||
safesearch_cache_size: 1048576
|
||||
parental_cache_size: 1048576
|
||||
cache_time: 30
|
||||
rewrites:
|
||||
- domain: foo.bar.com
|
||||
answer: 1.2.3.4
|
||||
blocked_services:
|
||||
- 9gag
|
||||
- dailymotion
|
||||
upstream_timeout: 10s
|
||||
private_networks: []
|
||||
use_private_ptr_resolvers: true
|
||||
local_ptr_upstreams: []
|
||||
serve_http3: false
|
||||
use_http3_upstreams: false
|
||||
tls:
|
||||
enabled: false
|
||||
server_name: ""
|
||||
force_https: false
|
||||
port_https: 443
|
||||
port_dns_over_tls: 853
|
||||
port_dns_over_quic: 853
|
||||
port_dnscrypt: 0
|
||||
dnscrypt_config_file: ""
|
||||
allow_unencrypted_doh: false
|
||||
strict_sni_check: false
|
||||
certificate_chain: ""
|
||||
private_key: ""
|
||||
certificate_path: ""
|
||||
private_key_path: ""
|
||||
filters:
|
||||
- enabled: true
|
||||
url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt
|
||||
name: AdGuard DNS filter
|
||||
id: 1
|
||||
- enabled: true
|
||||
url: https://adaway.org/hosts.txt
|
||||
name: AdAway Default Blocklist
|
||||
id: 2
|
||||
whitelist_filters: []
|
||||
user_rules:
|
||||
- '||metrics2.data.hicloud.com^$important'
|
||||
- '||www.curiouscorrespondence.com^$important'
|
||||
- '||bluewizard.com^$important'
|
||||
- '||facebook.com^$important'
|
||||
dhcp:
|
||||
enabled: false
|
||||
interface_name: eth0
|
||||
local_domain_name: lan
|
||||
dhcpv4:
|
||||
gateway_ip: 1.2.3.4
|
||||
subnet_mask: 255.255.0.0
|
||||
range_start: 1.2.3.5
|
||||
range_end: 1.2.3.56
|
||||
lease_duration: 86400
|
||||
icmp_timeout_msec: 1000
|
||||
options: []
|
||||
dhcpv6:
|
||||
range_start: ""
|
||||
lease_duration: 86400
|
||||
ra_slaac_only: false
|
||||
ra_allow_slaac: false
|
||||
clients:
|
||||
runtime_sources:
|
||||
whois: true
|
||||
arp: true
|
||||
rdns: true
|
||||
dhcp: true
|
||||
hosts: true
|
||||
persistent:
|
||||
- name: Device 1
|
||||
tags:
|
||||
- device_1
|
||||
ids:
|
||||
- 2.2.2.2
|
||||
blocked_services:
|
||||
- facebook
|
||||
- ok
|
||||
- vk
|
||||
- mail_ru
|
||||
- qq
|
||||
upstreams: []
|
||||
use_global_settings: true
|
||||
filtering_enabled: false
|
||||
parental_enabled: false
|
||||
safesearch_enabled: false
|
||||
safebrowsing_enabled: false
|
||||
use_global_blocked_services: false
|
||||
log_file: ""
|
||||
log_max_backups: 0
|
||||
log_max_size: 100
|
||||
log_max_age: 3
|
||||
log_compress: false
|
||||
log_localtime: false
|
||||
verbose: false
|
||||
os:
|
||||
group: ""
|
||||
user: ""
|
||||
rlimit_nofile: 0
|
||||
schema_version: 14
|
||||
17
testdata/e2e/templates/configmap-sync.yaml
vendored
Normal file
17
testdata/e2e/templates/configmap-sync.yaml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: sync-conf
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
API_PORT: "0"
|
||||
LOG_LEVEL: info
|
||||
ORIGIN_URL: http://service-origin.{{ $.Release.Namespace }}.svc.cluster.local:3000
|
||||
ORIGIN_PASSWORD: password
|
||||
ORIGIN_USERNAME: username
|
||||
{{ range $i,$_ := .Values.replica.versions }}
|
||||
REPLICA{{ $i }}_AUTOSETUP: "true"
|
||||
REPLICA{{ $i }}_URL: http://service-replica-{{ $i }}.{{ $.Release.Namespace }}.svc.cluster.local:3000
|
||||
REPLICA{{ $i }}_PASSWORD: password
|
||||
REPLICA{{ $i }}_USERNAME: username
|
||||
{{- end }}
|
||||
37
testdata/e2e/templates/pod-adguardhome-origin.yaml
vendored
Normal file
37
testdata/e2e/templates/pod-adguardhome-origin.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: adguardhome-origin
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: adguardhome-origin
|
||||
bakito.net/adguardhome-sync: origin
|
||||
spec:
|
||||
volumes:
|
||||
- name: configmap
|
||||
configMap:
|
||||
name: origin-conf
|
||||
- name: conf
|
||||
emptyDir: { }
|
||||
|
||||
initContainers:
|
||||
- name: init
|
||||
image: busybox
|
||||
volumeMounts:
|
||||
- mountPath: /opt/adguardhome/configmap
|
||||
name: configmap
|
||||
- mountPath: /opt/adguardhome/conf
|
||||
name: conf
|
||||
command:
|
||||
- cp
|
||||
- /opt/adguardhome/configmap/AdGuardHome.yaml
|
||||
- /opt/adguardhome/conf
|
||||
|
||||
containers:
|
||||
- name: adguardhome
|
||||
image: adguard/adguardhome:latest
|
||||
volumeMounts:
|
||||
- mountPath: /opt/adguardhome/conf
|
||||
name: conf
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
17
testdata/e2e/templates/pod-adguardhome-replica.yaml
vendored
Normal file
17
testdata/e2e/templates/pod-adguardhome-replica.yaml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{{ range $i, $version := .Values.replica.versions }}
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: adguardhome-replica-{{ $i }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: adguardhome-replica-{{ $i }}
|
||||
bakito.net/adguardhome-sync: replica
|
||||
spec:
|
||||
containers:
|
||||
- name: adguardhome
|
||||
image: "adguard/adguardhome:{{ $version }}"
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
---
|
||||
{{- end }}
|
||||
25
testdata/e2e/templates/pod-adguardhome-sync.yaml
vendored
Normal file
25
testdata/e2e/templates/pod-adguardhome-sync.yaml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: adguardhome-sync
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
serviceAccountName: agh-e2e
|
||||
initContainers:
|
||||
- name: wait-for-others
|
||||
image: bitnami/kubectl:1.24
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
{{- .Files.Get "bin/wait-for-agh-pods.sh" | nindent 10}}
|
||||
containers:
|
||||
- name: adguardhome-sync
|
||||
image: ghcr.io/bakito/adguardhome-sync:main
|
||||
command:
|
||||
- /opt/go/adguardhome-sync
|
||||
- run
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: sync-conf
|
||||
restartPolicy: Never
|
||||
32
testdata/e2e/templates/rbac.yaml
vendored
Normal file
32
testdata/e2e/templates/rbac.yaml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: agh-e2e
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: agh-e2e
|
||||
namespace: {{ .Release.Namespace }}
|
||||
rules:
|
||||
- apiGroups: [ "" ]
|
||||
resources: [ "pods" ]
|
||||
verbs: [ "get", "watch", "list" ]
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: agh-e2e
|
||||
namespace: {{ .Release.Namespace }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: agh-e2e
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: agh-e2e
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
12
testdata/e2e/templates/service-origin.yaml
vendored
Normal file
12
testdata/e2e/templates/service-origin.yaml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: service-origin
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: adguardhome-origin
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
14
testdata/e2e/templates/service-replica.yaml
vendored
Normal file
14
testdata/e2e/templates/service-replica.yaml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ range $i ,$_ := .Values.replica.versions }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: service-replica-{{ $i }}
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: adguardhome-replica-{{ $i }}
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
---
|
||||
{{- end }}
|
||||
5
testdata/e2e/values.yaml
vendored
Normal file
5
testdata/e2e/values.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
replica:
|
||||
versions:
|
||||
- latest
|
||||
- v0.107.13
|
||||
- v0.107.15
|
||||
20
testdata/tls-status.json
vendored
Normal file
20
testdata/tls-status.json
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"enabled": false,
|
||||
"port_https": 443,
|
||||
"port_dns_over_tls": 853,
|
||||
"port_dns_over_quic": 784,
|
||||
"port_dnscrypt": 0,
|
||||
"dnscrypt_config_file": "",
|
||||
"allow_unencrypted_doh": false,
|
||||
"certificate_chain": "",
|
||||
"private_key": "",
|
||||
"certificate_path": "",
|
||||
"private_key_path": "",
|
||||
"valid_cert": false,
|
||||
"valid_chain": false,
|
||||
"not_before": "0001-01-01T00:00:00Z",
|
||||
"not_after": "0001-01-01T00:00:00Z",
|
||||
"dns_names": null,
|
||||
"valid_key": false,
|
||||
"valid_pair": false
|
||||
}
|
||||
@@ -3,4 +3,6 @@ package version
|
||||
var (
|
||||
// Version the module version
|
||||
Version = "devel"
|
||||
// Build the build time
|
||||
Build = "N/A"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user