From b09c6d56832eb1718c07d74abf3bc6ae3fe4e030 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:36:04 +0200 Subject: Adding upstream version 1.1.0. Signed-off-by: Daniel Baumann --- .gitattributes | 2 + .github/ISSUE_TEMPLATE/bug_report.md | 37 + .github/ISSUE_TEMPLATE/config.yml | 5 + .github/ISSUE_TEMPLATE/release.md | 19 + .github/dependabot.yml | 12 + .github/workflows/compliance.yml | 20 + .github/workflows/compliance/anonymize-license.pl | 11 + .github/workflows/compliance/check-licenses.sh | 72 + .github/workflows/compliance/ls-deps.pl | 24 + .github/workflows/docker.yml | 21 + .github/workflows/go.yml | 108 + .github/workflows/integration-tests.yml | 55 + .github/workflows/sql.yml | 58 + .github/workflows/version.yml | 25 + .gitignore | 3 + .mailmap | 7 + AUTHORS | 9 + CHANGELOG.md | 22 + LICENSE | 339 + README.md | 23 + cmd/icingadb-migrate/cache.go | 298 + cmd/icingadb-migrate/convert.go | 824 + cmd/icingadb-migrate/embed/comment_query.sql | 11 + cmd/icingadb-migrate/embed/downtime_query.sql | 14 + .../embed/event_time_cache_schema.sql | 15 + cmd/icingadb-migrate/embed/flapping_query.sql | 9 + .../embed/ido_migration_progress_schema.sql | 9 + cmd/icingadb-migrate/embed/notification_query.sql | 9 + .../embed/previous_hard_state_cache_schema.sql | 22 + cmd/icingadb-migrate/embed/state_query.sql | 9 + cmd/icingadb-migrate/main.go | 493 + cmd/icingadb-migrate/misc.go | 317 + cmd/icingadb/main.go | 400 + config.example.yml | 91 + .../download/github.com/!vivid!cortex/ewma/@v/list | 1 + .../github.com/!vivid!cortex/ewma/@v/v1.2.0.info | 1 + .../github.com/!vivid!cortex/ewma/@v/v1.2.0.lock | 0 .../github.com/!vivid!cortex/ewma/@v/v1.2.0.mod | 3 + .../github.com/!vivid!cortex/ewma/@v/v1.2.0.zip | Bin 0 -> 9548 bytes .../!vivid!cortex/ewma/@v/v1.2.0.ziphash | 1 + .../download/github.com/acarl005/stripansi/@v/list | 1 + .../@v/v0.0.0-20180116102854-5a71ef0e047d.info | 1 + .../@v/v0.0.0-20180116102854-5a71ef0e047d.lock | 0 .../@v/v0.0.0-20180116102854-5a71ef0e047d.mod | 1 + .../@v/v0.0.0-20180116102854-5a71ef0e047d.zip | Bin 0 -> 1982 bytes .../@v/v0.0.0-20180116102854-5a71ef0e047d.ziphash | 1 + .../download/github.com/benbjohnson/clock/@v/list | 1 + .../github.com/benbjohnson/clock/@v/v1.1.0.mod | 3 + .../download/github.com/cespare/xxhash/v2/@v/list | 1 + .../github.com/cespare/xxhash/v2/@v/v2.1.2.info | 1 + .../github.com/cespare/xxhash/v2/@v/v2.1.2.lock | 0 .../github.com/cespare/xxhash/v2/@v/v2.1.2.mod | 3 + .../github.com/cespare/xxhash/v2/@v/v2.1.2.zip | Bin 0 -> 15284 bytes .../github.com/cespare/xxhash/v2/@v/v2.1.2.ziphash | 1 + .../download/github.com/creasty/defaults/@v/list | 1 + .../github.com/creasty/defaults/@v/v1.6.0.info | 1 + .../github.com/creasty/defaults/@v/v1.6.0.lock | 0 .../github.com/creasty/defaults/@v/v1.6.0.mod | 3 + .../github.com/creasty/defaults/@v/v1.6.0.zip | Bin 0 -> 9714 bytes .../github.com/creasty/defaults/@v/v1.6.0.ziphash | 1 + .../download/github.com/davecgh/go-spew/@v/list | 2 + .../github.com/davecgh/go-spew/@v/v1.1.0.mod | 1 + .../github.com/davecgh/go-spew/@v/v1.1.1.mod | 1 + .../github.com/dgryski/go-rendezvous/@v/list | 1 + .../@v/v0.0.0-20200823014737-9f7001d12a5f.info | 1 + .../@v/v0.0.0-20200823014737-9f7001d12a5f.lock | 0 .../@v/v0.0.0-20200823014737-9f7001d12a5f.mod | 1 + .../@v/v0.0.0-20200823014737-9f7001d12a5f.zip | Bin 0 -> 2243 bytes .../@v/v0.0.0-20200823014737-9f7001d12a5f.ziphash | 1 + .../cache/download/github.com/fatih/color/@v/list | 2 + .../download/github.com/fatih/color/@v/v1.10.0.mod | 8 + .../github.com/fatih/color/@v/v1.13.0.info | 1 + .../github.com/fatih/color/@v/v1.13.0.lock | 0 .../download/github.com/fatih/color/@v/v1.13.0.mod | 8 + .../download/github.com/fatih/color/@v/v1.13.0.zip | Bin 0 -> 12921 bytes .../github.com/fatih/color/@v/v1.13.0.ziphash | 1 + .../github.com/go-playground/assert/v2/@v/list | 1 + .../go-playground/assert/v2/@v/v2.0.1.mod | 3 + .../github.com/go-playground/locales/@v/list | 1 + .../go-playground/locales/@v/v0.13.0.mod | 5 + .../go-playground/universal-translator/@v/list | 1 + .../universal-translator/@v/v0.17.0.mod | 5 + .../github.com/go-playground/validator/v10/@v/list | 1 + .../go-playground/validator/v10/@v/v10.4.1.mod | 11 + .../download/github.com/go-redis/redis/v8/@v/list | 1 + .../github.com/go-redis/redis/v8/@v/v8.11.5.info | 1 + .../github.com/go-redis/redis/v8/@v/v8.11.5.lock | 0 .../github.com/go-redis/redis/v8/@v/v8.11.5.mod | 20 + .../github.com/go-redis/redis/v8/@v/v8.11.5.zip | Bin 0 -> 176032 bytes .../go-redis/redis/v8/@v/v8.11.5.ziphash | 1 + .../github.com/go-sql-driver/mysql/@v/list | 1 + .../github.com/go-sql-driver/mysql/@v/v1.6.0.info | 1 + .../github.com/go-sql-driver/mysql/@v/v1.6.0.lock | 0 .../github.com/go-sql-driver/mysql/@v/v1.6.0.mod | 3 + .../github.com/go-sql-driver/mysql/@v/v1.6.0.zip | Bin 0 -> 117011 bytes .../go-sql-driver/mysql/@v/v1.6.0.ziphash | 1 + .../download/github.com/goccy/go-yaml/@v/list | 1 + .../github.com/goccy/go-yaml/@v/v1.9.6.info | 1 + .../github.com/goccy/go-yaml/@v/v1.9.6.lock | 0 .../github.com/goccy/go-yaml/@v/v1.9.6.mod | 11 + .../github.com/goccy/go-yaml/@v/v1.9.6.zip | Bin 0 -> 99336 bytes .../github.com/goccy/go-yaml/@v/v1.9.6.ziphash | 1 + .../cache/download/github.com/google/uuid/@v/list | 1 + .../download/github.com/google/uuid/@v/v1.3.0.info | 1 + .../download/github.com/google/uuid/@v/v1.3.0.lock | 0 .../download/github.com/google/uuid/@v/v1.3.0.mod | 1 + .../download/github.com/google/uuid/@v/v1.3.0.zip | Bin 0 -> 25027 bytes .../github.com/google/uuid/@v/v1.3.0.ziphash | 1 + .../download/github.com/jessevdk/go-flags/@v/list | 1 + .../github.com/jessevdk/go-flags/@v/v1.5.0.info | 1 + .../github.com/jessevdk/go-flags/@v/v1.5.0.lock | 0 .../github.com/jessevdk/go-flags/@v/v1.5.0.mod | 5 + .../github.com/jessevdk/go-flags/@v/v1.5.0.zip | Bin 0 -> 77449 bytes .../github.com/jessevdk/go-flags/@v/v1.5.0.ziphash | 1 + .../cache/download/github.com/jmoiron/sqlx/@v/list | 1 + .../github.com/jmoiron/sqlx/@v/v1.3.5.info | 1 + .../github.com/jmoiron/sqlx/@v/v1.3.5.lock | 0 .../download/github.com/jmoiron/sqlx/@v/v1.3.5.mod | 9 + .../download/github.com/jmoiron/sqlx/@v/v1.3.5.zip | Bin 0 -> 64810 bytes .../github.com/jmoiron/sqlx/@v/v1.3.5.ziphash | 1 + .../download/github.com/leodido/go-urn/@v/list | 1 + .../github.com/leodido/go-urn/@v/v1.2.0.mod | 5 + .../mod/cache/download/github.com/lib/pq/@v/list | 2 + .../download/github.com/lib/pq/@v/v1.10.7.info | 1 + .../download/github.com/lib/pq/@v/v1.10.7.lock | 0 .../download/github.com/lib/pq/@v/v1.10.7.mod | 3 + .../download/github.com/lib/pq/@v/v1.10.7.zip | Bin 0 -> 129368 bytes .../download/github.com/lib/pq/@v/v1.10.7.ziphash | 1 + .../cache/download/github.com/lib/pq/@v/v1.2.0.mod | 1 + .../download/github.com/mattn/go-colorable/@v/list | 3 + .../github.com/mattn/go-colorable/@v/v0.1.13.info | 1 + .../github.com/mattn/go-colorable/@v/v0.1.13.lock | 0 .../github.com/mattn/go-colorable/@v/v0.1.13.mod | 5 + .../github.com/mattn/go-colorable/@v/v0.1.13.zip | Bin 0 -> 13909 bytes .../mattn/go-colorable/@v/v0.1.13.ziphash | 1 + .../github.com/mattn/go-colorable/@v/v0.1.8.mod | 8 + .../github.com/mattn/go-colorable/@v/v0.1.9.mod | 8 + .../download/github.com/mattn/go-isatty/@v/list | 3 + .../github.com/mattn/go-isatty/@v/v0.0.12.mod | 5 + .../github.com/mattn/go-isatty/@v/v0.0.14.mod | 5 + .../github.com/mattn/go-isatty/@v/v0.0.16.info | 1 + .../github.com/mattn/go-isatty/@v/v0.0.16.lock | 0 .../github.com/mattn/go-isatty/@v/v0.0.16.mod | 5 + .../github.com/mattn/go-isatty/@v/v0.0.16.zip | Bin 0 -> 8927 bytes .../github.com/mattn/go-isatty/@v/v0.0.16.ziphash | 1 + .../download/github.com/mattn/go-runewidth/@v/list | 2 + .../github.com/mattn/go-runewidth/@v/v0.0.12.lock | 0 .../github.com/mattn/go-runewidth/@v/v0.0.12.mod | 5 + .../github.com/mattn/go-runewidth/@v/v0.0.12.zip | Bin 0 -> 20977 bytes .../mattn/go-runewidth/@v/v0.0.12.ziphash | 1 + .../github.com/mattn/go-runewidth/@v/v0.0.14.info | 1 + .../github.com/mattn/go-runewidth/@v/v0.0.14.mod | 5 + .../download/github.com/mattn/go-sqlite3/@v/list | 2 + .../github.com/mattn/go-sqlite3/@v/v1.14.16.info | 1 + .../github.com/mattn/go-sqlite3/@v/v1.14.16.lock | 0 .../github.com/mattn/go-sqlite3/@v/v1.14.16.mod | 7 + .../github.com/mattn/go-sqlite3/@v/v1.14.16.zip | Bin 0 -> 2544153 bytes .../mattn/go-sqlite3/@v/v1.14.16.ziphash | 1 + .../github.com/mattn/go-sqlite3/@v/v1.14.6.mod | 3 + .../download/github.com/okzk/sdnotify/@v/list | 1 + .../@v/v0.0.0-20180710141335-d9becc38acbd.info | 1 + .../@v/v0.0.0-20180710141335-d9becc38acbd.lock | 0 .../@v/v0.0.0-20180710141335-d9becc38acbd.mod | 1 + .../@v/v0.0.0-20180710141335-d9becc38acbd.zip | Bin 0 -> 3871 bytes .../@v/v0.0.0-20180710141335-d9becc38acbd.ziphash | 1 + .../cache/download/github.com/pkg/errors/@v/list | 2 + .../download/github.com/pkg/errors/@v/v0.8.1.mod | 1 + .../download/github.com/pkg/errors/@v/v0.9.1.info | 1 + .../download/github.com/pkg/errors/@v/v0.9.1.lock | 0 .../download/github.com/pkg/errors/@v/v0.9.1.mod | 1 + .../download/github.com/pkg/errors/@v/v0.9.1.zip | Bin 0 -> 17866 bytes .../github.com/pkg/errors/@v/v0.9.1.ziphash | 1 + .../download/github.com/pmezard/go-difflib/@v/list | 1 + .../github.com/pmezard/go-difflib/@v/v1.0.0.mod | 1 + .../cache/download/github.com/rivo/uniseg/@v/list | 3 + .../download/github.com/rivo/uniseg/@v/v0.1.0.mod | 3 + .../download/github.com/rivo/uniseg/@v/v0.2.0.lock | 0 .../download/github.com/rivo/uniseg/@v/v0.2.0.mod | 3 + .../download/github.com/rivo/uniseg/@v/v0.2.0.zip | Bin 0 -> 45731 bytes .../github.com/rivo/uniseg/@v/v0.2.0.ziphash | 1 + .../download/github.com/rivo/uniseg/@v/v0.4.2.info | 1 + .../download/github.com/rivo/uniseg/@v/v0.4.2.mod | 3 + .../download/github.com/ssgreg/journald/@v/list | 1 + .../github.com/ssgreg/journald/@v/v1.0.0.info | 1 + .../github.com/ssgreg/journald/@v/v1.0.0.lock | 0 .../github.com/ssgreg/journald/@v/v1.0.0.mod | 1 + .../github.com/ssgreg/journald/@v/v1.0.0.zip | Bin 0 -> 12337 bytes .../github.com/ssgreg/journald/@v/v1.0.0.ziphash | 1 + .../download/github.com/stretchr/objx/@v/list | 3 + .../github.com/stretchr/objx/@v/v0.1.0.mod | 1 + .../github.com/stretchr/objx/@v/v0.4.0.mod | 8 + .../github.com/stretchr/objx/@v/v0.5.0.mod | 5 + .../download/github.com/stretchr/testify/@v/list | 5 + .../github.com/stretchr/testify/@v/v1.3.0.mod | 7 + .../github.com/stretchr/testify/@v/v1.4.0.mod | 8 + .../github.com/stretchr/testify/@v/v1.7.1.mod | 10 + .../github.com/stretchr/testify/@v/v1.8.0.mod | 10 + .../github.com/stretchr/testify/@v/v1.8.1.mod | 10 + .../download/github.com/vbauerster/mpb/v6/@v/list | 1 + .../github.com/vbauerster/mpb/v6/@v/v6.0.4.info | 1 + .../github.com/vbauerster/mpb/v6/@v/v6.0.4.lock | 0 .../github.com/vbauerster/mpb/v6/@v/v6.0.4.mod | 11 + .../github.com/vbauerster/mpb/v6/@v/v6.0.4.zip | Bin 0 -> 71664 bytes .../github.com/vbauerster/mpb/v6/@v/v6.0.4.ziphash | 1 + .../mod/cache/download/go.uber.org/atomic/@v/list | 2 + .../download/go.uber.org/atomic/@v/v1.10.0.info | 1 + .../download/go.uber.org/atomic/@v/v1.10.0.mod | 10 + .../download/go.uber.org/atomic/@v/v1.7.0.lock | 0 .../download/go.uber.org/atomic/@v/v1.7.0.mod | 8 + .../download/go.uber.org/atomic/@v/v1.7.0.zip | Bin 0 -> 53254 bytes .../download/go.uber.org/atomic/@v/v1.7.0.ziphash | 1 + .../cache/download/go.uber.org/multierr/@v/list | 2 + .../download/go.uber.org/multierr/@v/v1.6.0.lock | 0 .../download/go.uber.org/multierr/@v/v1.6.0.mod | 8 + .../download/go.uber.org/multierr/@v/v1.6.0.zip | Bin 0 -> 17500 bytes .../go.uber.org/multierr/@v/v1.6.0.ziphash | 1 + .../download/go.uber.org/multierr/@v/v1.8.0.info | 1 + .../download/go.uber.org/multierr/@v/v1.8.0.mod | 9 + .../pkg/mod/cache/download/go.uber.org/zap/@v/list | 1 + .../cache/download/go.uber.org/zap/@v/v1.23.0.info | 1 + .../cache/download/go.uber.org/zap/@v/v1.23.0.lock | 0 .../cache/download/go.uber.org/zap/@v/v1.23.0.mod | 18 + .../cache/download/go.uber.org/zap/@v/v1.23.0.zip | Bin 0 -> 270932 bytes .../download/go.uber.org/zap/@v/v1.23.0.ziphash | 1 + .../mod/cache/download/golang.org/x/crypto/@v/list | 2 + .../@v/v0.0.0-20190308221718-c2843e01d9a2.mod | 3 + .../@v/v0.0.0-20200622213623-75b288015ac9.mod | 8 + .../mod/cache/download/golang.org/x/exp/@v/list | 2 + .../exp/@v/v0.0.0-20220613132600-b0d781184e0d.lock | 0 .../exp/@v/v0.0.0-20220613132600-b0d781184e0d.mod | 14 + .../exp/@v/v0.0.0-20220613132600-b0d781184e0d.zip | Bin 0 -> 365649 bytes .../@v/v0.0.0-20220613132600-b0d781184e0d.ziphash | 1 + .../exp/@v/v0.0.0-20221109134031-9ce248df8de5.info | 1 + .../exp/@v/v0.0.0-20221109134031-9ce248df8de5.mod | 11 + .../mod/cache/download/golang.org/x/net/@v/list | 1 + .../net/@v/v0.0.0-20190404232315-eb5bcb51f2a3.mod | 6 + .../mod/cache/download/golang.org/x/sync/@v/list | 2 + .../@v/v0.0.0-20210220032951-036812b2e83c.lock | 0 .../sync/@v/v0.0.0-20210220032951-036812b2e83c.mod | 1 + .../sync/@v/v0.0.0-20210220032951-036812b2e83c.zip | Bin 0 -> 28693 bytes .../@v/v0.0.0-20210220032951-036812b2e83c.ziphash | 1 + .../download/golang.org/x/sync/@v/v0.1.0.info | 1 + .../cache/download/golang.org/x/sync/@v/v0.1.0.mod | 1 + .../mod/cache/download/golang.org/x/sys/@v/list | 13 + .../sys/@v/v0.0.0-20190215142949-d0b11bdaac8a.mod | 1 + .../sys/@v/v0.0.0-20190412213103-97732733099d.mod | 3 + .../sys/@v/v0.0.0-20200116001909-b77594299b42.mod | 3 + .../sys/@v/v0.0.0-20200223170610-d5e6a3e2c0ae.mod | 3 + .../sys/@v/v0.0.0-20210320140829-1e4c9ba3b0c4.mod | 3 + .../sys/@v/v0.0.0-20210514084401-e8d321eab015.mod | 3 + .../sys/@v/v0.0.0-20210630005230-0f9fa26af87c.mod | 3 + .../sys/@v/v0.0.0-20211019181941-9d821ace8654.mod | 3 + .../sys/@v/v0.0.0-20211216021012-1d35b9e2eb4e.mod | 3 + .../sys/@v/v0.0.0-20220406163625-3f8b81556e12.mod | 3 + .../sys/@v/v0.0.0-20220811171246-fbc7d0a398ab.mod | 3 + .../cache/download/golang.org/x/sys/@v/v0.1.0.lock | 0 .../cache/download/golang.org/x/sys/@v/v0.1.0.mod | 3 + .../cache/download/golang.org/x/sys/@v/v0.1.0.zip | Bin 0 -> 1861264 bytes .../download/golang.org/x/sys/@v/v0.1.0.ziphash | 1 + .../cache/download/golang.org/x/sys/@v/v0.2.0.info | 1 + .../cache/download/golang.org/x/sys/@v/v0.2.0.mod | 3 + .../mod/cache/download/golang.org/x/text/@v/list | 2 + .../cache/download/golang.org/x/text/@v/v0.3.0.mod | 1 + .../cache/download/golang.org/x/text/@v/v0.3.2.mod | 3 + .../mod/cache/download/golang.org/x/tools/@v/list | 1 + .../@v/v0.0.0-20180917221912-90fa682c2a6e.mod | 1 + .../cache/download/golang.org/x/xerrors/@v/list | 2 + .../@v/v0.0.0-20200804184101-5ec99f83aff1.mod | 3 + .../@v/v0.0.0-20220907171357-04be3eba64a2.info | 1 + .../@v/v0.0.0-20220907171357-04be3eba64a2.lock | 0 .../@v/v0.0.0-20220907171357-04be3eba64a2.mod | 3 + .../@v/v0.0.0-20220907171357-04be3eba64a2.zip | Bin 0 -> 22397 bytes .../@v/v0.0.0-20220907171357-04be3eba64a2.ziphash | 1 + .../mod/cache/download/gopkg.in/check.v1/@v/list | 1 + .../@v/v0.0.0-20161208181325-20d25e280405.mod | 1 + .../mod/cache/download/gopkg.in/yaml.v2/@v/list | 1 + .../cache/download/gopkg.in/yaml.v2/@v/v2.2.2.mod | 5 + .../mod/cache/download/gopkg.in/yaml.v3/@v/list | 2 + .../@v/v3.0.0-20200313102051-9f266ea9e77c.mod | 5 + .../cache/download/gopkg.in/yaml.v3/@v/v3.0.1.mod | 5 + .../lookup/github.com/mattn/go-runewidth@v0.0.14 | 9 + .../lookup/github.com/pkg/errors@v0.8.1 | 9 + .../lookup/github.com/rivo/uniseg@v0.4.2 | 9 + .../lookup/go.uber.org/atomic@v1.10.0 | 9 + .../lookup/go.uber.org/multierr@v1.8.0 | 9 + .../x/exp@v0.0.0-20221109134031-9ce248df8de5 | 9 + .../sum.golang.org/lookup/golang.org/x/sync@v0.1.0 | 9 + .../x/sys@v0.0.0-20211019181941-9d821ace8654 | 9 + .../x/sys@v0.0.0-20211216021012-1d35b9e2eb4e | 9 + .../sum.golang.org/lookup/golang.org/x/sys@v0.2.0 | 9 + .../download/sumdb/sum.golang.org/tile/8/0/000 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x028/707 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x032/849 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x036/719 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x046/341 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x047/906 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x051/223 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x052/907 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x053/981 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x054/073 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x054/074 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x054/074.p/110 | Bin 0 -> 3520 bytes .../sumdb/sum.golang.org/tile/8/0/x054/075 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x054/076 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x054/077 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/0/x054/081.p/113 | Bin 0 -> 3616 bytes .../download/sumdb/sum.golang.org/tile/8/1/000 | Bin 0 -> 8192 bytes .../download/sumdb/sum.golang.org/tile/8/1/112 | Bin 0 -> 8192 bytes .../download/sumdb/sum.golang.org/tile/8/1/128 | Bin 0 -> 8192 bytes .../download/sumdb/sum.golang.org/tile/8/1/143 | Bin 0 -> 8192 bytes .../download/sumdb/sum.golang.org/tile/8/1/181 | Bin 0 -> 8192 bytes .../download/sumdb/sum.golang.org/tile/8/1/187 | Bin 0 -> 8192 bytes .../download/sumdb/sum.golang.org/tile/8/1/200 | Bin 0 -> 8192 bytes .../download/sumdb/sum.golang.org/tile/8/1/206 | Bin 0 -> 8192 bytes .../download/sumdb/sum.golang.org/tile/8/1/210 | Bin 0 -> 8192 bytes .../sumdb/sum.golang.org/tile/8/1/211.p/58 | Bin 0 -> 1856 bytes .../sumdb/sum.golang.org/tile/8/1/211.p/65 | Bin 0 -> 2080 bytes .../sumdb/sum.golang.org/tile/8/2/000.p/211 | Bin 0 -> 6752 bytes .../ewma@v1.2.0/.github/ISSUE_TEMPLATE.md | 10 + .../ewma@v1.2.0/.github/PULL_REQUEST_TEMPLATE.md | 10 + .../ewma@v1.2.0/.github/workflows/build.yml | 56 + .../!vivid!cortex/ewma@v1.2.0/.gitignore | 3 + .../!vivid!cortex/ewma@v1.2.0/.whitesource | 3 + .../github.com/!vivid!cortex/ewma@v1.2.0/LICENSE | 21 + .../github.com/!vivid!cortex/ewma@v1.2.0/README.md | 145 + .../!vivid!cortex/ewma@v1.2.0/codecov.yml | 6 + .../github.com/!vivid!cortex/ewma@v1.2.0/ewma.go | 126 + .../!vivid!cortex/ewma@v1.2.0/ewma_test.go | 103 + .../github.com/!vivid!cortex/ewma@v1.2.0/go.mod | 3 + .../LICENSE | 21 + .../README.md | 30 + .../stripansi.go | 13 + .../xxhash/v2@v2.1.2/.github/workflows/test.yml | 32 + .../cespare/xxhash/v2@v2.1.2/LICENSE.txt | 22 + .../github.com/cespare/xxhash/v2@v2.1.2/README.md | 69 + .../cespare/xxhash/v2@v2.1.2/bench_test.go | 74 + .../cespare/xxhash/v2@v2.1.2/dynamic/.gitignore | 1 + .../xxhash/v2@v2.1.2/dynamic/dynamic_test.go | 46 + .../cespare/xxhash/v2@v2.1.2/dynamic/plugin.go | 46 + .../mod/github.com/cespare/xxhash/v2@v2.1.2/go.mod | 3 + .../mod/github.com/cespare/xxhash/v2@v2.1.2/go.sum | 0 .../github.com/cespare/xxhash/v2@v2.1.2/xxhash.go | 235 + .../cespare/xxhash/v2@v2.1.2/xxhash_amd64.go | 13 + .../cespare/xxhash/v2@v2.1.2/xxhash_amd64.s | 215 + .../cespare/xxhash/v2@v2.1.2/xxhash_other.go | 76 + .../cespare/xxhash/v2@v2.1.2/xxhash_safe.go | 15 + .../cespare/xxhash/v2@v2.1.2/xxhash_test.go | 166 + .../cespare/xxhash/v2@v2.1.2/xxhash_unsafe.go | 57 + .../cespare/xxhash/v2@v2.1.2/xxhash_unsafe_test.go | 61 + .../cespare/xxhash/v2@v2.1.2/xxhsum/.gitignore | 1 + .../cespare/xxhash/v2@v2.1.2/xxhsum/xxhsum.go | 50 + .../creasty/defaults@v1.6.0/.circleci/config.yml | 26 + .../github.com/creasty/defaults@v1.6.0/.gitignore | 1 + .../mod/github.com/creasty/defaults@v1.6.0/LICENSE | 22 + .../github.com/creasty/defaults@v1.6.0/Makefile | 30 + .../github.com/creasty/defaults@v1.6.0/README.md | 73 + .../github.com/creasty/defaults@v1.6.0/defaults.go | 221 + .../creasty/defaults@v1.6.0/defaults_test.go | 722 + .../mod/github.com/creasty/defaults@v1.6.0/go.mod | 3 + .../mod/github.com/creasty/defaults@v1.6.0/go.sum | 0 .../defaults@v1.6.0/internal/fixture/test.go | 7 + .../github.com/creasty/defaults@v1.6.0/setter.go | 12 + .../LICENSE | 21 + .../rdv.go | 79 + .../rdv_test.go | 18 + .../fatih/color@v1.13.0/.github/dependabot.yml | 6 + .../fatih/color@v1.13.0/.github/workflows/go.yml | 40 + .../mod/github.com/fatih/color@v1.13.0/LICENSE.md | 20 + .../mod/github.com/fatih/color@v1.13.0/README.md | 178 + .../mod/github.com/fatih/color@v1.13.0/color.go | 618 + .../github.com/fatih/color@v1.13.0/color_test.go | 385 + .../pkg/mod/github.com/fatih/color@v1.13.0/doc.go | 135 + .../pkg/mod/github.com/fatih/color@v1.13.0/go.mod | 8 + .../pkg/mod/github.com/fatih/color@v1.13.0/go.sum | 9 + .../go-redis/redis/v8@v8.11.5/.github/FUNDING.yml | 1 + .../.github/ISSUE_TEMPLATE/bug_report.md | 49 + .../v8@v8.11.5/.github/ISSUE_TEMPLATE/config.yml | 5 + .../redis/v8@v8.11.5/.github/dependabot.yml | 10 + .../redis/v8@v8.11.5/.github/workflows/build.yml | 36 + .../v8@v8.11.5/.github/workflows/commitlint.yml | 11 + .../v8@v8.11.5/.github/workflows/golangci-lint.yml | 19 + .../redis/v8@v8.11.5/.github/workflows/release.yml | 17 + .../go-redis/redis/v8@v8.11.5/.gitignore | 3 + .../go-redis/redis/v8@v8.11.5/.golangci.yml | 4 + .../go-redis/redis/v8@v8.11.5/.prettierrc.yml | 4 + .../go-redis/redis/v8@v8.11.5/CHANGELOG.md | 177 + .../github.com/go-redis/redis/v8@v8.11.5/LICENSE | 25 + .../github.com/go-redis/redis/v8@v8.11.5/Makefile | 35 + .../github.com/go-redis/redis/v8@v8.11.5/README.md | 175 + .../go-redis/redis/v8@v8.11.5/RELEASING.md | 15 + .../go-redis/redis/v8@v8.11.5/bench_decode_test.go | 309 + .../go-redis/redis/v8@v8.11.5/bench_test.go | 412 + .../go-redis/redis/v8@v8.11.5/cluster.go | 1750 + .../go-redis/redis/v8@v8.11.5/cluster_commands.go | 109 + .../go-redis/redis/v8@v8.11.5/cluster_test.go | 1283 + .../go-redis/redis/v8@v8.11.5/command.go | 3478 + .../go-redis/redis/v8@v8.11.5/command_test.go | 96 + .../go-redis/redis/v8@v8.11.5/commands.go | 3475 + .../go-redis/redis/v8@v8.11.5/commands_test.go | 5522 + .../github.com/go-redis/redis/v8@v8.11.5/doc.go | 4 + .../github.com/go-redis/redis/v8@v8.11.5/error.go | 144 + .../v8@v8.11.5/example_instrumentation_test.go | 80 + .../go-redis/redis/v8@v8.11.5/example_test.go | 634 + .../go-redis/redis/v8@v8.11.5/export_test.go | 95 + .../go-redis/redis/v8@v8.11.5/fuzz/fuzz.go | 49 + .../github.com/go-redis/redis/v8@v8.11.5/go.mod | 20 + .../github.com/go-redis/redis/v8@v8.11.5/go.sum | 108 + .../go-redis/redis/v8@v8.11.5/internal/arg.go | 56 + .../redis/v8@v8.11.5/internal/hashtag/hashtag.go | 78 + .../v8@v8.11.5/internal/hashtag/hashtag_test.go | 71 + .../redis/v8@v8.11.5/internal/hscan/hscan.go | 201 + .../redis/v8@v8.11.5/internal/hscan/hscan_test.go | 178 + .../redis/v8@v8.11.5/internal/hscan/structmap.go | 93 + .../go-redis/redis/v8@v8.11.5/internal/internal.go | 29 + .../redis/v8@v8.11.5/internal/internal_test.go | 18 + .../go-redis/redis/v8@v8.11.5/internal/log.go | 26 + .../go-redis/redis/v8@v8.11.5/internal/once.go | 60 + .../redis/v8@v8.11.5/internal/pool/bench_test.go | 97 + .../redis/v8@v8.11.5/internal/pool/conn.go | 121 + .../redis/v8@v8.11.5/internal/pool/export_test.go | 9 + .../redis/v8@v8.11.5/internal/pool/main_test.go | 36 + .../redis/v8@v8.11.5/internal/pool/pool.go | 557 + .../redis/v8@v8.11.5/internal/pool/pool_single.go | 58 + .../redis/v8@v8.11.5/internal/pool/pool_sticky.go | 201 + .../redis/v8@v8.11.5/internal/pool/pool_test.go | 458 + .../redis/v8@v8.11.5/internal/proto/proto_test.go | 13 + .../redis/v8@v8.11.5/internal/proto/reader.go | 332 + .../redis/v8@v8.11.5/internal/proto/reader_test.go | 72 + .../redis/v8@v8.11.5/internal/proto/scan.go | 180 + .../redis/v8@v8.11.5/internal/proto/scan_test.go | 50 + .../redis/v8@v8.11.5/internal/proto/writer.go | 155 + .../redis/v8@v8.11.5/internal/proto/writer_test.go | 93 + .../redis/v8@v8.11.5/internal/rand/rand.go | 50 + .../go-redis/redis/v8@v8.11.5/internal/safe.go | 12 + .../go-redis/redis/v8@v8.11.5/internal/unsafe.go | 21 + .../go-redis/redis/v8@v8.11.5/internal/util.go | 46 + .../redis/v8@v8.11.5/internal/util/safe.go | 12 + .../redis/v8@v8.11.5/internal/util/strconv.go | 19 + .../redis/v8@v8.11.5/internal/util/unsafe.go | 23 + .../go-redis/redis/v8@v8.11.5/internal_test.go | 67 + .../go-redis/redis/v8@v8.11.5/iterator.go | 77 + .../go-redis/redis/v8@v8.11.5/iterator_test.go | 136 + .../go-redis/redis/v8@v8.11.5/main_test.go | 448 + .../go-redis/redis/v8@v8.11.5/options.go | 429 + .../go-redis/redis/v8@v8.11.5/options_test.go | 216 + .../go-redis/redis/v8@v8.11.5/package.json | 8 + .../go-redis/redis/v8@v8.11.5/pipeline.go | 147 + .../go-redis/redis/v8@v8.11.5/pipeline_test.go | 104 + .../go-redis/redis/v8@v8.11.5/pool_test.go | 157 + .../github.com/go-redis/redis/v8@v8.11.5/pubsub.go | 668 + .../go-redis/redis/v8@v8.11.5/pubsub_test.go | 495 + .../go-redis/redis/v8@v8.11.5/race_test.go | 392 + .../github.com/go-redis/redis/v8@v8.11.5/redis.go | 773 + .../go-redis/redis/v8@v8.11.5/redis_test.go | 449 + .../github.com/go-redis/redis/v8@v8.11.5/result.go | 180 + .../github.com/go-redis/redis/v8@v8.11.5/ring.go | 736 + .../go-redis/redis/v8@v8.11.5/ring_test.go | 645 + .../github.com/go-redis/redis/v8@v8.11.5/script.go | 65 + .../go-redis/redis/v8@v8.11.5/scripts/bump_deps.sh | 9 + .../go-redis/redis/v8@v8.11.5/scripts/release.sh | 69 + .../go-redis/redis/v8@v8.11.5/scripts/tag.sh | 42 + .../go-redis/redis/v8@v8.11.5/sentinel.go | 796 + .../go-redis/redis/v8@v8.11.5/sentinel_test.go | 287 + .../go-redis/redis/v8@v8.11.5/testdata/redis.conf | 10 + .../mod/github.com/go-redis/redis/v8@v8.11.5/tx.go | 149 + .../go-redis/redis/v8@v8.11.5/tx_test.go | 151 + .../go-redis/redis/v8@v8.11.5/universal.go | 215 + .../go-redis/redis/v8@v8.11.5/universal_test.go | 40 + .../go-redis/redis/v8@v8.11.5/version.go | 6 + .../mysql@v1.6.0/.github/CONTRIBUTING.md | 23 + .../mysql@v1.6.0/.github/ISSUE_TEMPLATE.md | 21 + .../mysql@v1.6.0/.github/PULL_REQUEST_TEMPLATE.md | 9 + .../mysql@v1.6.0/.github/workflows/test.yml | 104 + .../go-sql-driver/mysql@v1.6.0/.gitignore | 9 + .../github.com/go-sql-driver/mysql@v1.6.0/AUTHORS | 117 + .../go-sql-driver/mysql@v1.6.0/CHANGELOG.md | 232 + .../github.com/go-sql-driver/mysql@v1.6.0/LICENSE | 373 + .../go-sql-driver/mysql@v1.6.0/README.md | 520 + .../github.com/go-sql-driver/mysql@v1.6.0/auth.go | 425 + .../go-sql-driver/mysql@v1.6.0/auth_test.go | 1330 + .../go-sql-driver/mysql@v1.6.0/benchmark_test.go | 374 + .../go-sql-driver/mysql@v1.6.0/buffer.go | 182 + .../go-sql-driver/mysql@v1.6.0/collations.go | 265 + .../go-sql-driver/mysql@v1.6.0/conncheck.go | 54 + .../go-sql-driver/mysql@v1.6.0/conncheck_dummy.go | 17 + .../go-sql-driver/mysql@v1.6.0/conncheck_test.go | 38 + .../go-sql-driver/mysql@v1.6.0/connection.go | 650 + .../go-sql-driver/mysql@v1.6.0/connection_test.go | 203 + .../go-sql-driver/mysql@v1.6.0/connector.go | 146 + .../go-sql-driver/mysql@v1.6.0/connector_test.go | 30 + .../github.com/go-sql-driver/mysql@v1.6.0/const.go | 174 + .../go-sql-driver/mysql@v1.6.0/driver.go | 107 + .../go-sql-driver/mysql@v1.6.0/driver_test.go | 3211 + .../github.com/go-sql-driver/mysql@v1.6.0/dsn.go | 560 + .../go-sql-driver/mysql@v1.6.0/dsn_test.go | 415 + .../go-sql-driver/mysql@v1.6.0/errors.go | 65 + .../go-sql-driver/mysql@v1.6.0/errors_test.go | 42 + .../go-sql-driver/mysql@v1.6.0/fields.go | 194 + .../github.com/go-sql-driver/mysql@v1.6.0/fuzz.go | 24 + .../github.com/go-sql-driver/mysql@v1.6.0/go.mod | 3 + .../go-sql-driver/mysql@v1.6.0/infile.go | 182 + .../go-sql-driver/mysql@v1.6.0/nulltime.go | 50 + .../go-sql-driver/mysql@v1.6.0/nulltime_go113.go | 40 + .../go-sql-driver/mysql@v1.6.0/nulltime_legacy.go | 39 + .../go-sql-driver/mysql@v1.6.0/nulltime_test.go | 62 + .../go-sql-driver/mysql@v1.6.0/packets.go | 1349 + .../go-sql-driver/mysql@v1.6.0/packets_test.go | 336 + .../go-sql-driver/mysql@v1.6.0/result.go | 22 + .../github.com/go-sql-driver/mysql@v1.6.0/rows.go | 223 + .../go-sql-driver/mysql@v1.6.0/statement.go | 220 + .../go-sql-driver/mysql@v1.6.0/statement_test.go | 151 + .../go-sql-driver/mysql@v1.6.0/transaction.go | 31 + .../github.com/go-sql-driver/mysql@v1.6.0/utils.go | 868 + .../go-sql-driver/mysql@v1.6.0/utils_test.go | 508 + .../github.com/goccy/go-yaml@v1.9.6/.codecov.yml | 31 + .../goccy/go-yaml@v1.9.6/.github/FUNDING.yml | 1 + .../goccy/go-yaml@v1.9.6/.github/workflows/go.yml | 58 + .../github.com/goccy/go-yaml@v1.9.6/CHANGELOG.md | 124 + .../mod/github.com/goccy/go-yaml@v1.9.6/LICENSE | 21 + .../mod/github.com/goccy/go-yaml@v1.9.6/Makefile | 15 + .../mod/github.com/goccy/go-yaml@v1.9.6/README.md | 370 + .../mod/github.com/goccy/go-yaml@v1.9.6/ast/ast.go | 2100 + .../goccy/go-yaml@v1.9.6/ast/ast_test.go | 36 + .../goccy/go-yaml@v1.9.6/cmd/ycat/ycat.go | 83 + .../mod/github.com/goccy/go-yaml@v1.9.6/decode.go | 1625 + .../github.com/goccy/go-yaml@v1.9.6/decode_test.go | 2734 + .../mod/github.com/goccy/go-yaml@v1.9.6/encode.go | 741 + .../github.com/goccy/go-yaml@v1.9.6/encode_test.go | 1475 + .../mod/github.com/goccy/go-yaml@v1.9.6/error.go | 54 + .../pkg/mod/github.com/goccy/go-yaml@v1.9.6/go.mod | 11 + .../pkg/mod/github.com/goccy/go-yaml@v1.9.6/go.sum | 43 + .../goccy/go-yaml@v1.9.6/internal/errors/error.go | 260 + .../github.com/goccy/go-yaml@v1.9.6/lexer/lexer.go | 23 + .../goccy/go-yaml@v1.9.6/lexer/lexer_test.go | 467 + .../mod/github.com/goccy/go-yaml@v1.9.6/option.go | 237 + .../goccy/go-yaml@v1.9.6/parser/context.go | 199 + .../goccy/go-yaml@v1.9.6/parser/parser.go | 671 + .../goccy/go-yaml@v1.9.6/parser/parser_test.go | 868 + .../goccy/go-yaml@v1.9.6/parser/testdata/cr.yml | 1 + .../goccy/go-yaml@v1.9.6/parser/testdata/crlf.yml | 3 + .../goccy/go-yaml@v1.9.6/parser/testdata/lf.yml | 3 + .../mod/github.com/goccy/go-yaml@v1.9.6/path.go | 794 + .../github.com/goccy/go-yaml@v1.9.6/path_test.go | 659 + .../goccy/go-yaml@v1.9.6/printer/printer.go | 352 + .../goccy/go-yaml@v1.9.6/printer/printer_test.go | 223 + .../goccy/go-yaml@v1.9.6/scanner/context.go | 201 + .../goccy/go-yaml@v1.9.6/scanner/scanner.go | 876 + .../goccy/go-yaml@v1.9.6/stdlib_quote.go | 103 + .../mod/github.com/goccy/go-yaml@v1.9.6/struct.go | 130 + .../goccy/go-yaml@v1.9.6/testdata/anchor.yml | 3 + .../github.com/goccy/go-yaml@v1.9.6/token/token.go | 1036 + .../goccy/go-yaml@v1.9.6/token/token_test.go | 118 + .../github.com/goccy/go-yaml@v1.9.6/validate.go | 13 + .../goccy/go-yaml@v1.9.6/validate_test.go | 198 + .../mod/github.com/goccy/go-yaml@v1.9.6/yaml.go | 250 + .../github.com/goccy/go-yaml@v1.9.6/yaml_test.go | 584 + .../mod/github.com/google/uuid@v1.3.0/.travis.yml | 9 + .../github.com/google/uuid@v1.3.0/CONTRIBUTING.md | 10 + .../mod/github.com/google/uuid@v1.3.0/CONTRIBUTORS | 9 + .../pkg/mod/github.com/google/uuid@v1.3.0/LICENSE | 27 + .../mod/github.com/google/uuid@v1.3.0/README.md | 19 + .../pkg/mod/github.com/google/uuid@v1.3.0/dce.go | 80 + .../pkg/mod/github.com/google/uuid@v1.3.0/doc.go | 12 + .../pkg/mod/github.com/google/uuid@v1.3.0/go.mod | 1 + .../pkg/mod/github.com/google/uuid@v1.3.0/hash.go | 53 + .../mod/github.com/google/uuid@v1.3.0/json_test.go | 62 + .../mod/github.com/google/uuid@v1.3.0/marshal.go | 38 + .../pkg/mod/github.com/google/uuid@v1.3.0/node.go | 90 + .../mod/github.com/google/uuid@v1.3.0/node_js.go | 12 + .../mod/github.com/google/uuid@v1.3.0/node_net.go | 33 + .../pkg/mod/github.com/google/uuid@v1.3.0/null.go | 118 + .../mod/github.com/google/uuid@v1.3.0/null_test.go | 214 + .../mod/github.com/google/uuid@v1.3.0/seq_test.go | 66 + .../pkg/mod/github.com/google/uuid@v1.3.0/sql.go | 59 + .../mod/github.com/google/uuid@v1.3.0/sql_test.go | 113 + .../pkg/mod/github.com/google/uuid@v1.3.0/time.go | 123 + .../pkg/mod/github.com/google/uuid@v1.3.0/util.go | 43 + .../pkg/mod/github.com/google/uuid@v1.3.0/uuid.go | 294 + .../mod/github.com/google/uuid@v1.3.0/uuid_test.go | 702 + .../mod/github.com/google/uuid@v1.3.0/version1.go | 44 + .../mod/github.com/google/uuid@v1.3.0/version4.go | 76 + .../jessevdk/go-flags@v1.5.0/.travis.yml | 39 + .../github.com/jessevdk/go-flags@v1.5.0/LICENSE | 26 + .../github.com/jessevdk/go-flags@v1.5.0/README.md | 139 + .../mod/github.com/jessevdk/go-flags@v1.5.0/arg.go | 27 + .../jessevdk/go-flags@v1.5.0/arg_test.go | 163 + .../jessevdk/go-flags@v1.5.0/assert_test.go | 177 + .../jessevdk/go-flags@v1.5.0/check_crosscompile.sh | 20 + .../github.com/jessevdk/go-flags@v1.5.0/closest.go | 59 + .../github.com/jessevdk/go-flags@v1.5.0/command.go | 465 + .../jessevdk/go-flags@v1.5.0/command_test.go | 650 + .../jessevdk/go-flags@v1.5.0/completion.go | 315 + .../jessevdk/go-flags@v1.5.0/completion_test.go | 339 + .../github.com/jessevdk/go-flags@v1.5.0/convert.go | 357 + .../jessevdk/go-flags@v1.5.0/convert_test.go | 159 + .../github.com/jessevdk/go-flags@v1.5.0/error.go | 138 + .../jessevdk/go-flags@v1.5.0/example_test.go | 110 + .../jessevdk/go-flags@v1.5.0/examples/add.go | 23 + .../go-flags@v1.5.0/examples/bash-completion | 9 + .../jessevdk/go-flags@v1.5.0/examples/main.go | 83 + .../jessevdk/go-flags@v1.5.0/examples/rm.go | 23 + .../github.com/jessevdk/go-flags@v1.5.0/flags.go | 263 + .../mod/github.com/jessevdk/go-flags@v1.5.0/go.mod | 5 + .../mod/github.com/jessevdk/go-flags@v1.5.0/go.sum | 2 + .../github.com/jessevdk/go-flags@v1.5.0/group.go | 429 + .../jessevdk/go-flags@v1.5.0/group_test.go | 271 + .../github.com/jessevdk/go-flags@v1.5.0/help.go | 514 + .../jessevdk/go-flags@v1.5.0/help_test.go | 608 + .../mod/github.com/jessevdk/go-flags@v1.5.0/ini.go | 615 + .../jessevdk/go-flags@v1.5.0/ini_test.go | 1170 + .../jessevdk/go-flags@v1.5.0/long_test.go | 85 + .../mod/github.com/jessevdk/go-flags@v1.5.0/man.go | 223 + .../jessevdk/go-flags@v1.5.0/marshal_test.go | 119 + .../jessevdk/go-flags@v1.5.0/multitag.go | 140 + .../github.com/jessevdk/go-flags@v1.5.0/option.go | 569 + .../jessevdk/go-flags@v1.5.0/options_test.go | 143 + .../jessevdk/go-flags@v1.5.0/optstyle_other.go | 67 + .../jessevdk/go-flags@v1.5.0/optstyle_windows.go | 108 + .../github.com/jessevdk/go-flags@v1.5.0/parser.go | 714 + .../jessevdk/go-flags@v1.5.0/parser_test.go | 682 + .../jessevdk/go-flags@v1.5.0/pointer_test.go | 164 + .../jessevdk/go-flags@v1.5.0/short_test.go | 234 + .../jessevdk/go-flags@v1.5.0/tag_test.go | 38 + .../jessevdk/go-flags@v1.5.0/termsize.go | 15 + .../go-flags@v1.5.0/termsize_nosysioctl.go | 7 + .../jessevdk/go-flags@v1.5.0/termsize_windows.go | 85 + .../jessevdk/go-flags@v1.5.0/unknown_test.go | 66 + .../mod/github.com/jmoiron/sqlx@v1.3.5/.gitignore | 25 + .../mod/github.com/jmoiron/sqlx@v1.3.5/.travis.yml | 26 + .../pkg/mod/github.com/jmoiron/sqlx@v1.3.5/LICENSE | 23 + .../mod/github.com/jmoiron/sqlx@v1.3.5/README.md | 213 + .../pkg/mod/github.com/jmoiron/sqlx@v1.3.5/bind.go | 265 + .../github.com/jmoiron/sqlx@v1.3.5/bind_test.go | 79 + .../pkg/mod/github.com/jmoiron/sqlx@v1.3.5/doc.go | 12 + .../pkg/mod/github.com/jmoiron/sqlx@v1.3.5/go.mod | 9 + .../pkg/mod/github.com/jmoiron/sqlx@v1.3.5/go.sum | 6 + .../mod/github.com/jmoiron/sqlx@v1.3.5/named.go | 458 + .../jmoiron/sqlx@v1.3.5/named_context.go | 132 + .../jmoiron/sqlx@v1.3.5/named_context_test.go | 136 + .../github.com/jmoiron/sqlx@v1.3.5/named_test.go | 435 + .../jmoiron/sqlx@v1.3.5/reflectx/README.md | 17 + .../jmoiron/sqlx@v1.3.5/reflectx/reflect.go | 444 + .../jmoiron/sqlx@v1.3.5/reflectx/reflect_test.go | 1013 + .../pkg/mod/github.com/jmoiron/sqlx@v1.3.5/sqlx.go | 1051 + .../github.com/jmoiron/sqlx@v1.3.5/sqlx_context.go | 414 + .../jmoiron/sqlx@v1.3.5/sqlx_context_test.go | 1426 + .../github.com/jmoiron/sqlx@v1.3.5/sqlx_test.go | 1926 + .../github.com/jmoiron/sqlx@v1.3.5/types/README.md | 5 + .../github.com/jmoiron/sqlx@v1.3.5/types/types.go | 172 + .../jmoiron/sqlx@v1.3.5/types/types_test.go | 127 + .../.github/workflows/codeql-analysis.yml | 26 + .../lib/pq@v1.10.7/.github/workflows/test.yml | 211 + .../pkg/mod/github.com/lib/pq@v1.10.7/.gitignore | 6 + .../pkg/mod/github.com/lib/pq@v1.10.7/LICENSE.md | 8 + .../pkg/mod/github.com/lib/pq@v1.10.7/README.md | 36 + .../pkg/mod/github.com/lib/pq@v1.10.7/TESTS.md | 33 + .../pkg/mod/github.com/lib/pq@v1.10.7/array.go | 895 + .../mod/github.com/lib/pq@v1.10.7/array_test.go | 1652 + .../mod/github.com/lib/pq@v1.10.7/bench_test.go | 434 + .../pkg/mod/github.com/lib/pq@v1.10.7/buf.go | 91 + .../pkg/mod/github.com/lib/pq@v1.10.7/buf_test.go | 16 + .../mod/github.com/lib/pq@v1.10.7/certs/Makefile | 37 + .../pkg/mod/github.com/lib/pq@v1.10.7/certs/README | 3 + .../github.com/lib/pq@v1.10.7/certs/bogus_root.crt | 19 + .../github.com/lib/pq@v1.10.7/certs/postgresql.cnf | 10 + .../github.com/lib/pq@v1.10.7/certs/postgresql.crt | 20 + .../github.com/lib/pq@v1.10.7/certs/postgresql.key | 28 + .../mod/github.com/lib/pq@v1.10.7/certs/root.cnf | 10 + .../mod/github.com/lib/pq@v1.10.7/certs/root.crt | 24 + .../mod/github.com/lib/pq@v1.10.7/certs/server.cnf | 29 + .../mod/github.com/lib/pq@v1.10.7/certs/server.crt | 22 + .../mod/github.com/lib/pq@v1.10.7/certs/server.key | 28 + .../pkg/mod/github.com/lib/pq@v1.10.7/conn.go | 2064 + .../pkg/mod/github.com/lib/pq@v1.10.7/conn_go18.go | 247 + .../pkg/mod/github.com/lib/pq@v1.10.7/conn_test.go | 1970 + .../pkg/mod/github.com/lib/pq@v1.10.7/connector.go | 120 + .../lib/pq@v1.10.7/connector_example_test.go | 30 + .../github.com/lib/pq@v1.10.7/connector_test.go | 68 + .../pkg/mod/github.com/lib/pq@v1.10.7/copy.go | 341 + .../pkg/mod/github.com/lib/pq@v1.10.7/copy_test.go | 502 + .../pkg/mod/github.com/lib/pq@v1.10.7/doc.go | 268 + .../pkg/mod/github.com/lib/pq@v1.10.7/encode.go | 632 + .../mod/github.com/lib/pq@v1.10.7/encode_test.go | 886 + .../pkg/mod/github.com/lib/pq@v1.10.7/error.go | 523 + .../lib/pq@v1.10.7/example/listen/doc.go | 98 + .../pkg/mod/github.com/lib/pq@v1.10.7/go.mod | 3 + .../pkg/mod/github.com/lib/pq@v1.10.7/go18_test.go | 352 + .../pkg/mod/github.com/lib/pq@v1.10.7/go19_test.go | 99 + .../mod/github.com/lib/pq@v1.10.7/hstore/hstore.go | 118 + .../lib/pq@v1.10.7/hstore/hstore_test.go | 148 + .../mod/github.com/lib/pq@v1.10.7/issues_test.go | 81 + .../pkg/mod/github.com/lib/pq@v1.10.7/krb.go | 27 + .../pkg/mod/github.com/lib/pq@v1.10.7/notice.go | 72 + .../lib/pq@v1.10.7/notice_example_test.go | 34 + .../mod/github.com/lib/pq@v1.10.7/notice_test.go | 50 + .../pkg/mod/github.com/lib/pq@v1.10.7/notify.go | 858 + .../mod/github.com/lib/pq@v1.10.7/notify_test.go | 612 + .../pkg/mod/github.com/lib/pq@v1.10.7/oid/doc.go | 6 + .../pkg/mod/github.com/lib/pq@v1.10.7/oid/gen.go | 94 + .../pkg/mod/github.com/lib/pq@v1.10.7/oid/types.go | 343 + .../pkg/mod/github.com/lib/pq@v1.10.7/rows.go | 93 + .../pkg/mod/github.com/lib/pq@v1.10.7/rows_test.go | 218 + .../mod/github.com/lib/pq@v1.10.7/scram/scram.go | 264 + .../pkg/mod/github.com/lib/pq@v1.10.7/ssl.go | 204 + .../github.com/lib/pq@v1.10.7/ssl_permissions.go | 93 + .../lib/pq@v1.10.7/ssl_permissions_test.go | 109 + .../pkg/mod/github.com/lib/pq@v1.10.7/ssl_test.go | 421 + .../mod/github.com/lib/pq@v1.10.7/ssl_windows.go | 10 + .../pkg/mod/github.com/lib/pq@v1.10.7/url.go | 76 + .../pkg/mod/github.com/lib/pq@v1.10.7/url_test.go | 66 + .../mod/github.com/lib/pq@v1.10.7/user_other.go | 10 + .../mod/github.com/lib/pq@v1.10.7/user_posix.go | 25 + .../mod/github.com/lib/pq@v1.10.7/user_windows.go | 27 + .../pkg/mod/github.com/lib/pq@v1.10.7/uuid.go | 23 + .../pkg/mod/github.com/lib/pq@v1.10.7/uuid_test.go | 46 + .../mattn/go-colorable@v0.1.13/.github/FUNDING.yml | 12 + .../.github/workflows/test.yml | 41 + .../github.com/mattn/go-colorable@v0.1.13/LICENSE | 21 + .../mattn/go-colorable@v0.1.13/README.md | 48 + .../_example/escape-seq/main.go | 16 + .../go-colorable@v0.1.13/_example/logrus/main.go | 16 + .../go-colorable@v0.1.13/_example/title/main.go | 15 + .../cmd/colorable/colorable.go | 12 + .../go-colorable@v0.1.13/colorable_appengine.go | 38 + .../mattn/go-colorable@v0.1.13/colorable_others.go | 38 + .../mattn/go-colorable@v0.1.13/colorable_test.go | 98 + .../go-colorable@v0.1.13/colorable_windows.go | 1047 + .../github.com/mattn/go-colorable@v0.1.13/go.mod | 5 + .../github.com/mattn/go-colorable@v0.1.13/go.sum | 4 + .../mattn/go-colorable@v0.1.13/go.test.sh | 12 + .../mattn/go-colorable@v0.1.13/noncolorable.go | 57 + .../mattn/go-isatty@v0.0.16/.github/FUNDING.yml | 12 + .../go-isatty@v0.0.16/.github/workflows/test.yml | 37 + .../mod/github.com/mattn/go-isatty@v0.0.16/LICENSE | 9 + .../github.com/mattn/go-isatty@v0.0.16/README.md | 50 + .../mod/github.com/mattn/go-isatty@v0.0.16/doc.go | 2 + .../mattn/go-isatty@v0.0.16/example_test.go | 18 + .../mod/github.com/mattn/go-isatty@v0.0.16/go.mod | 5 + .../mod/github.com/mattn/go-isatty@v0.0.16/go.sum | 2 + .../github.com/mattn/go-isatty@v0.0.16/go.test.sh | 12 + .../mattn/go-isatty@v0.0.16/isatty_bsd.go | 19 + .../mattn/go-isatty@v0.0.16/isatty_others.go | 16 + .../mattn/go-isatty@v0.0.16/isatty_others_test.go | 20 + .../mattn/go-isatty@v0.0.16/isatty_plan9.go | 23 + .../mattn/go-isatty@v0.0.16/isatty_solaris.go | 21 + .../mattn/go-isatty@v0.0.16/isatty_tcgets.go | 19 + .../mattn/go-isatty@v0.0.16/isatty_windows.go | 125 + .../mattn/go-isatty@v0.0.16/isatty_windows_test.go | 39 + .../mattn/go-runewidth@v0.0.12/.github/FUNDING.yml | 12 + .../mattn/go-runewidth@v0.0.12/.travis.yml | 16 + .../github.com/mattn/go-runewidth@v0.0.12/LICENSE | 21 + .../mattn/go-runewidth@v0.0.12/README.md | 27 + .../mattn/go-runewidth@v0.0.12/benchmark_test.go | 117 + .../github.com/mattn/go-runewidth@v0.0.12/go.mod | 5 + .../github.com/mattn/go-runewidth@v0.0.12/go.sum | 2 + .../mattn/go-runewidth@v0.0.12/go.test.sh | 12 + .../mattn/go-runewidth@v0.0.12/runewidth.go | 273 + .../go-runewidth@v0.0.12/runewidth_appengine.go | 8 + .../mattn/go-runewidth@v0.0.12/runewidth_js.go | 9 + .../mattn/go-runewidth@v0.0.12/runewidth_posix.go | 82 + .../go-runewidth@v0.0.12/runewidth_posix_test.go | 98 + .../mattn/go-runewidth@v0.0.12/runewidth_table.go | 439 + .../mattn/go-runewidth@v0.0.12/runewidth_test.go | 426 + .../go-runewidth@v0.0.12/runewidth_windows.go | 28 + .../mattn/go-runewidth@v0.0.12/script/generate.go | 206 + .../mattn/go-sqlite3@v1.14.16/.codecov.yml | 4 + .../mattn/go-sqlite3@v1.14.16/.github/FUNDING.yml | 8 + .../.github/workflows/cifuzz.yaml | 29 + .../.github/workflows/docker.yaml | 22 + .../go-sqlite3@v1.14.16/.github/workflows/go.yaml | 115 + .../mattn/go-sqlite3@v1.14.16/.gitignore | 14 + .../github.com/mattn/go-sqlite3@v1.14.16/LICENSE | 21 + .../github.com/mattn/go-sqlite3@v1.14.16/README.md | 593 + .../_example/custom_driver_name/Makefile | 12 + .../_example/custom_driver_name/main.go | 13 + .../_example/custom_func/main.go | 133 + .../_example/fuzz/fuzz_openexec.go | 30 + .../go-sqlite3@v1.14.16/_example/hook/hook.go | 78 + .../go-sqlite3@v1.14.16/_example/limit/limit.go | 113 + .../_example/mod_regexp/Makefile | 27 + .../_example/mod_regexp/extension.go | 43 + .../_example/mod_regexp/sqlite3_mod_regexp.c | 35 + .../_example/mod_vtable/Makefile | 29 + .../_example/mod_vtable/extension.go | 37 + .../_example/mod_vtable/picojson.h | 1040 + .../_example/mod_vtable/sqlite3_mod_vtable.cc | 238 + .../go-sqlite3@v1.14.16/_example/simple/Dockerfile | 45 + .../go-sqlite3@v1.14.16/_example/simple/simple.go | 109 + .../go-sqlite3@v1.14.16/_example/trace/main.go | 264 + .../go-sqlite3@v1.14.16/_example/vtable/main.go | 38 + .../go-sqlite3@v1.14.16/_example/vtable/vtable.go | 116 + .../_example/vtable_eponymous_only/main.go | 33 + .../_example/vtable_eponymous_only/vtable.go | 118 + .../github.com/mattn/go-sqlite3@v1.14.16/backup.go | 85 + .../mattn/go-sqlite3@v1.14.16/backup_test.go | 294 + .../mattn/go-sqlite3@v1.14.16/callback.go | 411 + .../mattn/go-sqlite3@v1.14.16/callback_test.go | 116 + .../mattn/go-sqlite3@v1.14.16/convert.go | 299 + .../github.com/mattn/go-sqlite3@v1.14.16/doc.go | 135 + .../github.com/mattn/go-sqlite3@v1.14.16/error.go | 150 + .../mattn/go-sqlite3@v1.14.16/error_test.go | 275 + .../github.com/mattn/go-sqlite3@v1.14.16/go.mod | 7 + .../github.com/mattn/go-sqlite3@v1.14.16/go.sum | 0 .../mattn/go-sqlite3@v1.14.16/sqlite3-binding.c | 242076 ++++++++++++++++++ .../mattn/go-sqlite3@v1.14.16/sqlite3-binding.h | 12937 + .../mattn/go-sqlite3@v1.14.16/sqlite3.go | 2268 + .../mattn/go-sqlite3@v1.14.16/sqlite3_context.go | 103 + .../go-sqlite3@v1.14.16/sqlite3_func_crypt.go | 120 + .../go-sqlite3@v1.14.16/sqlite3_func_crypt_test.go | 57 + .../go-sqlite3@v1.14.16/sqlite3_go113_test.go | 119 + .../mattn/go-sqlite3@v1.14.16/sqlite3_go18.go | 70 + .../mattn/go-sqlite3@v1.14.16/sqlite3_go18_test.go | 503 + .../go-sqlite3@v1.14.16/sqlite3_libsqlite3.go | 19 + .../go-sqlite3@v1.14.16/sqlite3_load_extension.go | 84 + .../sqlite3_load_extension_omit.go | 24 + .../sqlite3_load_extension_test.go | 63 + .../sqlite3_opt_allow_uri_authority.go | 15 + .../go-sqlite3@v1.14.16/sqlite3_opt_app_armor.go | 16 + .../sqlite3_opt_column_metadata.go | 21 + .../sqlite3_opt_column_metadata_test.go | 39 + .../sqlite3_opt_foreign_keys.go | 15 + .../go-sqlite3@v1.14.16/sqlite3_opt_fts3_test.go | 132 + .../mattn/go-sqlite3@v1.14.16/sqlite3_opt_fts5.go | 14 + .../mattn/go-sqlite3@v1.14.16/sqlite3_opt_icu.go | 17 + .../go-sqlite3@v1.14.16/sqlite3_opt_introspect.go | 15 + .../sqlite3_opt_math_functions.go | 14 + .../sqlite3_opt_math_functions_test.go | 29 + .../go-sqlite3@v1.14.16/sqlite3_opt_os_trace.go | 15 + .../go-sqlite3@v1.14.16/sqlite3_opt_preupdate.go | 20 + .../sqlite3_opt_preupdate_hook.go | 112 + .../sqlite3_opt_preupdate_hook_test.go | 128 + .../sqlite3_opt_preupdate_omit.go | 21 + .../sqlite3_opt_secure_delete.go | 15 + .../sqlite3_opt_secure_delete_fast.go | 15 + .../mattn/go-sqlite3@v1.14.16/sqlite3_opt_stat4.go | 15 + .../sqlite3_opt_unlock_notify.c | 85 + .../sqlite3_opt_unlock_notify.go | 93 + .../sqlite3_opt_unlock_notify_test.go | 222 + .../go-sqlite3@v1.14.16/sqlite3_opt_userauth.go | 289 + .../sqlite3_opt_userauth_omit.go | 152 + .../sqlite3_opt_userauth_test.go | 643 + .../go-sqlite3@v1.14.16/sqlite3_opt_vacuum_full.go | 15 + .../go-sqlite3@v1.14.16/sqlite3_opt_vacuum_incr.go | 15 + .../go-sqlite3@v1.14.16/sqlite3_opt_vtable.go | 720 + .../go-sqlite3@v1.14.16/sqlite3_opt_vtable_test.go | 609 + .../mattn/go-sqlite3@v1.14.16/sqlite3_other.go | 17 + .../mattn/go-sqlite3@v1.14.16/sqlite3_solaris.go | 14 + .../mattn/go-sqlite3@v1.14.16/sqlite3_test.go | 2570 + .../mattn/go-sqlite3@v1.14.16/sqlite3_trace.go | 287 + .../mattn/go-sqlite3@v1.14.16/sqlite3_type.go | 108 + .../go-sqlite3@v1.14.16/sqlite3_usleep_windows.go | 41 + .../mattn/go-sqlite3@v1.14.16/sqlite3_windows.go | 17 + .../mattn/go-sqlite3@v1.14.16/sqlite3ext.h | 710 + .../mattn/go-sqlite3@v1.14.16/static_mock.go | 37 + .../LICENSE | 21 + .../README.md | 15 + .../notify.go | 9 + .../notify_linux.go | 23 + .../sample/main.go | 57 + .../sample/sample.service | 13 + .../util.go | 39 + .../mod/github.com/pkg/errors@v0.9.1/.gitignore | 24 + .../mod/github.com/pkg/errors@v0.9.1/.travis.yml | 10 + .../pkg/mod/github.com/pkg/errors@v0.9.1/LICENSE | 23 + .../pkg/mod/github.com/pkg/errors@v0.9.1/Makefile | 44 + .../pkg/mod/github.com/pkg/errors@v0.9.1/README.md | 59 + .../mod/github.com/pkg/errors@v0.9.1/appveyor.yml | 32 + .../mod/github.com/pkg/errors@v0.9.1/bench_test.go | 110 + .../pkg/mod/github.com/pkg/errors@v0.9.1/errors.go | 288 + .../github.com/pkg/errors@v0.9.1/errors_test.go | 251 + .../github.com/pkg/errors@v0.9.1/example_test.go | 205 + .../github.com/pkg/errors@v0.9.1/format_test.go | 560 + .../pkg/mod/github.com/pkg/errors@v0.9.1/go113.go | 38 + .../mod/github.com/pkg/errors@v0.9.1/go113_test.go | 178 + .../mod/github.com/pkg/errors@v0.9.1/json_test.go | 51 + .../pkg/mod/github.com/pkg/errors@v0.9.1/stack.go | 177 + .../mod/github.com/pkg/errors@v0.9.1/stack_test.go | 250 + .../mod/github.com/rivo/uniseg@v0.2.0/LICENSE.txt | 21 + .../mod/github.com/rivo/uniseg@v0.2.0/README.md | 62 + .../pkg/mod/github.com/rivo/uniseg@v0.2.0/doc.go | 8 + .../pkg/mod/github.com/rivo/uniseg@v0.2.0/go.mod | 3 + .../mod/github.com/rivo/uniseg@v0.2.0/grapheme.go | 268 + .../github.com/rivo/uniseg@v0.2.0/grapheme_test.go | 812 + .../github.com/rivo/uniseg@v0.2.0/properties.go | 1658 + .../github.com/ssgreg/journald@v1.0.0/.gitignore | 14 + .../github.com/ssgreg/journald@v1.0.0/.travis.yml | 25 + .../github.com/ssgreg/journald@v1.0.0/CHANGELOG.md | 8 + .../mod/github.com/ssgreg/journald@v1.0.0/LICENSE | 21 + .../github.com/ssgreg/journald@v1.0.0/README.md | 141 + .../mod/github.com/ssgreg/journald@v1.0.0/doc.go | 76 + .../ssgreg/journald@v1.0.0/examples/print/main.go | 9 + .../ssgreg/journald@v1.0.0/examples/send/main.go | 18 + .../mod/github.com/ssgreg/journald@v1.0.0/send.go | 275 + .../github.com/ssgreg/journald@v1.0.0/send_test.go | 134 + .../github.com/ssgreg/journald@v1.0.0/sockaddr.go | 18 + .../github.com/ssgreg/journald@v1.0.0/write_msg.go | 50 + .../ssgreg/journald@v1.0.0/write_msg_go1.9.go | 41 + .../github.com/vbauerster/mpb/v6@v6.0.4/.gitignore | 5 + .../vbauerster/mpb/v6@v6.0.4/.travis.yml | 11 + .../github.com/vbauerster/mpb/v6@v6.0.4/README.md | 120 + .../github.com/vbauerster/mpb/v6@v6.0.4/UNLICENSE | 24 + .../vbauerster/mpb/v6@v6.0.4/_examples/.gitignore | 1 + .../v6@v6.0.4/_svg/godEMrCZmJkHYH1X9dN4Nm0U7.svg | 1 + .../v6@v6.0.4/_svg/hIpTa3A5rQz65ssiVuRJu87X6.svg | 1 + .../v6@v6.0.4/_svg/wHzf1M7sd7B3zVa2scBMnjqRf.svg | 1 + .../mod/github.com/vbauerster/mpb/v6@v6.0.4/bar.go | 492 + .../vbauerster/mpb/v6@v6.0.4/bar_filler.go | 31 + .../vbauerster/mpb/v6@v6.0.4/bar_filler_bar.go | 191 + .../vbauerster/mpb/v6@v6.0.4/bar_filler_spinner.go | 65 + .../vbauerster/mpb/v6@v6.0.4/bar_option.go | 153 + .../vbauerster/mpb/v6@v6.0.4/bar_test.go | 257 + .../vbauerster/mpb/v6@v6.0.4/barbench_test.go | 43 + .../vbauerster/mpb/v6@v6.0.4/container_option.go | 112 + .../cwriter/cuuAndEd_construction_bench_test.go | 39 + .../vbauerster/mpb/v6@v6.0.4/cwriter/doc.go | 2 + .../vbauerster/mpb/v6@v6.0.4/cwriter/util_bsd.go | 7 + .../vbauerster/mpb/v6@v6.0.4/cwriter/util_linux.go | 7 + .../mpb/v6@v6.0.4/cwriter/util_solaris.go | 7 + .../vbauerster/mpb/v6@v6.0.4/cwriter/writer.go | 84 + .../mpb/v6@v6.0.4/cwriter/writer_posix.go | 26 + .../mpb/v6@v6.0.4/cwriter/writer_windows.go | 73 + .../vbauerster/mpb/v6@v6.0.4/decor/any.go | 21 + .../vbauerster/mpb/v6@v6.0.4/decor/counters.go | 243 + .../vbauerster/mpb/v6@v6.0.4/decor/decorator.go | 191 + .../vbauerster/mpb/v6@v6.0.4/decor/doc.go | 20 + .../vbauerster/mpb/v6@v6.0.4/decor/elapsed.go | 35 + .../vbauerster/mpb/v6@v6.0.4/decor/eta.go | 203 + .../vbauerster/mpb/v6@v6.0.4/decor/merge.go | 107 + .../mpb/v6@v6.0.4/decor/moving_average.go | 68 + .../vbauerster/mpb/v6@v6.0.4/decor/name.go | 12 + .../vbauerster/mpb/v6@v6.0.4/decor/on_complete.go | 37 + .../vbauerster/mpb/v6@v6.0.4/decor/percentage.go | 58 + .../vbauerster/mpb/v6@v6.0.4/decor/size_type.go | 109 + .../mpb/v6@v6.0.4/decor/size_type_test.go | 102 + .../mpb/v6@v6.0.4/decor/sizeb1000_string.go | 41 + .../mpb/v6@v6.0.4/decor/sizeb1024_string.go | 41 + .../vbauerster/mpb/v6@v6.0.4/decor/speed.go | 171 + .../vbauerster/mpb/v6@v6.0.4/decor/speed_test.go | 262 + .../vbauerster/mpb/v6@v6.0.4/decor/spinner.go | 21 + .../vbauerster/mpb/v6@v6.0.4/decorators_test.go | 221 + .../mod/github.com/vbauerster/mpb/v6@v6.0.4/doc.go | 2 + .../vbauerster/mpb/v6@v6.0.4/draw_test.go | 378 + .../vbauerster/mpb/v6@v6.0.4/example_test.go | 84 + .../vbauerster/mpb/v6@v6.0.4/export_test.go | 5 + .../mod/github.com/vbauerster/mpb/v6@v6.0.4/go.mod | 11 + .../mod/github.com/vbauerster/mpb/v6@v6.0.4/go.sum | 11 + .../mpb/v6@v6.0.4/internal/percentage.go | 19 + .../mpb/v6@v6.0.4/internal/percentage_test.go | 71 + .../vbauerster/mpb/v6@v6.0.4/internal/predicate.go | 6 + .../vbauerster/mpb/v6@v6.0.4/internal/width.go | 10 + .../vbauerster/mpb/v6@v6.0.4/priority_queue.go | 32 + .../vbauerster/mpb/v6@v6.0.4/progress.go | 412 + .../vbauerster/mpb/v6@v6.0.4/progress_test.go | 185 + .../vbauerster/mpb/v6@v6.0.4/proxyreader.go | 90 + .../vbauerster/mpb/v6@v6.0.4/proxyreader_test.go | 90 + .../pkg/mod/go.uber.org/atomic@v1.7.0/.codecov.yml | 19 + .../atomic@v1.7.0/.github/PULL_REQUEST_TEMPLATE.md | 9 + .../pkg/mod/go.uber.org/atomic@v1.7.0/.gitignore | 12 + .../pkg/mod/go.uber.org/atomic@v1.7.0/.travis.yml | 27 + .../pkg/mod/go.uber.org/atomic@v1.7.0/CHANGELOG.md | 76 + .../pkg/mod/go.uber.org/atomic@v1.7.0/LICENSE.txt | 19 + .../pkg/mod/go.uber.org/atomic@v1.7.0/Makefile | 78 + .../pkg/mod/go.uber.org/atomic@v1.7.0/README.md | 63 + .../mod/go.uber.org/atomic@v1.7.0/assert_test.go | 45 + .../pkg/mod/go.uber.org/atomic@v1.7.0/bool.go | 81 + .../pkg/mod/go.uber.org/atomic@v1.7.0/bool_ext.go | 53 + .../pkg/mod/go.uber.org/atomic@v1.7.0/bool_test.go | 86 + .../pkg/mod/go.uber.org/atomic@v1.7.0/doc.go | 23 + .../pkg/mod/go.uber.org/atomic@v1.7.0/duration.go | 82 + .../mod/go.uber.org/atomic@v1.7.0/duration_ext.go | 40 + .../mod/go.uber.org/atomic@v1.7.0/duration_test.go | 72 + .../pkg/mod/go.uber.org/atomic@v1.7.0/error.go | 51 + .../pkg/mod/go.uber.org/atomic@v1.7.0/error_ext.go | 39 + .../mod/go.uber.org/atomic@v1.7.0/error_test.go | 55 + .../mod/go.uber.org/atomic@v1.7.0/example_test.go | 43 + .../pkg/mod/go.uber.org/atomic@v1.7.0/float64.go | 76 + .../mod/go.uber.org/atomic@v1.7.0/float64_ext.go | 47 + .../mod/go.uber.org/atomic@v1.7.0/float64_test.go | 69 + .../pkg/mod/go.uber.org/atomic@v1.7.0/gen.go | 26 + .../pkg/mod/go.uber.org/atomic@v1.7.0/go.mod | 8 + .../pkg/mod/go.uber.org/atomic@v1.7.0/go.sum | 9 + .../pkg/mod/go.uber.org/atomic@v1.7.0/int32.go | 102 + .../mod/go.uber.org/atomic@v1.7.0/int32_test.go | 82 + .../pkg/mod/go.uber.org/atomic@v1.7.0/int64.go | 102 + .../mod/go.uber.org/atomic@v1.7.0/int64_test.go | 82 + .../atomic@v1.7.0/internal/gen-atomicint/main.go | 218 + .../internal/gen-atomicwrapper/main.go | 300 + .../pkg/mod/go.uber.org/atomic@v1.7.0/nocmp.go | 35 + .../mod/go.uber.org/atomic@v1.7.0/nocmp_test.go | 165 + .../mod/go.uber.org/atomic@v1.7.0/stress_test.go | 274 + .../pkg/mod/go.uber.org/atomic@v1.7.0/string.go | 54 + .../mod/go.uber.org/atomic@v1.7.0/string_ext.go | 43 + .../mod/go.uber.org/atomic@v1.7.0/string_test.go | 85 + .../pkg/mod/go.uber.org/atomic@v1.7.0/uint32.go | 102 + .../mod/go.uber.org/atomic@v1.7.0/uint32_test.go | 76 + .../pkg/mod/go.uber.org/atomic@v1.7.0/uint64.go | 102 + .../mod/go.uber.org/atomic@v1.7.0/uint64_test.go | 76 + .../pkg/mod/go.uber.org/atomic@v1.7.0/value.go | 31 + .../mod/go.uber.org/atomic@v1.7.0/value_test.go | 40 + .../mod/go.uber.org/multierr@v1.6.0/.codecov.yml | 15 + .../pkg/mod/go.uber.org/multierr@v1.6.0/.gitignore | 4 + .../mod/go.uber.org/multierr@v1.6.0/.travis.yml | 23 + .../mod/go.uber.org/multierr@v1.6.0/CHANGELOG.md | 60 + .../mod/go.uber.org/multierr@v1.6.0/LICENSE.txt | 19 + .../pkg/mod/go.uber.org/multierr@v1.6.0/Makefile | 42 + .../pkg/mod/go.uber.org/multierr@v1.6.0/README.md | 23 + .../go.uber.org/multierr@v1.6.0/benchmarks_test.go | 62 + .../pkg/mod/go.uber.org/multierr@v1.6.0/error.go | 449 + .../mod/go.uber.org/multierr@v1.6.0/error_test.go | 582 + .../go.uber.org/multierr@v1.6.0/example_test.go | 94 + .../pkg/mod/go.uber.org/multierr@v1.6.0/glide.yaml | 8 + .../pkg/mod/go.uber.org/multierr@v1.6.0/go.mod | 8 + .../pkg/mod/go.uber.org/multierr@v1.6.0/go.sum | 11 + .../pkg/mod/go.uber.org/multierr@v1.6.0/go113.go | 52 + .../mod/go.uber.org/multierr@v1.6.0/go113_test.go | 144 + .../pkg/mod/go.uber.org/zap@v1.23.0/.codecov.yml | 17 + .../.github/ISSUE_TEMPLATE/bug_report.md | 20 + .../zap@v1.23.0/.github/ISSUE_TEMPLATE/config.yml | 4 + .../.github/ISSUE_TEMPLATE/feature_request.md | 22 + .../zap@v1.23.0/.github/workflows/fossa.yaml | 17 + .../zap@v1.23.0/.github/workflows/go.yml | 53 + .../pkg/mod/go.uber.org/zap@v1.23.0/.gitignore | 32 + .../pkg/mod/go.uber.org/zap@v1.23.0/.readme.tmpl | 109 + .../pkg/mod/go.uber.org/zap@v1.23.0/CHANGELOG.md | 604 + .../mod/go.uber.org/zap@v1.23.0/CODE_OF_CONDUCT.md | 75 + .../mod/go.uber.org/zap@v1.23.0/CONTRIBUTING.md | 70 + .../pkg/mod/go.uber.org/zap@v1.23.0/FAQ.md | 164 + .../pkg/mod/go.uber.org/zap@v1.23.0/LICENSE.txt | 19 + .../pkg/mod/go.uber.org/zap@v1.23.0/Makefile | 73 + .../pkg/mod/go.uber.org/zap@v1.23.0/README.md | 133 + .../pkg/mod/go.uber.org/zap@v1.23.0/array.go | 320 + .../pkg/mod/go.uber.org/zap@v1.23.0/array_go118.go | 156 + .../go.uber.org/zap@v1.23.0/array_go118_test.go | 240 + .../pkg/mod/go.uber.org/zap@v1.23.0/array_test.go | 107 + .../mod/go.uber.org/zap@v1.23.0/buffer/buffer.go | 141 + .../go.uber.org/zap@v1.23.0/buffer/buffer_test.go | 95 + .../pkg/mod/go.uber.org/zap@v1.23.0/buffer/pool.go | 49 + .../go.uber.org/zap@v1.23.0/buffer/pool_test.go | 52 + .../mod/go.uber.org/zap@v1.23.0/checklicense.sh | 17 + .../pkg/mod/go.uber.org/zap@v1.23.0/clock_test.go | 47 + .../pkg/mod/go.uber.org/zap@v1.23.0/common_test.go | 57 + .../pkg/mod/go.uber.org/zap@v1.23.0/config.go | 264 + .../pkg/mod/go.uber.org/zap@v1.23.0/config_test.go | 203 + .../pkg/mod/go.uber.org/zap@v1.23.0/doc.go | 117 + .../pkg/mod/go.uber.org/zap@v1.23.0/encoder.go | 79 + .../mod/go.uber.org/zap@v1.23.0/encoder_test.go | 88 + .../pkg/mod/go.uber.org/zap@v1.23.0/error.go | 80 + .../pkg/mod/go.uber.org/zap@v1.23.0/error_test.go | 99 + .../go.uber.org/zap@v1.23.0/example_go118_test.go | 66 + .../mod/go.uber.org/zap@v1.23.0/example_test.go | 360 + .../pkg/mod/go.uber.org/zap@v1.23.0/field.go | 549 + .../pkg/mod/go.uber.org/zap@v1.23.0/field_test.go | 284 + .../pkg/mod/go.uber.org/zap@v1.23.0/flag.go | 39 + .../pkg/mod/go.uber.org/zap@v1.23.0/flag_test.go | 102 + .../pkg/mod/go.uber.org/zap@v1.23.0/glide.yaml | 34 + .../pkg/mod/go.uber.org/zap@v1.23.0/global.go | 169 + .../pkg/mod/go.uber.org/zap@v1.23.0/global_test.go | 280 + .../pkg/mod/go.uber.org/zap@v1.23.0/go.mod | 18 + .../pkg/mod/go.uber.org/zap@v1.23.0/go.sum | 61 + .../mod/go.uber.org/zap@v1.23.0/http_handler.go | 133 + .../go.uber.org/zap@v1.23.0/http_handler_test.go | 190 + .../go.uber.org/zap@v1.23.0/increase_level_test.go | 94 + .../zap@v1.23.0/internal/bufferpool/bufferpool.go | 31 + .../zap@v1.23.0/internal/color/color.go | 44 + .../zap@v1.23.0/internal/color/color_test.go | 36 + .../go.uber.org/zap@v1.23.0/internal/exit/exit.go | 66 + .../zap@v1.23.0/internal/exit/exit_test.go | 48 + .../zap@v1.23.0/internal/level_enabler.go | 35 + .../zap@v1.23.0/internal/readme/readme.go | 242 + .../zap@v1.23.0/internal/ztest/clock.go | 50 + .../zap@v1.23.0/internal/ztest/clock_test.go | 57 + .../go.uber.org/zap@v1.23.0/internal/ztest/doc.go | 24 + .../zap@v1.23.0/internal/ztest/timeout.go | 59 + .../zap@v1.23.0/internal/ztest/writer.go | 96 + .../pkg/mod/go.uber.org/zap@v1.23.0/leak_test.go | 31 + .../pkg/mod/go.uber.org/zap@v1.23.0/level.go | 152 + .../pkg/mod/go.uber.org/zap@v1.23.0/level_test.go | 140 + .../pkg/mod/go.uber.org/zap@v1.23.0/logger.go | 393 + .../go.uber.org/zap@v1.23.0/logger_bench_test.go | 240 + .../pkg/mod/go.uber.org/zap@v1.23.0/logger_test.go | 676 + .../pkg/mod/go.uber.org/zap@v1.23.0/options.go | 166 + .../pkg/mod/go.uber.org/zap@v1.23.0/sink.go | 161 + .../pkg/mod/go.uber.org/zap@v1.23.0/sink_test.go | 100 + .../pkg/mod/go.uber.org/zap@v1.23.0/stacktrace.go | 176 + .../go.uber.org/zap@v1.23.0/stacktrace_ext_test.go | 210 + .../mod/go.uber.org/zap@v1.23.0/stacktrace_test.go | 106 + .../pkg/mod/go.uber.org/zap@v1.23.0/sugar.go | 393 + .../pkg/mod/go.uber.org/zap@v1.23.0/sugar_test.go | 467 + .../pkg/mod/go.uber.org/zap@v1.23.0/time.go | 27 + .../pkg/mod/go.uber.org/zap@v1.23.0/time_test.go | 42 + .../pkg/mod/go.uber.org/zap@v1.23.0/writer.go | 98 + .../pkg/mod/go.uber.org/zap@v1.23.0/writer_test.go | 266 + .../zap@v1.23.0/zapcore/buffered_write_syncer.go | 219 + .../zapcore/buffered_write_syncer_bench_test.go | 51 + .../zapcore/buffered_write_syncer_test.go | 139 + .../mod/go.uber.org/zap@v1.23.0/zapcore/clock.go | 48 + .../go.uber.org/zap@v1.23.0/zapcore/clock_test.go | 44 + .../zap@v1.23.0/zapcore/console_encoder.go | 157 + .../zapcore/console_encoder_bench_test.go | 49 + .../zap@v1.23.0/zapcore/console_encoder_test.go | 91 + .../mod/go.uber.org/zap@v1.23.0/zapcore/core.go | 122 + .../go.uber.org/zap@v1.23.0/zapcore/core_test.go | 165 + .../pkg/mod/go.uber.org/zap@v1.23.0/zapcore/doc.go | 24 + .../mod/go.uber.org/zap@v1.23.0/zapcore/encoder.go | 451 + .../zap@v1.23.0/zapcore/encoder_test.go | 730 + .../mod/go.uber.org/zap@v1.23.0/zapcore/entry.go | 299 + .../go.uber.org/zap@v1.23.0/zapcore/entry_test.go | 149 + .../mod/go.uber.org/zap@v1.23.0/zapcore/error.go | 132 + .../go.uber.org/zap@v1.23.0/zapcore/error_test.go | 177 + .../mod/go.uber.org/zap@v1.23.0/zapcore/field.go | 233 + .../go.uber.org/zap@v1.23.0/zapcore/field_test.go | 318 + .../mod/go.uber.org/zap@v1.23.0/zapcore/hook.go | 77 + .../go.uber.org/zap@v1.23.0/zapcore/hook_test.go | 82 + .../zap@v1.23.0/zapcore/increase_level.go | 75 + .../zap@v1.23.0/zapcore/increase_level_test.go | 129 + .../zap@v1.23.0/zapcore/json_encoder.go | 562 + .../zap@v1.23.0/zapcore/json_encoder_bench_test.go | 101 + .../zap@v1.23.0/zapcore/json_encoder_impl_test.go | 659 + .../zap@v1.23.0/zapcore/json_encoder_test.go | 268 + .../go.uber.org/zap@v1.23.0/zapcore/leak_test.go | 31 + .../mod/go.uber.org/zap@v1.23.0/zapcore/level.go | 229 + .../zap@v1.23.0/zapcore/level_strings.go | 46 + .../zap@v1.23.0/zapcore/level_strings_test.go | 38 + .../go.uber.org/zap@v1.23.0/zapcore/level_test.go | 249 + .../go.uber.org/zap@v1.23.0/zapcore/marshaler.go | 61 + .../zap@v1.23.0/zapcore/memory_encoder.go | 179 + .../zap@v1.23.0/zapcore/memory_encoder_test.go | 364 + .../zap@v1.23.0/zapcore/reflected_encoder.go | 41 + .../mod/go.uber.org/zap@v1.23.0/zapcore/sampler.go | 230 + .../zap@v1.23.0/zapcore/sampler_bench_test.go | 285 + .../zap@v1.23.0/zapcore/sampler_test.go | 328 + .../pkg/mod/go.uber.org/zap@v1.23.0/zapcore/tee.go | 96 + .../zap@v1.23.0/zapcore/tee_logger_bench_test.go | 62 + .../go.uber.org/zap@v1.23.0/zapcore/tee_test.go | 191 + .../zap@v1.23.0/zapcore/write_syncer.go | 122 + .../zap@v1.23.0/zapcore/write_syncer_bench_test.go | 90 + .../zap@v1.23.0/zapcore/write_syncer_test.go | 136 + .../mod/go.uber.org/zap@v1.23.0/zapgrpc/zapgrpc.go | 241 + .../zap@v1.23.0/zapgrpc/zapgrpc_test.go | 263 + .../go.uber.org/zap@v1.23.0/zapio/example_test.go | 47 + .../mod/go.uber.org/zap@v1.23.0/zapio/writer.go | 148 + .../go.uber.org/zap@v1.23.0/zapio/writer_test.go | 248 + .../pkg/mod/go.uber.org/zap@v1.23.0/zaptest/doc.go | 22 + .../mod/go.uber.org/zap@v1.23.0/zaptest/logger.go | 140 + .../go.uber.org/zap@v1.23.0/zaptest/logger_test.go | 193 + .../zap@v1.23.0/zaptest/observer/logged_entry.go | 39 + .../zaptest/observer/logged_entry_test.go | 88 + .../zap@v1.23.0/zaptest/observer/observer.go | 196 + .../zap@v1.23.0/zaptest/observer/observer_test.go | 258 + .../go.uber.org/zap@v1.23.0/zaptest/testingt.go | 47 + .../zap@v1.23.0/zaptest/testingt_test.go | 29 + .../mod/go.uber.org/zap@v1.23.0/zaptest/timeout.go | 45 + .../zap@v1.23.0/zaptest/timeout_test.go | 43 + .../mod/go.uber.org/zap@v1.23.0/zaptest/writer.go | 44 + .../go.uber.org/zap@v1.23.0/zaptest/writer_test.go | 68 + .../.gitattributes | 10 + .../.gitignore | 2 + .../exp@v0.0.0-20220613132600-b0d781184e0d/AUTHORS | 3 + .../CONTRIBUTING.md | 26 + .../CONTRIBUTORS | 3 + .../exp@v0.0.0-20220613132600-b0d781184e0d/LICENSE | 27 + .../exp@v0.0.0-20220613132600-b0d781184e0d/PATENTS | 22 + .../README.md | 22 + .../apidiff/README.md | 624 + .../apidiff/apidiff.go | 220 + .../apidiff/apidiff_test.go | 238 + .../apidiff/compatibility.go | 364 + .../apidiff/correspondence.go | 288 + .../apidiff/messageset.go | 79 + .../apidiff/report.go | 71 + .../apidiff/testdata/exported_fields/ef.go | 38 + .../apidiff/testdata/tests.go | 969 + .../cmd/apidiff/main.go | 163 + .../cmd/gorelease/errors.go | 81 + .../cmd/gorelease/gorelease.go | 1517 + .../cmd/gorelease/gorelease_test.go | 504 + .../cmd/gorelease/path.go | 87 + .../cmd/gorelease/path_test.go | 227 + .../cmd/gorelease/proxy_test.go | 207 + .../cmd/gorelease/report.go | 463 + .../cmd/gorelease/testdata/README.md | 95 + .../alreadyexists/alreadyexists_suggest_major.test | 24 + .../alreadyexists/alreadyexists_suggest_minor.test | 23 + .../alreadyexists/alreadyexists_suggest_patch.test | 23 + .../alreadyexists/alreadyexists_verify.test | 18 + .../cmd/gorelease/testdata/basic/README.txt | 11 + .../testdata/basic/v0_compatible_suggest.test | 15 + .../testdata/basic/v0_compatible_suggest_git.test | 16 + .../testdata/basic/v0_compatible_suggest_hg.test | 16 + .../testdata/basic/v0_compatible_verify.test | 16 + .../testdata/basic/v0_incompatible_suggest.test | 15 + .../testdata/basic/v0_incompatible_verify.test | 16 + .../testdata/basic/v0_nobase_suggest.test | 6 + .../gorelease/testdata/basic/v0_patch_suggest.test | 7 + .../gorelease/testdata/basic/v0_patch_verify.test | 8 + .../gorelease/testdata/basic/v0_pre_suggest.test | 15 + .../testdata/basic/v0_v1_incompatible_verify.test | 15 + .../testdata/basic/v1_autobase_suggest.test | 6 + .../testdata/basic/v1_autobase_verify.test | 7 + .../testdata/basic/v1_compatible_suggest.test | 15 + .../testdata/basic/v1_compatible_verify.test | 16 + .../basic/v1_fork_base_modpath_version_verify.test | 11 + .../testdata/basic/v1_fork_base_verify.test | 15 + .../testdata/basic/v1_incompatible_suggest.test | 16 + .../testdata/basic/v1_incompatible_verify.test | 18 + .../gorelease/testdata/basic/v1_patch_suggest.test | 7 + .../gorelease/testdata/basic/v1_patch_verify.test | 8 + .../gorelease/testdata/basic/v1_pre_suggest.test | 15 + .../testdata/basic/v1_querybase_higher.test | 7 + .../testdata/basic/v1_querybase_suggest.test | 8 + .../testdata/basic/v1_querybase_verify.test | 8 + .../basic/v1_v2_base_modpath_query_verify.test | 17 + .../testdata/basic/v1_v2_base_modpath_suggest.test | 17 + .../testdata/basic/v1_v2_base_modpath_verify.test | 17 + .../basic/v1_v2_base_modpath_version_verify.test | 16 + .../testdata/basic/v1_v2_base_version_suggest.test | 8 + .../testdata/basic/v1_v2_base_version_verify.test | 7 + .../testdata/basic/v1_v2_incompatible_verify.test | 18 + .../testdata/basic/v2_compatible_suggest.test | 15 + .../testdata/basic/v2_compatible_verify.test | 16 + .../testdata/basic/v2_incompatible_suggest.test | 16 + .../testdata/basic/v2_incompatible_verify.test | 18 + .../testdata/basic/v2_nobase_suggest.test | 6 + .../gorelease/testdata/basic/v2_patch_suggest.test | 7 + .../gorelease/testdata/basic/v2_patch_verify.test | 8 + .../gorelease/testdata/basic/v2_pre_suggest.test | 15 + .../testdata/basic/v3_autobase_suggest.test | 9 + .../testdata/basic/v3_autobase_verify_error.test | 6 + .../testdata/basic/v3_autobase_verify_first.test | 7 + .../cmd/gorelease/testdata/cgo/README.txt | 7 + .../cmd/gorelease/testdata/cgo/cgo.test | 16 + .../cmd/gorelease/testdata/cycle/README.md | 1 + .../gorelease/testdata/cycle/cycle_suggest.test | 6 + .../testdata/cycle/cycle_suggest_error.test | 8 + .../cmd/gorelease/testdata/cycle/cycle_verify.test | 9 + .../cmd/gorelease/testdata/empty/README.txt | 2 + .../cmd/gorelease/testdata/empty/empty.test | 8 + .../cmd/gorelease/testdata/errors/README.txt | 2 + .../gorelease/testdata/errors/bad_filenames.test | 17 + .../cmd/gorelease/testdata/errors/bad_release.test | 8 + .../cmd/gorelease/testdata/errors/base_higher.test | 8 + .../testdata/errors/base_modpath_none.test | 7 + .../cmd/gorelease/testdata/errors/errors.test | 38 + .../testdata/errors/same_base_release.test | 8 + .../gorelease/testdata/errors/upgrade_base.test | 6 + .../cmd/gorelease/testdata/first/README.txt | 1 + .../cmd/gorelease/testdata/first/v0_0_0.test | 12 + .../cmd/gorelease/testdata/first/v0_0_1.test | 12 + .../gorelease/testdata/first/v0_1_0-alpha.1.test | 12 + .../cmd/gorelease/testdata/first/v0_1_0.test | 12 + .../cmd/gorelease/testdata/first/v0_err.test | 19 + .../cmd/gorelease/testdata/first/v1_0_0.test | 12 + .../testdata/first/v1_2_3_explicit_none_base.test | 13 + .../cmd/gorelease/testdata/first/v2_err.test | 19 + .../cmd/gorelease/testdata/first/v2_moderr.test | 15 + .../cmd/gorelease/testdata/fix/README.txt | 7 + .../testdata/fix/compatible_other_suggest.test | 19 + .../testdata/fix/compatible_other_verify.test | 19 + .../testdata/fix/compatible_other_verify_err.test | 21 + .../testdata/fix/compatible_same_suggest.test | 17 + .../testdata/fix/compatible_same_verify.test | 17 + .../testdata/fix/incompatible_other_suggest.test | 19 + .../testdata/fix/incompatible_other_verify.test | 20 + .../testdata/fix/incompatible_same_suggest.test | 16 + .../testdata/fix/incompatible_same_verify.test | 16 + .../cmd/gorelease/testdata/fix/patch_suggest.test | 15 + .../cmd/gorelease/testdata/fix/patch_verify.test | 15 + .../gorelease/testdata/generics/changed_param.test | 25 + .../testdata/generics/changed_return.test | 19 + .../cmd/gorelease/testdata/generics/unchanged.test | 15 + .../gorelease/testdata/internalcompat/README.txt | 20 + .../testdata/internalcompat/internalcompat.test | 5 + .../cmd/gorelease/testdata/main/README.txt | 3 + .../cmd/gorelease/testdata/main/add.test | 21 + .../cmd/gorelease/testdata/main/change.test | 15 + .../cmd/gorelease/testdata/main/remove.test | 13 + .../testdata/mod/example.com_basic_v0.0.1.txt | 8 + .../testdata/mod/example.com_basic_v0.1.0.txt | 13 + .../testdata/mod/example.com_basic_v0.1.1-pre.txt | 13 + .../testdata/mod/example.com_basic_v0.1.1.txt | 13 + .../testdata/mod/example.com_basic_v0.1.2.txt | 8 + .../testdata/mod/example.com_basic_v1.0.1.txt | 8 + .../testdata/mod/example.com_basic_v1.1.0.txt | 13 + .../testdata/mod/example.com_basic_v1.1.1-pre.txt | 13 + .../testdata/mod/example.com_basic_v1.1.1.txt | 13 + .../testdata/mod/example.com_basic_v1.1.2.txt | 8 + .../testdata/mod/example.com_basic_v2_v2.0.1.txt | 8 + .../testdata/mod/example.com_basic_v2_v2.1.0.txt | 13 + .../mod/example.com_basic_v2_v2.1.1-pre.txt | 13 + .../testdata/mod/example.com_basic_v2_v2.1.1.txt | 13 + .../testdata/mod/example.com_basic_v2_v2.1.2.txt | 8 + .../mod/example.com_basic_v3_v3.0.0-ignore.txt | 6 + .../mod/example.com_basic_version-1.0.1.txt | 2 + .../testdata/mod/example.com_basicfork_v1.1.2.txt | 13 + .../testdata/mod/example.com_cycle_v1.0.0.txt | 15 + .../testdata/mod/example.com_cycle_v1.5.0.txt | 6 + .../testdata/mod/example.com_cycle_v2_v2.0.0.txt | 19 + .../testdata/mod/example.com_cycledep_v1.0.0.txt | 10 + .../mod/example.com_cycledep_v2_v2.0.0.txt | 12 + .../testdata/mod/example.com_empty_v0.0.1.txt | 4 + .../testdata/mod/example.com_empty_v0.0.2.txt | 4 + .../testdata/mod/example.com_errors_v0.1.0.txt | 26 + .../testdata/mod/example.com_errors_v0.2.0.txt | 18 + .../testdata/mod/example.com_fix_v1.0.0.txt | 13 + .../testdata/mod/example.com_fix_v1.0.1-patch.txt | 13 + .../example.com_fix_v1.1.0-compatible-other.txt | 14 + .../mod/example.com_fix_v1.1.0-compatible-same.txt | 14 + .../example.com_fix_v1.1.0-incompatible-other.txt | 13 + .../example.com_fix_v1.1.0-incompatible-same.txt | 13 + .../testdata/mod/example.com_generics_v0.0.1.txt | 10 + .../mod/example.com_internalcompat_a_v1.0.0.txt | 16 + .../mod/example.com_internalcompat_b_v1.0.0.txt | 16 + .../testdata/mod/example.com_issue37756_v1.0.0.txt | 18 + .../testdata/mod/example.com_issue37756_v1.1.0.txt | 21 + .../testdata/mod/example.com_main_v0.0.1.txt | 8 + .../testdata/mod/example.com_nomod_v0.0.1.txt | 6 + .../testdata/mod/example.com_nomod_v0.0.2.txt | 6 + ...erelease_v0.0.0-20300101000000-000000000000.txt | 4 + .../testdata/mod/example.com_private_v1.0.0.txt | 17 + .../testdata/mod/example.com_private_v1.0.1.txt | 15 + .../mod/example.com_private_v1.0.2-break.txt | 17 + .../testdata/mod/example.com_require_v0.0.1.txt | 6 + .../testdata/mod/example.com_require_v0.1.0.txt | 14 + .../testdata/mod/example.com_require_v0.1.1.txt | 13 + .../testdata/mod/example.com_retract_v0.0.1.txt | 13 + .../testdata/mod/example.com_retractdep_v1.0.0.txt | 8 + .../testdata/mod/example.com_retractdep_v1.0.1.txt | 11 + .../mod/example.com_retractdep_v2_v2.0.0.txt | 12 + .../mod/example.com_retractdep_v2_v2.0.1.txt | 10 + .../mod/example.com_retractdep_v3_v3.0.0.txt | 12 + .../mod/example.com_retractdep_v3_v3.0.1.txt | 11 + .../mod/example.com_retracttransitive_v0.0.1.txt | 15 + .../testdata/mod/example.com_sub_nest_v1.0.0.txt | 6 + .../mod/example.com_sub_nest_v2_v2.0.0.txt | 6 + .../testdata/mod/example.com_sub_v2_v2.0.0.txt | 6 + .../testdata/mod/example.com_tidy_a_v0.1.0.txt | 10 + .../testdata/mod/example.com_tidy_b_v0.1.0.txt | 6 + .../testdata/mod/example.com_tidy_b_v0.2.0.txt | 8 + .../testdata/mod/example.com_tidy_v0.0.1.txt | 6 + .../cmd/gorelease/testdata/nomod/README.txt | 2 + .../cmd/gorelease/testdata/nomod/nomod.test | 8 + .../cmd/gorelease/testdata/patherrors/README.txt | 1 + .../cmd/gorelease/testdata/patherrors/abspath.test | 8 + .../gorelease/testdata/patherrors/badmajor.test | 10 + .../testdata/patherrors/dup_roots_branch.test | 20 + .../testdata/patherrors/dup_roots_dir.test | 20 + .../testdata/patherrors/dup_roots_ok.test | 14 + .../gorelease/testdata/patherrors/gopkginsub.test | 16 + .../cmd/gorelease/testdata/patherrors/pathsub.test | 17 + .../gorelease/testdata/patherrors/pathsubv2.test | 17 + .../cmd/gorelease/testdata/prerelease/README.txt | 1 + .../testdata/prerelease/prerelease_2.test | 16 + .../testdata/prerelease/prerelease_3.test | 16 + .../testdata/prerelease/prerelease_beta2.test | 10 + .../prerelease/prerelease_build_metadata.test | 11 + .../testdata/prerelease/prerelease_wordsonly.test | 10 + .../cmd/gorelease/testdata/private/README.txt | 3 + .../cmd/gorelease/testdata/private/break.test | 12 + .../cmd/gorelease/testdata/private/unreported.test | 7 + .../cmd/gorelease/testdata/regress/README.txt | 1 + .../cmd/gorelease/testdata/regress/issue37756.test | 21 + .../cmd/gorelease/testdata/require/README.txt | 2 + .../testdata/require/add_requirement.test | 19 + .../testdata/require/decrement_go_version.test | 13 + .../require/decrement_requirement_minor.test | 18 + .../testdata/require/increment_go_version.test | 13 + .../require/increment_requirement_minor.test | 19 + .../require/increment_requirement_patch.test | 19 + .../testdata/require/remove_requirements.test | 13 + .../retract/retract_verify_direct_dep.test | 10 + .../testdata/retract/retract_verify_long_msg.test | 22 + .../testdata/retract/retract_verify_no_msg.test | 22 + .../retract/retract_verify_transitive_dep.test | 12 + .../cmd/gorelease/testdata/sub/README.txt | 10 + .../cmd/gorelease/testdata/sub/nest.test | 13 + .../cmd/gorelease/testdata/sub/nest_v2.test | 13 + .../cmd/gorelease/testdata/sub/nest_v2_dir.test | 13 + .../cmd/gorelease/testdata/sub/v2_dir.test | 13 + .../cmd/gorelease/testdata/sub/v2_root.test | 12 + .../cmd/gorelease/testdata/tidy/README.txt | 5 + .../cmd/gorelease/testdata/tidy/empty_sum.test | 20 + .../gorelease/testdata/tidy/misleading_req.test | 31 + .../cmd/gorelease/testdata/tidy/missing_go.test | 13 + .../gorelease/testdata/tidy/missing_req_basic.test | 19 + .../testdata/tidy/missing_req_nested.test | 25 + .../testdata/tidy/missing_req_submodule.test | 20 + .../testdata/tidy/missing_req_twice_nested.test | 25 + .../cmd/gorelease/testdata/tidy/no_sum.test | 19 + .../cmd/macos-roots-test/main.go | 122 + .../cmd/macos-roots-test/root_cgo_darwin.go | 290 + .../cmd/macos-roots-test/root_darwin.go | 174 + .../cmd/macos-roots-test/root_nocgo_darwin.go | 17 + .../cmd/modgraphviz/main.go | 166 + .../cmd/modgraphviz/main_test.go | 116 + .../cmd/txtar/txtar.go | 196 + .../cmd/txtar/txtar_test.go | 178 + .../codereview.cfg | 1 + .../constraints/constraints.go | 50 + .../constraints/constraints_test.go | 160 + .../devtools/checklib.sh | 73 + .../ebnf/ebnf.go | 267 + .../ebnf/ebnf_test.go | 73 + .../ebnf/parser.go | 189 + .../ebnflint/doc.go | 21 + .../ebnflint/ebnflint.go | 123 + .../ebnflint/ebnflint_test.go | 22 + .../exp@v0.0.0-20220613132600-b0d781184e0d/go.mod | 14 + .../exp@v0.0.0-20220613132600-b0d781184e0d/go.sum | 14 + .../inotify/README.txt | 3 + .../io/i2c/devfs.go | 80 + .../io/i2c/devfs_nonlinux.go | 25 + .../io/i2c/driver/driver.go | 24 + .../io/i2c/example/displayip/main.go | 89 + .../io/i2c/example_test.go | 24 + .../io/i2c/i2c.go | 75 + .../io/i2c/i2c_test.go | 31 + .../io/spi/devfs.go | 177 + .../io/spi/devfs_nonlinux.go | 40 + .../io/spi/driver/driver.go | 50 + .../io/spi/example_test.go | 38 + .../io/spi/spi.go | 107 + .../maps/maps.go | 90 + .../maps/maps_test.go | 169 + .../mmap/manual_test_program.go | 56 + .../mmap/mmap_other.go | 76 + .../mmap/mmap_test.go | 34 + .../mmap/mmap_unix.go | 117 + .../mmap/mmap_windows.go | 123 + .../rand/arith128_test.go | 126 + .../rand/example_test.go | 163 + .../rand/exp.go | 221 + .../rand/modulo_test.go | 50 + .../rand/normal.go | 156 + .../rand/race_test.go | 48 + .../rand/rand.go | 372 + .../rand/rand_test.go | 617 + .../rand/regress_test.go | 490 + .../rand/rng.go | 91 + .../rand/zipf.go | 77 + .../shootout/README | 4 + .../shootout/binary-tree-freelist.go | 132 + .../shootout/binary-tree-freelist.txt | 8 + .../shootout/binary-tree.c | 166 + .../shootout/binary-tree.go | 95 + .../shootout/binary-tree.txt | 8 + .../shootout/chameneosredux.c | 332 + .../shootout/chameneosredux.go | 183 + .../shootout/chameneosredux.txt | 29 + .../shootout/fannkuch-parallel.go | 227 + .../shootout/fannkuch-parallel.txt | 31 + .../shootout/fannkuch.c | 136 + .../shootout/fannkuch.go | 125 + .../shootout/fannkuch.txt | 31 + .../shootout/fasta-1000.txt | 171 + .../shootout/fasta.c | 221 + .../shootout/fasta.go | 208 + .../shootout/fasta.txt | 171 + .../shootout/k-nucleotide-parallel.go | 160 + .../shootout/k-nucleotide-parallel.txt | 27 + .../shootout/k-nucleotide.c | 230 + .../shootout/k-nucleotide.go | 143 + .../shootout/k-nucleotide.txt | 27 + .../shootout/mandelbrot.c | 93 + .../shootout/mandelbrot.go | 98 + .../shootout/mandelbrot.txt | Bin 0 -> 5011 bytes .../shootout/meteor-contest.c | 628 + .../shootout/meteor-contest.go | 659 + .../shootout/meteor-contest.txt | 24 + .../shootout/nbody.c | 172 + .../shootout/nbody.go | 180 + .../shootout/nbody.txt | 2 + .../shootout/pidigits.c | 125 + .../shootout/pidigits.go | 138 + .../shootout/pidigits.txt | 3 + .../shootout/regex-dna-parallel.go | 127 + .../shootout/regex-dna-parallel.txt | 13 + .../shootout/regex-dna.c | 156 + .../shootout/regex-dna.go | 109 + .../shootout/regex-dna.txt | 13 + .../shootout/reverse-complement.c | 102 + .../shootout/reverse-complement.go | 108 + .../shootout/reverse-complement.txt | 171 + .../shootout/spectral-norm-parallel.go | 114 + .../shootout/spectral-norm.c | 84 + .../shootout/spectral-norm.go | 96 + .../shootout/spectral-norm.txt | 1 + .../shootout/threadring.c | 115 + .../shootout/threadring.go | 74 + .../shootout/threadring.txt | 1 + .../shootout/timing.log | 1254 + .../shootout/timing.sh | 252 + .../slices/slices.go | 218 + .../slices/slices_test.go | 552 + .../slices/sort.go | 127 + .../slices/sort_benchmark_test.go | 202 + .../slices/sort_test.go | 285 + .../slices/zsortfunc.go | 479 + .../slices/zsortordered.go | 481 + .../utf8string/string.go | 203 + .../utf8string/string_test.go | 123 + .../AUTHORS | 3 + .../CONTRIBUTING.md | 26 + .../CONTRIBUTORS | 3 + .../LICENSE | 27 + .../PATENTS | 22 + .../README.md | 20 + .../codereview.cfg | 1 + .../errgroup/errgroup.go | 66 + .../errgroup/errgroup_example_md5all_test.go | 101 + .../errgroup/errgroup_test.go | 176 + .../sync@v0.0.0-20210220032951-036812b2e83c/go.mod | 1 + .../semaphore/semaphore.go | 136 + .../semaphore/semaphore_bench_test.go | 132 + .../semaphore/semaphore_example_test.go | 84 + .../semaphore/semaphore_test.go | 202 + .../singleflight/singleflight.go | 212 + .../singleflight/singleflight_test.go | 320 + .../syncmap/go19.go | 18 + .../syncmap/map.go | 8 + .../syncmap/map_bench_test.go | 216 + .../syncmap/map_reference_test.go | 151 + .../syncmap/map_test.go | 172 + .../syncmap/pre_go19.go | 371 + .../pkg/mod/golang.org/x/sys@v0.1.0/.gitattributes | 10 + .../pkg/mod/golang.org/x/sys@v0.1.0/.gitignore | 2 + .../mod/golang.org/x/sys@v0.1.0/CONTRIBUTING.md | 26 + .../pkg/mod/golang.org/x/sys@v0.1.0/LICENSE | 27 + .../pkg/mod/golang.org/x/sys@v0.1.0/PATENTS | 22 + .../pkg/mod/golang.org/x/sys@v0.1.0/README.md | 20 + .../pkg/mod/golang.org/x/sys@v0.1.0/codereview.cfg | 1 + .../golang.org/x/sys@v0.1.0/cpu/asm_aix_ppc64.s | 18 + .../mod/golang.org/x/sys@v0.1.0/cpu/byteorder.go | 66 + .../pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu.go | 287 + .../pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_aix.go | 34 + .../pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_arm.go | 73 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_arm64.go | 172 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_arm64.s | 32 + .../golang.org/x/sys@v0.1.0/cpu/cpu_gc_arm64.go | 12 + .../golang.org/x/sys@v0.1.0/cpu/cpu_gc_s390x.go | 22 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_gc_x86.go | 17 + .../golang.org/x/sys@v0.1.0/cpu/cpu_gccgo_arm64.go | 12 + .../golang.org/x/sys@v0.1.0/cpu/cpu_gccgo_s390x.go | 23 + .../golang.org/x/sys@v0.1.0/cpu/cpu_gccgo_x86.c | 38 + .../golang.org/x/sys@v0.1.0/cpu/cpu_gccgo_x86.go | 33 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_linux.go | 16 + .../golang.org/x/sys@v0.1.0/cpu/cpu_linux_arm.go | 39 + .../golang.org/x/sys@v0.1.0/cpu/cpu_linux_arm64.go | 71 + .../x/sys@v0.1.0/cpu/cpu_linux_mips64x.go | 24 + .../x/sys@v0.1.0/cpu/cpu_linux_noinit.go | 10 + .../x/sys@v0.1.0/cpu/cpu_linux_ppc64x.go | 32 + .../golang.org/x/sys@v0.1.0/cpu/cpu_linux_s390x.go | 40 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_loong64.go | 13 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_mips64x.go | 16 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_mipsx.go | 12 + .../x/sys@v0.1.0/cpu/cpu_netbsd_arm64.go | 173 + .../x/sys@v0.1.0/cpu/cpu_openbsd_arm64.go | 65 + .../x/sys@v0.1.0/cpu/cpu_openbsd_arm64.s | 11 + .../golang.org/x/sys@v0.1.0/cpu/cpu_other_arm.go | 10 + .../golang.org/x/sys@v0.1.0/cpu/cpu_other_arm64.go | 10 + .../x/sys@v0.1.0/cpu/cpu_other_mips64x.go | 13 + .../x/sys@v0.1.0/cpu/cpu_other_ppc64x.go | 15 + .../x/sys@v0.1.0/cpu/cpu_other_riscv64.go | 12 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_ppc64x.go | 17 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_riscv64.go | 12 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_s390x.go | 172 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_s390x.s | 58 + .../golang.org/x/sys@v0.1.0/cpu/cpu_s390x_test.go | 75 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_test.go | 76 + .../mod/golang.org/x/sys@v0.1.0/cpu/cpu_wasm.go | 18 + .../pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_x86.go | 145 + .../pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_x86.s | 28 + .../pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_zos.go | 10 + .../golang.org/x/sys@v0.1.0/cpu/cpu_zos_s390x.go | 25 + .../mod/golang.org/x/sys@v0.1.0/cpu/hwcap_linux.go | 56 + .../x/sys@v0.1.0/cpu/syscall_aix_gccgo.go | 27 + .../x/sys@v0.1.0/cpu/syscall_aix_ppc64_gc.go | 36 + .../mod/golang.org/x/sys@v0.1.0/execabs/execabs.go | 102 + .../x/sys@v0.1.0/execabs/execabs_go118.go | 12 + .../x/sys@v0.1.0/execabs/execabs_go119.go | 15 + .../x/sys@v0.1.0/execabs/execabs_test.go | 132 + .../pkg/mod/golang.org/x/sys@v0.1.0/go.mod | 3 + .../internal/unsafeheader/unsafeheader.go | 30 + .../internal/unsafeheader/unsafeheader_test.go | 101 + .../pkg/mod/golang.org/x/sys@v0.1.0/plan9/asm.s | 8 + .../golang.org/x/sys@v0.1.0/plan9/asm_plan9_386.s | 30 + .../x/sys@v0.1.0/plan9/asm_plan9_amd64.s | 30 + .../golang.org/x/sys@v0.1.0/plan9/asm_plan9_arm.s | 25 + .../golang.org/x/sys@v0.1.0/plan9/const_plan9.go | 70 + .../mod/golang.org/x/sys@v0.1.0/plan9/dir_plan9.go | 212 + .../mod/golang.org/x/sys@v0.1.0/plan9/env_plan9.go | 31 + .../golang.org/x/sys@v0.1.0/plan9/errors_plan9.go | 50 + .../pkg/mod/golang.org/x/sys@v0.1.0/plan9/mkall.sh | 150 + .../mod/golang.org/x/sys@v0.1.0/plan9/mkerrors.sh | 246 + .../mod/golang.org/x/sys@v0.1.0/plan9/mksyscall.go | 400 + .../x/sys@v0.1.0/plan9/mksysnum_plan9.sh | 23 + .../x/sys@v0.1.0/plan9/pwd_go15_plan9.go | 22 + .../mod/golang.org/x/sys@v0.1.0/plan9/pwd_plan9.go | 24 + .../pkg/mod/golang.org/x/sys@v0.1.0/plan9/race.go | 31 + .../pkg/mod/golang.org/x/sys@v0.1.0/plan9/race0.go | 26 + .../pkg/mod/golang.org/x/sys@v0.1.0/plan9/str.go | 23 + .../mod/golang.org/x/sys@v0.1.0/plan9/syscall.go | 110 + .../golang.org/x/sys@v0.1.0/plan9/syscall_plan9.go | 361 + .../golang.org/x/sys@v0.1.0/plan9/syscall_test.go | 34 + .../x/sys@v0.1.0/plan9/zsyscall_plan9_386.go | 285 + .../x/sys@v0.1.0/plan9/zsyscall_plan9_amd64.go | 285 + .../x/sys@v0.1.0/plan9/zsyscall_plan9_arm.go | 285 + .../golang.org/x/sys@v0.1.0/plan9/zsysnum_plan9.go | 49 + .../mod/golang.org/x/sys@v0.1.0/unix/.gitignore | 2 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/README.md | 184 + .../golang.org/x/sys@v0.1.0/unix/affinity_linux.go | 86 + .../mod/golang.org/x/sys@v0.1.0/unix/aliases.go | 15 + .../golang.org/x/sys@v0.1.0/unix/asm_aix_ppc64.s | 18 + .../mod/golang.org/x/sys@v0.1.0/unix/asm_bsd_386.s | 29 + .../golang.org/x/sys@v0.1.0/unix/asm_bsd_amd64.s | 29 + .../mod/golang.org/x/sys@v0.1.0/unix/asm_bsd_arm.s | 29 + .../golang.org/x/sys@v0.1.0/unix/asm_bsd_arm64.s | 29 + .../golang.org/x/sys@v0.1.0/unix/asm_bsd_ppc64.s | 31 + .../golang.org/x/sys@v0.1.0/unix/asm_bsd_riscv64.s | 29 + .../golang.org/x/sys@v0.1.0/unix/asm_linux_386.s | 66 + .../golang.org/x/sys@v0.1.0/unix/asm_linux_amd64.s | 58 + .../golang.org/x/sys@v0.1.0/unix/asm_linux_arm.s | 57 + .../golang.org/x/sys@v0.1.0/unix/asm_linux_arm64.s | 53 + .../x/sys@v0.1.0/unix/asm_linux_loong64.s | 54 + .../x/sys@v0.1.0/unix/asm_linux_mips64x.s | 57 + .../golang.org/x/sys@v0.1.0/unix/asm_linux_mipsx.s | 55 + .../x/sys@v0.1.0/unix/asm_linux_ppc64x.s | 45 + .../x/sys@v0.1.0/unix/asm_linux_riscv64.s | 49 + .../golang.org/x/sys@v0.1.0/unix/asm_linux_s390x.s | 57 + .../x/sys@v0.1.0/unix/asm_openbsd_mips64.s | 30 + .../x/sys@v0.1.0/unix/asm_solaris_amd64.s | 18 + .../golang.org/x/sys@v0.1.0/unix/asm_zos_s390x.s | 426 + .../x/sys@v0.1.0/unix/bluetooth_linux.go | 36 + .../golang.org/x/sys@v0.1.0/unix/cap_freebsd.go | 196 + .../mod/golang.org/x/sys@v0.1.0/unix/constants.go | 14 + .../mod/golang.org/x/sys@v0.1.0/unix/creds_test.go | 296 + .../x/sys@v0.1.0/unix/darwin_amd64_test.go | 161 + .../x/sys@v0.1.0/unix/darwin_arm64_test.go | 161 + .../golang.org/x/sys@v0.1.0/unix/darwin_test.go | 71 + .../golang.org/x/sys@v0.1.0/unix/dev_aix_ppc.go | 27 + .../golang.org/x/sys@v0.1.0/unix/dev_aix_ppc64.go | 29 + .../mod/golang.org/x/sys@v0.1.0/unix/dev_darwin.go | 24 + .../golang.org/x/sys@v0.1.0/unix/dev_dragonfly.go | 30 + .../golang.org/x/sys@v0.1.0/unix/dev_freebsd.go | 30 + .../mod/golang.org/x/sys@v0.1.0/unix/dev_linux.go | 42 + .../golang.org/x/sys@v0.1.0/unix/dev_linux_test.go | 57 + .../mod/golang.org/x/sys@v0.1.0/unix/dev_netbsd.go | 29 + .../golang.org/x/sys@v0.1.0/unix/dev_openbsd.go | 29 + .../mod/golang.org/x/sys@v0.1.0/unix/dev_zos.go | 29 + .../golang.org/x/sys@v0.1.0/unix/dev_zos_test.go | 57 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/dirent.go | 103 + .../golang.org/x/sys@v0.1.0/unix/dirent_test.go | 151 + .../mod/golang.org/x/sys@v0.1.0/unix/endian_big.go | 10 + .../golang.org/x/sys@v0.1.0/unix/endian_little.go | 10 + .../mod/golang.org/x/sys@v0.1.0/unix/env_unix.go | 32 + .../mod/golang.org/x/sys@v0.1.0/unix/epoll_zos.go | 221 + .../golang.org/x/sys@v0.1.0/unix/epoll_zos_test.go | 277 + .../x/sys@v0.1.0/unix/example_exec_test.go | 20 + .../x/sys@v0.1.0/unix/example_flock_test.go | 26 + .../x/sys@v0.1.0/unix/example_sysvshm_test.go | 51 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/fcntl.go | 37 + .../golang.org/x/sys@v0.1.0/unix/fcntl_darwin.go | 24 + .../x/sys@v0.1.0/unix/fcntl_linux_32bit.go | 14 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/fdset.go | 30 + .../mod/golang.org/x/sys@v0.1.0/unix/fdset_test.go | 64 + .../golang.org/x/sys@v0.1.0/unix/fstatfs_zos.go | 164 + .../x/sys@v0.1.0/unix/fstatfs_zos_test.go | 73 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/gccgo.go | 60 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/gccgo_c.c | 45 + .../x/sys@v0.1.0/unix/gccgo_linux_amd64.go | 21 + .../x/sys@v0.1.0/unix/getdirentries_test.go | 84 + .../golang.org/x/sys@v0.1.0/unix/getfsstat_test.go | 47 + .../golang.org/x/sys@v0.1.0/unix/ifreq_linux.go | 142 + .../x/sys@v0.1.0/unix/ifreq_linux_test.go | 175 + .../x/sys@v0.1.0/unix/internal/mkmerge/mkmerge.go | 522 + .../unix/internal/mkmerge/mkmerge_test.go | 506 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/ioctl.go | 75 + .../golang.org/x/sys@v0.1.0/unix/ioctl_linux.go | 233 + .../mod/golang.org/x/sys@v0.1.0/unix/ioctl_zos.go | 74 + .../golang.org/x/sys@v0.1.0/unix/linux/Dockerfile | 74 + .../golang.org/x/sys@v0.1.0/unix/linux/mkall.go | 992 + .../golang.org/x/sys@v0.1.0/unix/linux/mksysnum.go | 150 + .../golang.org/x/sys@v0.1.0/unix/linux/types.go | 5531 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/mkall.sh | 249 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/mkasm.go | 140 + .../mod/golang.org/x/sys@v0.1.0/unix/mkerrors.sh | 778 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/mkpost.go | 206 + .../mod/golang.org/x/sys@v0.1.0/unix/mksyscall.go | 411 + .../x/sys@v0.1.0/unix/mksyscall_aix_ppc.go | 420 + .../x/sys@v0.1.0/unix/mksyscall_aix_ppc64.go | 619 + .../x/sys@v0.1.0/unix/mksyscall_solaris.go | 346 + .../x/sys@v0.1.0/unix/mksysctl_openbsd.go | 358 + .../mod/golang.org/x/sys@v0.1.0/unix/mksysnum.go | 198 + .../golang.org/x/sys@v0.1.0/unix/mmap_unix_test.go | 42 + .../golang.org/x/sys@v0.1.0/unix/mmap_zos_test.go | 87 + .../golang.org/x/sys@v0.1.0/unix/openbsd_test.go | 114 + .../golang.org/x/sys@v0.1.0/unix/pagesize_unix.go | 16 + .../mod/golang.org/x/sys@v0.1.0/unix/pipe2_test.go | 95 + .../golang.org/x/sys@v0.1.0/unix/pledge_openbsd.go | 163 + .../golang.org/x/sys@v0.1.0/unix/ptrace_darwin.go | 12 + .../mod/golang.org/x/sys@v0.1.0/unix/ptrace_ios.go | 12 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/race.go | 31 + .../pkg/mod/golang.org/x/sys@v0.1.0/unix/race0.go | 26 + .../x/sys@v0.1.0/unix/readdirent_getdents.go | 13 + .../x/sys@v0.1.0/unix/readdirent_getdirentries.go | 20 + .../golang.org/x/sys@v0.1.0/unix/sendfile_test.go | 104 + .../x/sys@v0.1.0/unix/sockcmsg_dragonfly.go | 16 + .../golang.org/x/sys@v0.1.0/unix/sockcmsg_linux.go | 85 + .../golang.org/x/sys@v0.1.0/unix/sockcmsg_unix.go | 93 + .../x/sys@v0.1.0/unix/sockcmsg_unix_other.go | 47 + .../mod/golang.org/x/sys@v0.1.0/unix/syscall.go | 87 + .../golang.org/x/sys@v0.1.0/unix/syscall_aix.go | 600 + .../x/sys@v0.1.0/unix/syscall_aix_ppc.go | 54 + .../x/sys@v0.1.0/unix/syscall_aix_ppc64.go | 85 + .../x/sys@v0.1.0/unix/syscall_aix_test.go | 108 + .../golang.org/x/sys@v0.1.0/unix/syscall_bsd.go | 625 + .../x/sys@v0.1.0/unix/syscall_bsd_test.go | 61 + .../golang.org/x/sys@v0.1.0/unix/syscall_darwin.go | 830 + .../x/sys@v0.1.0/unix/syscall_darwin_amd64.go | 51 + .../x/sys@v0.1.0/unix/syscall_darwin_arm64.go | 51 + .../x/sys@v0.1.0/unix/syscall_darwin_libSystem.go | 27 + .../x/sys@v0.1.0/unix/syscall_darwin_test.go | 294 + .../x/sys@v0.1.0/unix/syscall_dragonfly.go | 544 + .../x/sys@v0.1.0/unix/syscall_dragonfly_amd64.go | 57 + .../x/sys@v0.1.0/unix/syscall_freebsd.go | 614 + .../x/sys@v0.1.0/unix/syscall_freebsd_386.go | 67 + .../x/sys@v0.1.0/unix/syscall_freebsd_amd64.go | 67 + .../x/sys@v0.1.0/unix/syscall_freebsd_arm.go | 63 + .../x/sys@v0.1.0/unix/syscall_freebsd_arm64.go | 63 + .../x/sys@v0.1.0/unix/syscall_freebsd_riscv64.go | 63 + .../x/sys@v0.1.0/unix/syscall_freebsd_test.go | 349 + .../x/sys@v0.1.0/unix/syscall_illumos.go | 79 + .../x/sys@v0.1.0/unix/syscall_internal_bsd_test.go | 155 + .../unix/syscall_internal_darwin_test.go | 209 + .../sys@v0.1.0/unix/syscall_internal_linux_test.go | 942 + .../unix/syscall_internal_solaris_test.go | 236 + .../golang.org/x/sys@v0.1.0/unix/syscall_linux.go | 2476 + .../x/sys@v0.1.0/unix/syscall_linux_386.go | 342 + .../x/sys@v0.1.0/unix/syscall_linux_alarm.go | 14 + .../x/sys@v0.1.0/unix/syscall_linux_amd64.go | 147 + .../x/sys@v0.1.0/unix/syscall_linux_amd64_gc.go | 13 + .../x/sys@v0.1.0/unix/syscall_linux_arm.go | 244 + .../x/sys@v0.1.0/unix/syscall_linux_arm64.go | 195 + .../x/sys@v0.1.0/unix/syscall_linux_gc.go | 15 + .../x/sys@v0.1.0/unix/syscall_linux_gc_386.go | 17 + .../x/sys@v0.1.0/unix/syscall_linux_gc_arm.go | 14 + .../x/sys@v0.1.0/unix/syscall_linux_gccgo_386.go | 31 + .../x/sys@v0.1.0/unix/syscall_linux_gccgo_arm.go | 21 + .../x/sys@v0.1.0/unix/syscall_linux_loong64.go | 222 + .../x/sys@v0.1.0/unix/syscall_linux_mips64x.go | 191 + .../x/sys@v0.1.0/unix/syscall_linux_mipsx.go | 203 + .../x/sys@v0.1.0/unix/syscall_linux_ppc.go | 232 + .../x/sys@v0.1.0/unix/syscall_linux_ppc64x.go | 118 + .../x/sys@v0.1.0/unix/syscall_linux_riscv64.go | 180 + .../x/sys@v0.1.0/unix/syscall_linux_s390x.go | 298 + .../x/sys@v0.1.0/unix/syscall_linux_sparc64.go | 114 + .../x/sys@v0.1.0/unix/syscall_linux_test.go | 1101 + .../golang.org/x/sys@v0.1.0/unix/syscall_netbsd.go | 609 + .../x/sys@v0.1.0/unix/syscall_netbsd_386.go | 38 + .../x/sys@v0.1.0/unix/syscall_netbsd_amd64.go | 38 + .../x/sys@v0.1.0/unix/syscall_netbsd_arm.go | 38 + .../x/sys@v0.1.0/unix/syscall_netbsd_arm64.go | 38 + .../x/sys@v0.1.0/unix/syscall_netbsd_test.go | 74 + .../x/sys@v0.1.0/unix/syscall_openbsd.go | 389 + .../x/sys@v0.1.0/unix/syscall_openbsd_386.go | 42 + .../x/sys@v0.1.0/unix/syscall_openbsd_amd64.go | 42 + .../x/sys@v0.1.0/unix/syscall_openbsd_arm.go | 42 + .../x/sys@v0.1.0/unix/syscall_openbsd_arm64.go | 42 + .../x/sys@v0.1.0/unix/syscall_openbsd_libc.go | 27 + .../x/sys@v0.1.0/unix/syscall_openbsd_mips64.go | 39 + .../x/sys@v0.1.0/unix/syscall_openbsd_ppc64.go | 42 + .../x/sys@v0.1.0/unix/syscall_openbsd_riscv64.go | 42 + .../x/sys@v0.1.0/unix/syscall_openbsd_test.go | 50 + .../x/sys@v0.1.0/unix/syscall_solaris.go | 1132 + .../x/sys@v0.1.0/unix/syscall_solaris_amd64.go | 28 + .../x/sys@v0.1.0/unix/syscall_solaris_test.go | 386 + .../golang.org/x/sys@v0.1.0/unix/syscall_test.go | 55 + .../golang.org/x/sys@v0.1.0/unix/syscall_unix.go | 554 + .../x/sys@v0.1.0/unix/syscall_unix_gc.go | 16 + .../x/sys@v0.1.0/unix/syscall_unix_gc_ppc64x.go | 25 + .../x/sys@v0.1.0/unix/syscall_unix_test.go | 1069 + .../x/sys@v0.1.0/unix/syscall_zos_s390x.go | 1994 + .../x/sys@v0.1.0/unix/syscall_zos_test.go | 863 + .../golang.org/x/sys@v0.1.0/unix/sysvshm_linux.go | 21 + .../golang.org/x/sys@v0.1.0/unix/sysvshm_unix.go | 52 + .../x/sys@v0.1.0/unix/sysvshm_unix_other.go | 14 + .../x/sys@v0.1.0/unix/sysvshm_unix_test.go | 79 + .../mod/golang.org/x/sys@v0.1.0/unix/timestruct.go | 77 + .../x/sys@v0.1.0/unix/timestruct_test.go | 55 + .../mod/golang.org/x/sys@v0.1.0/unix/types_aix.go | 238 + .../golang.org/x/sys@v0.1.0/unix/types_darwin.go | 379 + .../x/sys@v0.1.0/unix/types_dragonfly.go | 274 + .../golang.org/x/sys@v0.1.0/unix/types_freebsd.go | 374 + .../golang.org/x/sys@v0.1.0/unix/types_netbsd.go | 304 + .../golang.org/x/sys@v0.1.0/unix/types_openbsd.go | 287 + .../golang.org/x/sys@v0.1.0/unix/types_solaris.go | 341 + .../golang.org/x/sys@v0.1.0/unix/unveil_openbsd.go | 42 + .../mod/golang.org/x/sys@v0.1.0/unix/xattr_bsd.go | 276 + .../mod/golang.org/x/sys@v0.1.0/unix/xattr_test.go | 208 + .../x/sys@v0.1.0/unix/zerrors_aix_ppc.go | 1385 + .../x/sys@v0.1.0/unix/zerrors_aix_ppc64.go | 1386 + .../x/sys@v0.1.0/unix/zerrors_darwin_amd64.go | 1892 + .../x/sys@v0.1.0/unix/zerrors_darwin_arm64.go | 1892 + .../x/sys@v0.1.0/unix/zerrors_dragonfly_amd64.go | 1738 + .../x/sys@v0.1.0/unix/zerrors_freebsd_386.go | 2043 + .../x/sys@v0.1.0/unix/zerrors_freebsd_amd64.go | 2040 + .../x/sys@v0.1.0/unix/zerrors_freebsd_arm.go | 2034 + .../x/sys@v0.1.0/unix/zerrors_freebsd_arm64.go | 2034 + .../x/sys@v0.1.0/unix/zerrors_freebsd_riscv64.go | 2148 + .../golang.org/x/sys@v0.1.0/unix/zerrors_linux.go | 3457 + .../x/sys@v0.1.0/unix/zerrors_linux_386.go | 828 + .../x/sys@v0.1.0/unix/zerrors_linux_amd64.go | 828 + .../x/sys@v0.1.0/unix/zerrors_linux_arm.go | 834 + .../x/sys@v0.1.0/unix/zerrors_linux_arm64.go | 826 + .../x/sys@v0.1.0/unix/zerrors_linux_loong64.go | 818 + .../x/sys@v0.1.0/unix/zerrors_linux_mips.go | 835 + .../x/sys@v0.1.0/unix/zerrors_linux_mips64.go | 835 + .../x/sys@v0.1.0/unix/zerrors_linux_mips64le.go | 835 + .../x/sys@v0.1.0/unix/zerrors_linux_mipsle.go | 835 + .../x/sys@v0.1.0/unix/zerrors_linux_ppc.go | 887 + .../x/sys@v0.1.0/unix/zerrors_linux_ppc64.go | 891 + .../x/sys@v0.1.0/unix/zerrors_linux_ppc64le.go | 891 + .../x/sys@v0.1.0/unix/zerrors_linux_riscv64.go | 815 + .../x/sys@v0.1.0/unix/zerrors_linux_s390x.go | 890 + .../x/sys@v0.1.0/unix/zerrors_linux_sparc64.go | 885 + .../x/sys@v0.1.0/unix/zerrors_netbsd_386.go | 1780 + .../x/sys@v0.1.0/unix/zerrors_netbsd_amd64.go | 1770 + .../x/sys@v0.1.0/unix/zerrors_netbsd_arm.go | 1759 + .../x/sys@v0.1.0/unix/zerrors_netbsd_arm64.go | 1770 + .../x/sys@v0.1.0/unix/zerrors_openbsd_386.go | 1668 + .../x/sys@v0.1.0/unix/zerrors_openbsd_amd64.go | 1775 + .../x/sys@v0.1.0/unix/zerrors_openbsd_arm.go | 1670 + .../x/sys@v0.1.0/unix/zerrors_openbsd_arm64.go | 1798 + .../x/sys@v0.1.0/unix/zerrors_openbsd_mips64.go | 1863 + .../x/sys@v0.1.0/unix/zerrors_openbsd_ppc64.go | 1905 + .../x/sys@v0.1.0/unix/zerrors_openbsd_riscv64.go | 1904 + .../x/sys@v0.1.0/unix/zerrors_solaris_amd64.go | 1557 + .../x/sys@v0.1.0/unix/zerrors_zos_s390x.go | 860 + .../x/sys@v0.1.0/unix/zptrace_armnn_linux.go | 42 + .../x/sys@v0.1.0/unix/zptrace_linux_arm64.go | 17 + .../x/sys@v0.1.0/unix/zptrace_mipsnn_linux.go | 51 + .../x/sys@v0.1.0/unix/zptrace_mipsnnle_linux.go | 51 + .../x/sys@v0.1.0/unix/zptrace_x86_linux.go | 81 + .../x/sys@v0.1.0/unix/zsyscall_aix_ppc.go | 1485 + .../x/sys@v0.1.0/unix/zsyscall_aix_ppc64.go | 1443 + .../x/sys@v0.1.0/unix/zsyscall_aix_ppc64_gc.go | 1192 + .../x/sys@v0.1.0/unix/zsyscall_aix_ppc64_gccgo.go | 1070 + .../x/sys@v0.1.0/unix/zsyscall_darwin_amd64.go | 2545 + .../x/sys@v0.1.0/unix/zsyscall_darwin_amd64.s | 904 + .../x/sys@v0.1.0/unix/zsyscall_darwin_arm64.go | 2545 + .../x/sys@v0.1.0/unix/zsyscall_darwin_arm64.s | 904 + .../x/sys@v0.1.0/unix/zsyscall_dragonfly_amd64.go | 1679 + .../x/sys@v0.1.0/unix/zsyscall_freebsd_386.go | 1889 + .../x/sys@v0.1.0/unix/zsyscall_freebsd_amd64.go | 1889 + .../x/sys@v0.1.0/unix/zsyscall_freebsd_arm.go | 1889 + .../x/sys@v0.1.0/unix/zsyscall_freebsd_arm64.go | 1889 + .../x/sys@v0.1.0/unix/zsyscall_freebsd_riscv64.go | 1889 + .../x/sys@v0.1.0/unix/zsyscall_illumos_amd64.go | 102 + .../golang.org/x/sys@v0.1.0/unix/zsyscall_linux.go | 2163 + .../x/sys@v0.1.0/unix/zsyscall_linux_386.go | 497 + .../x/sys@v0.1.0/unix/zsyscall_linux_amd64.go | 664 + .../x/sys@v0.1.0/unix/zsyscall_linux_arm.go | 612 + .../x/sys@v0.1.0/unix/zsyscall_linux_arm64.go | 563 + .../x/sys@v0.1.0/unix/zsyscall_linux_loong64.go | 487 + .../x/sys@v0.1.0/unix/zsyscall_linux_mips.go | 664 + .../x/sys@v0.1.0/unix/zsyscall_linux_mips64.go | 658 + .../x/sys@v0.1.0/unix/zsyscall_linux_mips64le.go | 647 + .../x/sys@v0.1.0/unix/zsyscall_linux_mipsle.go | 664 + .../x/sys@v0.1.0/unix/zsyscall_linux_ppc.go | 669 + .../x/sys@v0.1.0/unix/zsyscall_linux_ppc64.go | 715 + .../x/sys@v0.1.0/unix/zsyscall_linux_ppc64le.go | 715 + .../x/sys@v0.1.0/unix/zsyscall_linux_riscv64.go | 543 + .../x/sys@v0.1.0/unix/zsyscall_linux_s390x.go | 506 + .../x/sys@v0.1.0/unix/zsyscall_linux_sparc64.go | 659 + .../x/sys@v0.1.0/unix/zsyscall_netbsd_386.go | 1850 + .../x/sys@v0.1.0/unix/zsyscall_netbsd_amd64.go | 1850 + .../x/sys@v0.1.0/unix/zsyscall_netbsd_arm.go | 1850 + .../x/sys@v0.1.0/unix/zsyscall_netbsd_arm64.go | 1850 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_386.go | 2221 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_386.s | 796 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_amd64.go | 2221 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_amd64.s | 796 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_arm.go | 2221 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_arm.s | 796 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_arm64.go | 2221 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_arm64.s | 796 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_mips64.go | 1693 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_ppc64.go | 2221 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_ppc64.s | 796 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_riscv64.go | 2221 + .../x/sys@v0.1.0/unix/zsyscall_openbsd_riscv64.s | 796 + .../x/sys@v0.1.0/unix/zsyscall_solaris_amd64.go | 2093 + .../x/sys@v0.1.0/unix/zsyscall_zos_s390x.go | 1255 + .../x/sys@v0.1.0/unix/zsysctl_openbsd_386.go | 274 + .../x/sys@v0.1.0/unix/zsysctl_openbsd_amd64.go | 272 + .../x/sys@v0.1.0/unix/zsysctl_openbsd_arm.go | 274 + .../x/sys@v0.1.0/unix/zsysctl_openbsd_arm64.go | 276 + .../x/sys@v0.1.0/unix/zsysctl_openbsd_mips64.go | 280 + .../x/sys@v0.1.0/unix/zsysctl_openbsd_ppc64.go | 281 + .../x/sys@v0.1.0/unix/zsysctl_openbsd_riscv64.go | 282 + .../x/sys@v0.1.0/unix/zsysnum_darwin_amd64.go | 440 + .../x/sys@v0.1.0/unix/zsysnum_darwin_arm64.go | 438 + .../x/sys@v0.1.0/unix/zsysnum_dragonfly_amd64.go | 317 + .../x/sys@v0.1.0/unix/zsysnum_freebsd_386.go | 394 + .../x/sys@v0.1.0/unix/zsysnum_freebsd_amd64.go | 394 + .../x/sys@v0.1.0/unix/zsysnum_freebsd_arm.go | 394 + .../x/sys@v0.1.0/unix/zsysnum_freebsd_arm64.go | 394 + .../x/sys@v0.1.0/unix/zsysnum_freebsd_riscv64.go | 394 + .../x/sys@v0.1.0/unix/zsysnum_linux_386.go | 450 + .../x/sys@v0.1.0/unix/zsysnum_linux_amd64.go | 372 + .../x/sys@v0.1.0/unix/zsysnum_linux_arm.go | 414 + .../x/sys@v0.1.0/unix/zsysnum_linux_arm64.go | 317 + .../x/sys@v0.1.0/unix/zsysnum_linux_loong64.go | 311 + .../x/sys@v0.1.0/unix/zsysnum_linux_mips.go | 434 + .../x/sys@v0.1.0/unix/zsysnum_linux_mips64.go | 364 + .../x/sys@v0.1.0/unix/zsysnum_linux_mips64le.go | 364 + .../x/sys@v0.1.0/unix/zsysnum_linux_mipsle.go | 434 + .../x/sys@v0.1.0/unix/zsysnum_linux_ppc.go | 441 + .../x/sys@v0.1.0/unix/zsysnum_linux_ppc64.go | 413 + .../x/sys@v0.1.0/unix/zsysnum_linux_ppc64le.go | 413 + .../x/sys@v0.1.0/unix/zsysnum_linux_riscv64.go | 316 + .../x/sys@v0.1.0/unix/zsysnum_linux_s390x.go | 378 + .../x/sys@v0.1.0/unix/zsysnum_linux_sparc64.go | 392 + .../x/sys@v0.1.0/unix/zsysnum_netbsd_386.go | 275 + .../x/sys@v0.1.0/unix/zsysnum_netbsd_amd64.go | 275 + .../x/sys@v0.1.0/unix/zsysnum_netbsd_arm.go | 275 + .../x/sys@v0.1.0/unix/zsysnum_netbsd_arm64.go | 275 + .../x/sys@v0.1.0/unix/zsysnum_openbsd_386.go | 220 + .../x/sys@v0.1.0/unix/zsysnum_openbsd_amd64.go | 220 + .../x/sys@v0.1.0/unix/zsysnum_openbsd_arm.go | 220 + .../x/sys@v0.1.0/unix/zsysnum_openbsd_arm64.go | 219 + .../x/sys@v0.1.0/unix/zsysnum_openbsd_mips64.go | 221 + .../x/sys@v0.1.0/unix/zsysnum_openbsd_ppc64.go | 218 + .../x/sys@v0.1.0/unix/zsysnum_openbsd_riscv64.go | 219 + .../x/sys@v0.1.0/unix/zsysnum_zos_s390x.go | 2670 + .../golang.org/x/sys@v0.1.0/unix/ztypes_aix_ppc.go | 354 + .../x/sys@v0.1.0/unix/ztypes_aix_ppc64.go | 358 + .../x/sys@v0.1.0/unix/ztypes_darwin_amd64.go | 795 + .../x/sys@v0.1.0/unix/ztypes_darwin_arm64.go | 795 + .../x/sys@v0.1.0/unix/ztypes_dragonfly_amd64.go | 474 + .../x/sys@v0.1.0/unix/ztypes_freebsd_386.go | 651 + .../x/sys@v0.1.0/unix/ztypes_freebsd_amd64.go | 656 + .../x/sys@v0.1.0/unix/ztypes_freebsd_arm.go | 642 + .../x/sys@v0.1.0/unix/ztypes_freebsd_arm64.go | 636 + .../x/sys@v0.1.0/unix/ztypes_freebsd_riscv64.go | 638 + .../golang.org/x/sys@v0.1.0/unix/ztypes_linux.go | 5609 + .../x/sys@v0.1.0/unix/ztypes_linux_386.go | 696 + .../x/sys@v0.1.0/unix/ztypes_linux_amd64.go | 711 + .../x/sys@v0.1.0/unix/ztypes_linux_arm.go | 691 + .../x/sys@v0.1.0/unix/ztypes_linux_arm64.go | 690 + .../x/sys@v0.1.0/unix/ztypes_linux_loong64.go | 691 + .../x/sys@v0.1.0/unix/ztypes_linux_mips.go | 696 + .../x/sys@v0.1.0/unix/ztypes_linux_mips64.go | 693 + .../x/sys@v0.1.0/unix/ztypes_linux_mips64le.go | 693 + .../x/sys@v0.1.0/unix/ztypes_linux_mipsle.go | 696 + .../x/sys@v0.1.0/unix/ztypes_linux_ppc.go | 704 + .../x/sys@v0.1.0/unix/ztypes_linux_ppc64.go | 699 + .../x/sys@v0.1.0/unix/ztypes_linux_ppc64le.go | 699 + .../x/sys@v0.1.0/unix/ztypes_linux_riscv64.go | 718 + .../x/sys@v0.1.0/unix/ztypes_linux_s390x.go | 713 + .../x/sys@v0.1.0/unix/ztypes_linux_sparc64.go | 694 + .../x/sys@v0.1.0/unix/ztypes_netbsd_386.go | 502 + .../x/sys@v0.1.0/unix/ztypes_netbsd_amd64.go | 510 + .../x/sys@v0.1.0/unix/ztypes_netbsd_arm.go | 507 + .../x/sys@v0.1.0/unix/ztypes_netbsd_arm64.go | 510 + .../x/sys@v0.1.0/unix/ztypes_openbsd_386.go | 574 + .../x/sys@v0.1.0/unix/ztypes_openbsd_amd64.go | 574 + .../x/sys@v0.1.0/unix/ztypes_openbsd_arm.go | 575 + .../x/sys@v0.1.0/unix/ztypes_openbsd_arm64.go | 568 + .../x/sys@v0.1.0/unix/ztypes_openbsd_mips64.go | 568 + .../x/sys@v0.1.0/unix/ztypes_openbsd_ppc64.go | 571 + .../x/sys@v0.1.0/unix/ztypes_openbsd_riscv64.go | 571 + .../x/sys@v0.1.0/unix/ztypes_solaris_amd64.go | 517 + .../x/sys@v0.1.0/unix/ztypes_zos_s390x.go | 415 + .../mod/golang.org/x/sys@v0.1.0/windows/aliases.go | 13 + .../golang.org/x/sys@v0.1.0/windows/dll_windows.go | 416 + .../mod/golang.org/x/sys@v0.1.0/windows/empty.s | 9 + .../golang.org/x/sys@v0.1.0/windows/env_windows.go | 54 + .../golang.org/x/sys@v0.1.0/windows/eventlog.go | 21 + .../x/sys@v0.1.0/windows/exec_windows.go | 178 + .../x/sys@v0.1.0/windows/memory_windows.go | 48 + .../golang.org/x/sys@v0.1.0/windows/mkerrors.bash | 70 + .../x/sys@v0.1.0/windows/mkknownfolderids.bash | 27 + .../golang.org/x/sys@v0.1.0/windows/mksyscall.go | 10 + .../windows/mkwinsyscall/mkwinsyscall.go | 980 + .../mod/golang.org/x/sys@v0.1.0/windows/race.go | 31 + .../mod/golang.org/x/sys@v0.1.0/windows/race0.go | 26 + .../x/sys@v0.1.0/windows/registry/export_test.go | 12 + .../x/sys@v0.1.0/windows/registry/key.go | 206 + .../x/sys@v0.1.0/windows/registry/mksyscall.go | 10 + .../x/sys@v0.1.0/windows/registry/registry_test.go | 677 + .../x/sys@v0.1.0/windows/registry/syscall.go | 33 + .../x/sys@v0.1.0/windows/registry/value.go | 387 + .../windows/registry/zsyscall_windows.go | 117 + .../x/sys@v0.1.0/windows/security_windows.go | 1444 + .../mod/golang.org/x/sys@v0.1.0/windows/service.go | 247 + .../x/sys@v0.1.0/windows/setupapi_windows.go | 1425 + .../pkg/mod/golang.org/x/sys@v0.1.0/windows/str.go | 23 + .../x/sys@v0.1.0/windows/svc/debug/log.go | 57 + .../x/sys@v0.1.0/windows/svc/debug/service.go | 45 + .../x/sys@v0.1.0/windows/svc/eventlog/install.go | 81 + .../x/sys@v0.1.0/windows/svc/eventlog/log.go | 70 + .../x/sys@v0.1.0/windows/svc/eventlog/log_test.go | 52 + .../x/sys@v0.1.0/windows/svc/example/beep.go | 23 + .../x/sys@v0.1.0/windows/svc/example/install.go | 93 + .../x/sys@v0.1.0/windows/svc/example/main.go | 76 + .../x/sys@v0.1.0/windows/svc/example/manage.go | 63 + .../x/sys@v0.1.0/windows/svc/example/service.go | 88 + .../x/sys@v0.1.0/windows/svc/mgr/config.go | 181 + .../golang.org/x/sys@v0.1.0/windows/svc/mgr/mgr.go | 215 + .../x/sys@v0.1.0/windows/svc/mgr/mgr_test.go | 296 + .../x/sys@v0.1.0/windows/svc/mgr/recovery.go | 142 + .../x/sys@v0.1.0/windows/svc/mgr/service.go | 78 + .../x/sys@v0.1.0/windows/svc/security.go | 101 + .../golang.org/x/sys@v0.1.0/windows/svc/service.go | 313 + .../x/sys@v0.1.0/windows/svc/svc_test.go | 245 + .../mod/golang.org/x/sys@v0.1.0/windows/syscall.go | 105 + .../x/sys@v0.1.0/windows/syscall_test.go | 103 + .../x/sys@v0.1.0/windows/syscall_windows.go | 1815 + .../x/sys@v0.1.0/windows/syscall_windows_test.go | 1080 + .../x/sys@v0.1.0/windows/testdata/README | 21 + .../x/sys@v0.1.0/windows/types_windows.go | 3260 + .../x/sys@v0.1.0/windows/types_windows_386.go | 35 + .../x/sys@v0.1.0/windows/types_windows_amd64.go | 34 + .../x/sys@v0.1.0/windows/types_windows_arm.go | 35 + .../x/sys@v0.1.0/windows/types_windows_arm64.go | 34 + .../x/sys@v0.1.0/windows/zerrors_windows.go | 9468 + .../sys@v0.1.0/windows/zknownfolderids_windows.go | 149 + .../x/sys@v0.1.0/windows/zsyscall_windows.go | 4302 + .../LICENSE | 27 + .../PATENTS | 22 + .../README | 2 + .../adaptor.go | 193 + .../codereview.cfg | 1 + .../doc.go | 23 + .../errors.go | 33 + .../errors_test.go | 67 + .../example_As_test.go | 25 + .../example_FormatError_test.go | 39 + .../example_test.go | 34 + .../fmt.go | 190 + .../fmt_test.go | 602 + .../fmt_unexported_test.go | 51 + .../format.go | 34 + .../frame.go | 56 + .../go.mod | 3 + .../internal/internal.go | 8 + .../stack_test.go | 60 + .../wrap.go | 112 + .../wrap_113_test.go | 29 + .../wrap_test.go | 258 + dependencies/pkg/sumdb/sum.golang.org/latest | 5 + doc/01-About.md | 23 + doc/02-Installation.md | 319 + doc/02-Installation.md.d/01-Amazon-Linux.md | 3 + doc/02-Installation.md.d/02-CentOS.md | 3 + doc/02-Installation.md.d/03-Debian.md | 3 + doc/02-Installation.md.d/04-RHEL.md | 3 + doc/02-Installation.md.d/05-SLES.md | 3 + doc/02-Installation.md.d/06-Ubuntu.md | 3 + doc/03-Configuration.md | 93 + doc/04-Upgrading.md | 35 + doc/05-Distributed-Setups.md | 85 + doc/06-Migration.md | 102 + doc/icingadb-migration.example.yml | 25 + doc/images/icingadb-architecture.png | Bin 0 -> 563761 bytes doc/images/icingadb-daemon.png | Bin 0 -> 527021 bytes doc/images/icingadb-dashboard.png | Bin 0 -> 246028 bytes doc/images/icingadb-database.png | Bin 0 -> 528639 bytes doc/images/icingadb-envs.png | Bin 0 -> 660235 bytes doc/images/icingadb-ha.png | Bin 0 -> 642860 bytes doc/images/icingadb-web.png | Bin 0 -> 532529 bytes go.mod | 43 + go.sum | 123 + internal/command/command.go | 58 + internal/internal.go | 48 + internal/version.go | 10 + pkg/backoff/backoff.go | 43 + pkg/com/atomic.go | 38 + pkg/com/bulker.go | 187 + pkg/com/com.go | 82 + pkg/com/cond.go | 90 + pkg/com/counter.go | 48 + pkg/common/sync_subject.go | 71 + pkg/config/config.go | 135 + pkg/config/database.go | 175 + pkg/config/history_retention.go | 30 + pkg/config/logging.go | 44 + pkg/config/redis.go | 116 + pkg/contracts/contracts.go | 90 + pkg/driver/driver.go | 114 + pkg/driver/pgsql.go | 22 + pkg/flatten/flatten.go | 30 + pkg/icingadb/cleanup.go | 80 + pkg/icingadb/db.go | 730 + pkg/icingadb/delta.go | 124 + pkg/icingadb/delta_test.go | 268 + pkg/icingadb/dump_signals.go | 136 + pkg/icingadb/entitiesbyid.go | 48 + pkg/icingadb/ha.go | 446 + pkg/icingadb/history/retention.go | 214 + pkg/icingadb/history/sla.go | 26 + pkg/icingadb/history/sync.go | 383 + pkg/icingadb/objectpacker/objectpacker.go | 214 + pkg/icingadb/objectpacker/objectpacker_test.go | 195 + pkg/icingadb/overdue/get_overdues.lua | 30 + pkg/icingadb/overdue/sync.go | 252 + pkg/icingadb/runtime_updates.go | 368 + pkg/icingadb/scoped_entity.go | 32 + pkg/icingadb/sync.go | 221 + pkg/icingadb/v1/checkable.go | 46 + pkg/icingadb/v1/command.go | 169 + pkg/icingadb/v1/comment.go | 27 + pkg/icingadb/v1/customvar.go | 160 + pkg/icingadb/v1/downtime.go | 35 + pkg/icingadb/v1/endpoint.go | 36 + pkg/icingadb/v1/entity.go | 28 + pkg/icingadb/v1/environment.go | 40 + pkg/icingadb/v1/history/ack.go | 82 + pkg/icingadb/v1/history/comment.go | 120 + pkg/icingadb/v1/history/downtime.go | 161 + pkg/icingadb/v1/history/flapping.go | 80 + pkg/icingadb/v1/history/meta.go | 80 + pkg/icingadb/v1/history/notification.go | 50 + pkg/icingadb/v1/history/state.go | 51 + pkg/icingadb/v1/host.go | 122 + pkg/icingadb/v1/icingadb_instance.go | 21 + pkg/icingadb/v1/meta.go | 86 + pkg/icingadb/v1/notification.go | 74 + pkg/icingadb/v1/overdue/host.go | 26 + pkg/icingadb/v1/overdue/service.go | 26 + pkg/icingadb/v1/service.go | 67 + pkg/icingadb/v1/state.go | 39 + pkg/icingadb/v1/timeperiod.go | 67 + pkg/icingadb/v1/url.go | 33 + pkg/icingadb/v1/user.go | 66 + pkg/icingadb/v1/v1.go | 58 + pkg/icingaredis/client.go | 243 + pkg/icingaredis/heartbeat.go | 218 + pkg/icingaredis/telemetry/heartbeat.go | 203 + pkg/icingaredis/telemetry/stats.go | 51 + pkg/icingaredis/utils.go | 128 + pkg/icingaredis/v1/icinga_status.go | 21 + pkg/icingaredis/v1/stats_message.go | 51 + pkg/logging/journald_core.go | 85 + pkg/logging/logger.go | 26 + pkg/logging/logging.go | 131 + pkg/periodic/periodic.go | 123 + pkg/retry/retry.go | 134 + pkg/structify/structify.go | 179 + pkg/types/acknowledgement_state.go | 61 + pkg/types/binary.go | 137 + pkg/types/bool.go | 105 + pkg/types/comment_type.go | 79 + pkg/types/float.go | 68 + pkg/types/int.go | 68 + pkg/types/notification_states.go | 78 + pkg/types/notification_type.go | 68 + pkg/types/notification_types.go | 81 + pkg/types/state_type.go | 65 + pkg/types/string.go | 74 + pkg/types/unix_milli.go | 95 + pkg/types/uuid.go | 24 + pkg/utils/utils.go | 208 + pkg/version/version.go | 180 + schema/mysql/schema.sql | 1333 + schema/mysql/upgrades/1.0.0-rc2.sql | 468 + schema/mysql/upgrades/1.0.0.sql | 291 + schema/pgsql/schema.sql | 2163 + tests/cleanup_and_retention_test.go | 228 + tests/environment_test.go | 120 + tests/go.mod | 50 + tests/go.sum | 1085 + tests/history_bench_test.go | 130 + tests/history_test.go | 835 + tests/history_test_zones.conf | 22 + tests/instance_test.go | 8 + tests/internal/utils/database.go | 28 + tests/internal/utils/redis.go | 37 + tests/internal/utils/slice.go | 37 + tests/internal/utils/slice_test.go | 31 + tests/internal/value/notification_states.go | 37 + tests/internal/value/notification_types.go | 40 + tests/internal/value/value.go | 103 + tests/main_test.go | 29 + tests/object_sync_test.conf | 54 + tests/object_sync_test.go | 1415 + tests/regression_394_test.go | 126 + tests/sla_test.go | 385 + tests/sql/main_test.go | 23 + tests/sql/sla_test.go | 406 + tests/state_sync_test.go | 10 + tools/dev_update_schema.sh | 31 + 2192 files changed, 712251 insertions(+) create mode 100644 .gitattributes create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/release.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/compliance.yml create mode 100755 .github/workflows/compliance/anonymize-license.pl create mode 100755 .github/workflows/compliance/check-licenses.sh create mode 100755 .github/workflows/compliance/ls-deps.pl create mode 100644 .github/workflows/docker.yml create mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/integration-tests.yml create mode 100644 .github/workflows/sql.yml create mode 100644 .github/workflows/version.yml create mode 100644 .gitignore create mode 100644 .mailmap create mode 100644 AUTHORS create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 cmd/icingadb-migrate/cache.go create mode 100644 cmd/icingadb-migrate/convert.go create mode 100644 cmd/icingadb-migrate/embed/comment_query.sql create mode 100644 cmd/icingadb-migrate/embed/downtime_query.sql create mode 100644 cmd/icingadb-migrate/embed/event_time_cache_schema.sql create mode 100644 cmd/icingadb-migrate/embed/flapping_query.sql create mode 100644 cmd/icingadb-migrate/embed/ido_migration_progress_schema.sql create mode 100644 cmd/icingadb-migrate/embed/notification_query.sql create mode 100644 cmd/icingadb-migrate/embed/previous_hard_state_cache_schema.sql create mode 100644 cmd/icingadb-migrate/embed/state_query.sql create mode 100644 cmd/icingadb-migrate/main.go create mode 100644 cmd/icingadb-migrate/misc.go create mode 100644 cmd/icingadb/main.go create mode 100644 config.example.yml create mode 100644 dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/benbjohnson/clock/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/benbjohnson/clock/@v/v1.1.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.1.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.10.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-playground/assert/v2/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-playground/assert/v2/@v/v2.0.1.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-playground/locales/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-playground/locales/@v/v0.13.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-playground/universal-translator/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-playground/universal-translator/@v/v0.17.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-playground/validator/v10/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-playground/validator/v10/@v/v10.4.1.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/leodido/go-urn/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/leodido/go-urn/@v/v1.2.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.2.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.8.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.9.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.12.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.14.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.14.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.14.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.6.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.8.1.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/pmezard/go-difflib/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/pmezard/go-difflib/@v/v1.0.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.1.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.4.2.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.4.2.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.1.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.4.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.5.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.3.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.4.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.7.1.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.8.0.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.8.1.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/list create mode 100644 dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.info create mode 100644 dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.lock create mode 100644 dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.mod create mode 100644 dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.zip create mode 100644 dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.ziphash create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/list create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.10.0.info create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.10.0.mod create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.lock create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.mod create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.zip create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/list create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.lock create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.mod create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.zip create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.8.0.info create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.8.0.mod create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/list create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.info create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.lock create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.mod create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.zip create mode 100644 dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/list create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.0.0-20190308221718-c2843e01d9a2.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.0.0-20200622213623-75b288015ac9.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/list create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.lock create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.zip create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.ziphash create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20221109134031-9ce248df8de5.info create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20221109134031-9ce248df8de5.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/net/@v/list create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/net/@v/v0.0.0-20190404232315-eb5bcb51f2a3.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/list create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.lock create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.zip create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.ziphash create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.1.0.info create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.1.0.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/list create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20190215142949-d0b11bdaac8a.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20190412213103-97732733099d.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20200116001909-b77594299b42.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20200223170610-d5e6a3e2c0ae.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210320140829-1e4c9ba3b0c4.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210514084401-e8d321eab015.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210630005230-0f9fa26af87c.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20211019181941-9d821ace8654.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20211216021012-1d35b9e2eb4e.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20220406163625-3f8b81556e12.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20220811171246-fbc7d0a398ab.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.lock create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.zip create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.ziphash create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.2.0.info create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.2.0.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/text/@v/list create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/text/@v/v0.3.0.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/text/@v/v0.3.2.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/tools/@v/list create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/tools/@v/v0.0.0-20180917221912-90fa682c2a6e.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/list create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20200804184101-5ec99f83aff1.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.info create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.lock create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.mod create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.zip create mode 100644 dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.ziphash create mode 100644 dependencies/pkg/mod/cache/download/gopkg.in/check.v1/@v/list create mode 100644 dependencies/pkg/mod/cache/download/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.mod create mode 100644 dependencies/pkg/mod/cache/download/gopkg.in/yaml.v2/@v/list create mode 100644 dependencies/pkg/mod/cache/download/gopkg.in/yaml.v2/@v/v2.2.2.mod create mode 100644 dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/list create mode 100644 dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/v3.0.0-20200313102051-9f266ea9e77c.mod create mode 100644 dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/v3.0.1.mod create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/mattn/go-runewidth@v0.0.14 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/pkg/errors@v0.8.1 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/rivo/uniseg@v0.4.2 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/go.uber.org/atomic@v1.10.0 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/go.uber.org/multierr@v1.8.0 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/exp@v0.0.0-20221109134031-9ce248df8de5 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sync@v0.1.0 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.0.0-20211019181941-9d821ace8654 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.0.0-20211216021012-1d35b9e2eb4e create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.2.0 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/000 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x028/707 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x032/849 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x036/719 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x046/341 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x047/906 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x051/223 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x052/907 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x053/981 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/073 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/074 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/074.p/110 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/075 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/076 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/077 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/081.p/113 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/000 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/112 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/128 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/143 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/181 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/187 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/200 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/206 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/210 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/211.p/58 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/211.p/65 create mode 100644 dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/2/000.p/211 create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/ISSUE_TEMPLATE.md create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/workflows/build.yml create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.gitignore create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.whitesource create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/LICENSE create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/README.md create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/codecov.yml create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/ewma.go create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/ewma_test.go create mode 100644 dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/go.mod create mode 100644 dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/LICENSE create mode 100644 dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/README.md create mode 100644 dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/stripansi.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/.github/workflows/test.yml create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/LICENSE.txt create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/README.md create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/bench_test.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/.gitignore create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/dynamic_test.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/plugin.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/go.mod create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/go.sum create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_amd64.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_amd64.s create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_other.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_safe.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_test.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_unsafe.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_unsafe_test.go create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhsum/.gitignore create mode 100644 dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhsum/xxhsum.go create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/.circleci/config.yml create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/.gitignore create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/LICENSE create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/Makefile create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/README.md create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/defaults.go create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/defaults_test.go create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/go.mod create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/go.sum create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/internal/fixture/test.go create mode 100644 dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/setter.go create mode 100644 dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/LICENSE create mode 100644 dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/rdv.go create mode 100644 dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/rdv_test.go create mode 100644 dependencies/pkg/mod/github.com/fatih/color@v1.13.0/.github/dependabot.yml create mode 100644 dependencies/pkg/mod/github.com/fatih/color@v1.13.0/.github/workflows/go.yml create mode 100644 dependencies/pkg/mod/github.com/fatih/color@v1.13.0/LICENSE.md create mode 100644 dependencies/pkg/mod/github.com/fatih/color@v1.13.0/README.md create mode 100644 dependencies/pkg/mod/github.com/fatih/color@v1.13.0/color.go create mode 100644 dependencies/pkg/mod/github.com/fatih/color@v1.13.0/color_test.go create mode 100644 dependencies/pkg/mod/github.com/fatih/color@v1.13.0/doc.go create mode 100644 dependencies/pkg/mod/github.com/fatih/color@v1.13.0/go.mod create mode 100644 dependencies/pkg/mod/github.com/fatih/color@v1.13.0/go.sum create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/FUNDING.yml create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/ISSUE_TEMPLATE/config.yml create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/dependabot.yml create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/build.yml create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/commitlint.yml create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/golangci-lint.yml create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/release.yml create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.gitignore create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.golangci.yml create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.prettierrc.yml create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/CHANGELOG.md create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/LICENSE create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/Makefile create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/README.md create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/RELEASING.md create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/bench_decode_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/bench_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster_commands.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/command.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/command_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/commands.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/commands_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/doc.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/error.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/example_instrumentation_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/example_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/export_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/fuzz/fuzz.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/go.mod create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/go.sum create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/arg.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/hashtag/hashtag.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/hashtag/hashtag_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/hscan/hscan.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/hscan/hscan_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/hscan/structmap.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/internal.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/internal_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/log.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/once.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/pool/bench_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/pool/conn.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/pool/export_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/pool/main_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/pool/pool.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/pool/pool_single.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/pool/pool_sticky.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/pool/pool_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/proto/proto_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/proto/reader.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/proto/reader_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/proto/scan.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/proto/scan_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/proto/writer.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/proto/writer_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/rand/rand.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/safe.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/unsafe.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/util.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/util/safe.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/util/strconv.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal/util/unsafe.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/internal_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/iterator.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/iterator_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/main_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/options.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/options_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/package.json create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/pipeline.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/pipeline_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/pool_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/pubsub.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/pubsub_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/race_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/redis.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/redis_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/result.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/ring.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/ring_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/script.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/scripts/bump_deps.sh create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/scripts/release.sh create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/scripts/tag.sh create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/sentinel.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/sentinel_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/testdata/redis.conf create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/tx.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/tx_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/universal.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/universal_test.go create mode 100644 dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/version.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/.github/CONTRIBUTING.md create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/.github/ISSUE_TEMPLATE.md create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/.github/workflows/test.yml create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/.gitignore create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/AUTHORS create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/CHANGELOG.md create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/LICENSE create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/README.md create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/auth.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/auth_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/benchmark_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/buffer.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/collations.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/conncheck.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/conncheck_dummy.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/conncheck_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/connection.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/connection_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/connector.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/connector_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/const.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/driver.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/driver_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/dsn.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/dsn_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/errors.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/errors_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/fields.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/fuzz.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/go.mod create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/infile.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/nulltime.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/nulltime_go113.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/nulltime_legacy.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/nulltime_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/packets.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/packets_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/result.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/rows.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/statement.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/statement_test.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/transaction.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/utils.go create mode 100644 dependencies/pkg/mod/github.com/go-sql-driver/mysql@v1.6.0/utils_test.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/.codecov.yml create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/.github/FUNDING.yml create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/.github/workflows/go.yml create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/CHANGELOG.md create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/LICENSE create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/Makefile create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/README.md create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/ast/ast.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/ast/ast_test.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/cmd/ycat/ycat.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/decode.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/decode_test.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/encode.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/encode_test.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/error.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/go.mod create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/go.sum create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/internal/errors/error.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/lexer/lexer.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/lexer/lexer_test.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/option.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/parser/context.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/parser/parser.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/parser/parser_test.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/parser/testdata/cr.yml create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/parser/testdata/crlf.yml create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/parser/testdata/lf.yml create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/path.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/path_test.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/printer/printer.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/printer/printer_test.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/scanner/context.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/scanner/scanner.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/stdlib_quote.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/struct.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/testdata/anchor.yml create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/token/token.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/token/token_test.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/validate.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/validate_test.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/yaml.go create mode 100644 dependencies/pkg/mod/github.com/goccy/go-yaml@v1.9.6/yaml_test.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/.travis.yml create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/CONTRIBUTING.md create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/CONTRIBUTORS create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/LICENSE create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/README.md create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/dce.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/doc.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/go.mod create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/hash.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/json_test.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/marshal.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/node.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/node_js.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/node_net.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/null.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/null_test.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/seq_test.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/sql.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/sql_test.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/time.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/util.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/uuid.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/uuid_test.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/version1.go create mode 100644 dependencies/pkg/mod/github.com/google/uuid@v1.3.0/version4.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/.travis.yml create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/LICENSE create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/README.md create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/arg.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/arg_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/assert_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/check_crosscompile.sh create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/closest.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/command.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/command_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/completion.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/completion_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/convert.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/convert_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/error.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/example_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/examples/add.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/examples/bash-completion create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/examples/main.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/examples/rm.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/flags.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/go.mod create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/go.sum create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/group.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/group_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/help.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/help_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/ini.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/ini_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/long_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/man.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/marshal_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/multitag.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/option.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/options_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/optstyle_other.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/optstyle_windows.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/parser.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/parser_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/pointer_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/short_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/tag_test.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/termsize.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/termsize_nosysioctl.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/termsize_windows.go create mode 100644 dependencies/pkg/mod/github.com/jessevdk/go-flags@v1.5.0/unknown_test.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/.gitignore create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/.travis.yml create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/LICENSE create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/README.md create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/bind.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/bind_test.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/doc.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/go.mod create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/go.sum create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/named.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/named_context.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/named_context_test.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/named_test.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/reflectx/README.md create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/reflectx/reflect.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/reflectx/reflect_test.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/sqlx.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/sqlx_context.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/sqlx_context_test.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/sqlx_test.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/types/README.md create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/types/types.go create mode 100644 dependencies/pkg/mod/github.com/jmoiron/sqlx@v1.3.5/types/types_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/.github/workflows/codeql-analysis.yml create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/.github/workflows/test.yml create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/.gitignore create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/LICENSE.md create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/README.md create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/TESTS.md create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/array.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/array_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/bench_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/buf.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/buf_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/Makefile create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/README create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/bogus_root.crt create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/postgresql.cnf create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/postgresql.crt create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/postgresql.key create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/root.cnf create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/root.crt create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/server.cnf create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/server.crt create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/certs/server.key create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/conn.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/conn_go18.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/conn_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/connector.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/connector_example_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/connector_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/copy.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/copy_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/doc.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/encode.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/encode_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/error.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/example/listen/doc.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/go.mod create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/go18_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/go19_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/hstore/hstore.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/hstore/hstore_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/issues_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/krb.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/notice.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/notice_example_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/notice_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/notify.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/notify_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/oid/doc.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/oid/gen.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/oid/types.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/rows.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/rows_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/scram/scram.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/ssl.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/ssl_permissions.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/ssl_permissions_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/ssl_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/ssl_windows.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/url.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/url_test.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/user_other.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/user_posix.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/user_windows.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/uuid.go create mode 100644 dependencies/pkg/mod/github.com/lib/pq@v1.10.7/uuid_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/.github/FUNDING.yml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/.github/workflows/test.yml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/LICENSE create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/README.md create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/_example/escape-seq/main.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/_example/logrus/main.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/_example/title/main.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/cmd/colorable/colorable.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/colorable_appengine.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/colorable_others.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/colorable_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/colorable_windows.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/go.mod create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/go.sum create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/go.test.sh create mode 100644 dependencies/pkg/mod/github.com/mattn/go-colorable@v0.1.13/noncolorable.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/.github/FUNDING.yml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/.github/workflows/test.yml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/LICENSE create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/README.md create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/doc.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/example_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/go.mod create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/go.sum create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/go.test.sh create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/isatty_bsd.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/isatty_others.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/isatty_others_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/isatty_plan9.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/isatty_solaris.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/isatty_tcgets.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/isatty_windows.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/isatty_windows_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/.github/FUNDING.yml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/.travis.yml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/LICENSE create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/README.md create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/benchmark_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/go.mod create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/go.sum create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/go.test.sh create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/runewidth.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/runewidth_appengine.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/runewidth_js.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/runewidth_posix.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/runewidth_posix_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/runewidth_table.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/runewidth_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/runewidth_windows.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-runewidth@v0.0.12/script/generate.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/.codecov.yml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/.github/FUNDING.yml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/.github/workflows/cifuzz.yaml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/.github/workflows/docker.yaml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/.github/workflows/go.yaml create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/.gitignore create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/LICENSE create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/README.md create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/custom_driver_name/Makefile create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/custom_driver_name/main.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/custom_func/main.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/fuzz/fuzz_openexec.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/hook/hook.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/limit/limit.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/mod_regexp/Makefile create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/mod_regexp/extension.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/mod_regexp/sqlite3_mod_regexp.c create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/mod_vtable/Makefile create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/mod_vtable/extension.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/mod_vtable/picojson.h create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/mod_vtable/sqlite3_mod_vtable.cc create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/simple/Dockerfile create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/simple/simple.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/trace/main.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/vtable/main.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/vtable/vtable.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/vtable_eponymous_only/main.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/_example/vtable_eponymous_only/vtable.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/backup.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/backup_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/callback.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/callback_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/convert.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/doc.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/error.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/error_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/go.mod create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/go.sum create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3-binding.c create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3-binding.h create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_context.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_func_crypt.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_func_crypt_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_go113_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_go18.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_go18_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_libsqlite3.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_load_extension.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_load_extension_omit.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_load_extension_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_allow_uri_authority.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_app_armor.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_column_metadata.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_column_metadata_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_foreign_keys.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_fts3_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_fts5.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_icu.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_introspect.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_math_functions.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_math_functions_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_os_trace.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_preupdate.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_preupdate_hook.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_preupdate_hook_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_preupdate_omit.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_secure_delete.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_secure_delete_fast.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_stat4.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_unlock_notify.c create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_unlock_notify.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_unlock_notify_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_userauth.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_userauth_omit.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_userauth_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_vacuum_full.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_vacuum_incr.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_vtable.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_opt_vtable_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_other.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_solaris.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_test.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_trace.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_type.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_usleep_windows.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3_windows.go create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/sqlite3ext.h create mode 100644 dependencies/pkg/mod/github.com/mattn/go-sqlite3@v1.14.16/static_mock.go create mode 100644 dependencies/pkg/mod/github.com/okzk/sdnotify@v0.0.0-20180710141335-d9becc38acbd/LICENSE create mode 100644 dependencies/pkg/mod/github.com/okzk/sdnotify@v0.0.0-20180710141335-d9becc38acbd/README.md create mode 100644 dependencies/pkg/mod/github.com/okzk/sdnotify@v0.0.0-20180710141335-d9becc38acbd/notify.go create mode 100644 dependencies/pkg/mod/github.com/okzk/sdnotify@v0.0.0-20180710141335-d9becc38acbd/notify_linux.go create mode 100644 dependencies/pkg/mod/github.com/okzk/sdnotify@v0.0.0-20180710141335-d9becc38acbd/sample/main.go create mode 100644 dependencies/pkg/mod/github.com/okzk/sdnotify@v0.0.0-20180710141335-d9becc38acbd/sample/sample.service create mode 100644 dependencies/pkg/mod/github.com/okzk/sdnotify@v0.0.0-20180710141335-d9becc38acbd/util.go create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/.gitignore create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/.travis.yml create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/LICENSE create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/Makefile create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/README.md create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/appveyor.yml create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/bench_test.go create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/errors.go create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/errors_test.go create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/example_test.go create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/format_test.go create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/go113.go create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/go113_test.go create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/json_test.go create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/stack.go create mode 100644 dependencies/pkg/mod/github.com/pkg/errors@v0.9.1/stack_test.go create mode 100644 dependencies/pkg/mod/github.com/rivo/uniseg@v0.2.0/LICENSE.txt create mode 100644 dependencies/pkg/mod/github.com/rivo/uniseg@v0.2.0/README.md create mode 100644 dependencies/pkg/mod/github.com/rivo/uniseg@v0.2.0/doc.go create mode 100644 dependencies/pkg/mod/github.com/rivo/uniseg@v0.2.0/go.mod create mode 100644 dependencies/pkg/mod/github.com/rivo/uniseg@v0.2.0/grapheme.go create mode 100644 dependencies/pkg/mod/github.com/rivo/uniseg@v0.2.0/grapheme_test.go create mode 100644 dependencies/pkg/mod/github.com/rivo/uniseg@v0.2.0/properties.go create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/.gitignore create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/.travis.yml create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/CHANGELOG.md create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/LICENSE create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/README.md create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/doc.go create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/examples/print/main.go create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/examples/send/main.go create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/send.go create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/send_test.go create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/sockaddr.go create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/write_msg.go create mode 100644 dependencies/pkg/mod/github.com/ssgreg/journald@v1.0.0/write_msg_go1.9.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/.gitignore create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/.travis.yml create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/README.md create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/UNLICENSE create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/_examples/.gitignore create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/_svg/godEMrCZmJkHYH1X9dN4Nm0U7.svg create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/_svg/hIpTa3A5rQz65ssiVuRJu87X6.svg create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/_svg/wHzf1M7sd7B3zVa2scBMnjqRf.svg create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/bar.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/bar_filler.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/bar_filler_bar.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/bar_filler_spinner.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/bar_option.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/bar_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/barbench_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/container_option.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/cwriter/cuuAndEd_construction_bench_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/cwriter/doc.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/cwriter/util_bsd.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/cwriter/util_linux.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/cwriter/util_solaris.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/cwriter/writer.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/cwriter/writer_posix.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/cwriter/writer_windows.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/any.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/counters.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/decorator.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/doc.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/elapsed.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/eta.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/merge.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/moving_average.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/name.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/on_complete.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/percentage.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/size_type.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/size_type_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/sizeb1000_string.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/sizeb1024_string.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/speed.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/speed_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decor/spinner.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/decorators_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/doc.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/draw_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/example_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/export_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/go.mod create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/go.sum create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/internal/percentage.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/internal/percentage_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/internal/predicate.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/internal/width.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/priority_queue.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/progress.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/progress_test.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/proxyreader.go create mode 100644 dependencies/pkg/mod/github.com/vbauerster/mpb/v6@v6.0.4/proxyreader_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/.codecov.yml create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/.gitignore create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/.travis.yml create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/CHANGELOG.md create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/LICENSE.txt create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/Makefile create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/README.md create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/assert_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/bool.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/bool_ext.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/bool_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/doc.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/duration.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/duration_ext.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/duration_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/error.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/error_ext.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/error_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/example_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/float64.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/float64_ext.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/float64_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/gen.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/go.mod create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/go.sum create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/int32.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/int32_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/int64.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/int64_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/internal/gen-atomicint/main.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/internal/gen-atomicwrapper/main.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/nocmp.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/nocmp_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/stress_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/string.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/string_ext.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/string_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/uint32.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/uint32_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/uint64.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/uint64_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/value.go create mode 100644 dependencies/pkg/mod/go.uber.org/atomic@v1.7.0/value_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/.codecov.yml create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/.gitignore create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/.travis.yml create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/CHANGELOG.md create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/LICENSE.txt create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/Makefile create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/README.md create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/benchmarks_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/error.go create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/error_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/example_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/glide.yaml create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/go.mod create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/go.sum create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/go113.go create mode 100644 dependencies/pkg/mod/go.uber.org/multierr@v1.6.0/go113_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/.codecov.yml create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/.github/ISSUE_TEMPLATE/config.yml create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/.github/ISSUE_TEMPLATE/feature_request.md create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/.github/workflows/fossa.yaml create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/.github/workflows/go.yml create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/.gitignore create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/.readme.tmpl create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/CHANGELOG.md create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/CODE_OF_CONDUCT.md create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/CONTRIBUTING.md create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/FAQ.md create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/LICENSE.txt create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/Makefile create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/README.md create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/array.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/array_go118.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/array_go118_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/array_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/buffer/buffer.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/buffer/buffer_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/buffer/pool.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/buffer/pool_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/checklicense.sh create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/clock_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/common_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/config.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/config_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/doc.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/encoder.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/encoder_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/error.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/error_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/example_go118_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/example_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/field.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/field_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/flag.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/flag_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/glide.yaml create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/global.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/global_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/go.mod create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/go.sum create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/http_handler.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/http_handler_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/increase_level_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/bufferpool/bufferpool.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/color/color.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/color/color_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/exit/exit.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/exit/exit_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/level_enabler.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/readme/readme.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/ztest/clock.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/ztest/clock_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/ztest/doc.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/ztest/timeout.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/internal/ztest/writer.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/leak_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/level.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/level_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/logger.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/logger_bench_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/logger_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/options.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/sink.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/sink_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/stacktrace.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/stacktrace_ext_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/stacktrace_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/sugar.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/sugar_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/time.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/time_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/writer.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/writer_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/buffered_write_syncer.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/buffered_write_syncer_bench_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/buffered_write_syncer_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/clock.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/clock_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/console_encoder.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/console_encoder_bench_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/console_encoder_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/core.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/core_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/doc.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/encoder.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/encoder_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/entry.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/entry_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/error.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/error_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/field.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/field_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/hook.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/hook_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/increase_level.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/increase_level_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/json_encoder.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/json_encoder_bench_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/json_encoder_impl_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/json_encoder_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/leak_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/level.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/level_strings.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/level_strings_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/level_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/marshaler.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/memory_encoder.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/memory_encoder_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/reflected_encoder.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/sampler.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/sampler_bench_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/sampler_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/tee.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/tee_logger_bench_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/tee_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/write_syncer.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/write_syncer_bench_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/write_syncer_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapgrpc/zapgrpc.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapgrpc/zapgrpc_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapio/example_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapio/writer.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zapio/writer_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/doc.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/logger.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/logger_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/observer/logged_entry.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/observer/logged_entry_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/observer/observer.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/observer/observer_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/testingt.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/testingt_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/timeout.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/timeout_test.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/writer.go create mode 100644 dependencies/pkg/mod/go.uber.org/zap@v1.23.0/zaptest/writer_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/.gitattributes create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/.gitignore create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/AUTHORS create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/CONTRIBUTING.md create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/CONTRIBUTORS create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/LICENSE create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/PATENTS create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/README.md create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/apidiff/README.md create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/apidiff/apidiff.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/apidiff/apidiff_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/apidiff/compatibility.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/apidiff/correspondence.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/apidiff/messageset.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/apidiff/report.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/apidiff/testdata/exported_fields/ef.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/apidiff/testdata/tests.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/apidiff/main.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/errors.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/gorelease.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/gorelease_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/path.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/path_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/proxy_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/report.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/README.md create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/alreadyexists/alreadyexists_suggest_major.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/alreadyexists/alreadyexists_suggest_minor.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/alreadyexists/alreadyexists_suggest_patch.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/alreadyexists/alreadyexists_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_compatible_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_compatible_suggest_git.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_compatible_suggest_hg.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_compatible_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_incompatible_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_incompatible_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_nobase_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_patch_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_patch_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_pre_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v0_v1_incompatible_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_autobase_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_autobase_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_compatible_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_compatible_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_fork_base_modpath_version_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_fork_base_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_incompatible_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_incompatible_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_patch_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_patch_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_pre_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_querybase_higher.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_querybase_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_querybase_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_v2_base_modpath_query_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_v2_base_modpath_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_v2_base_modpath_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_v2_base_modpath_version_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_v2_base_version_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_v2_base_version_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v1_v2_incompatible_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v2_compatible_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v2_compatible_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v2_incompatible_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v2_incompatible_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v2_nobase_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v2_patch_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v2_patch_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v2_pre_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v3_autobase_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v3_autobase_verify_error.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/basic/v3_autobase_verify_first.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/cgo/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/cgo/cgo.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/cycle/README.md create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/cycle/cycle_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/cycle/cycle_suggest_error.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/cycle/cycle_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/empty/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/empty/empty.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/errors/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/errors/bad_filenames.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/errors/bad_release.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/errors/base_higher.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/errors/base_modpath_none.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/errors/errors.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/errors/same_base_release.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/errors/upgrade_base.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/first/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/first/v0_0_0.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/first/v0_0_1.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/first/v0_1_0-alpha.1.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/first/v0_1_0.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/first/v0_err.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/first/v1_0_0.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/first/v1_2_3_explicit_none_base.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/first/v2_err.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/first/v2_moderr.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/compatible_other_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/compatible_other_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/compatible_other_verify_err.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/compatible_same_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/compatible_same_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/incompatible_other_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/incompatible_other_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/incompatible_same_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/incompatible_same_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/patch_suggest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/fix/patch_verify.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/generics/changed_param.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/generics/changed_return.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/generics/unchanged.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/internalcompat/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/internalcompat/internalcompat.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/main/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/main/add.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/main/change.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/main/remove.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v0.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v0.1.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v0.1.1-pre.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v0.1.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v0.1.2.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v1.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v1.1.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v1.1.1-pre.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v1.1.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v1.1.2.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v2_v2.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v2_v2.1.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v2_v2.1.1-pre.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v2_v2.1.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v2_v2.1.2.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_v3_v3.0.0-ignore.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basic_version-1.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_basicfork_v1.1.2.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_cycle_v1.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_cycle_v1.5.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_cycle_v2_v2.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_cycledep_v1.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_cycledep_v2_v2.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_empty_v0.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_empty_v0.0.2.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_errors_v0.1.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_errors_v0.2.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_fix_v1.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_fix_v1.0.1-patch.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_fix_v1.1.0-compatible-other.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_fix_v1.1.0-compatible-same.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_fix_v1.1.0-incompatible-other.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_fix_v1.1.0-incompatible-same.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_generics_v0.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_internalcompat_a_v1.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_internalcompat_b_v1.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_issue37756_v1.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_issue37756_v1.1.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_main_v0.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_nomod_v0.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_nomod_v0.0.2.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_prerelease_v0.0.0-20300101000000-000000000000.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_private_v1.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_private_v1.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_private_v1.0.2-break.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_require_v0.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_require_v0.1.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_require_v0.1.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_retract_v0.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_retractdep_v1.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_retractdep_v1.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_retractdep_v2_v2.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_retractdep_v2_v2.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_retractdep_v3_v3.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_retractdep_v3_v3.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_retracttransitive_v0.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_sub_nest_v1.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_sub_nest_v2_v2.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_sub_v2_v2.0.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_tidy_a_v0.1.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_tidy_b_v0.1.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_tidy_b_v0.2.0.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/mod/example.com_tidy_v0.0.1.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/nomod/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/nomod/nomod.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/patherrors/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/patherrors/abspath.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/patherrors/badmajor.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/patherrors/dup_roots_branch.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/patherrors/dup_roots_dir.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/patherrors/dup_roots_ok.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/patherrors/gopkginsub.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/patherrors/pathsub.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/patherrors/pathsubv2.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/prerelease/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/prerelease/prerelease_2.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/prerelease/prerelease_3.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/prerelease/prerelease_beta2.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/prerelease/prerelease_build_metadata.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/prerelease/prerelease_wordsonly.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/private/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/private/break.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/private/unreported.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/regress/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/regress/issue37756.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/require/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/require/add_requirement.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/require/decrement_go_version.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/require/decrement_requirement_minor.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/require/increment_go_version.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/require/increment_requirement_minor.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/require/increment_requirement_patch.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/require/remove_requirements.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/retract/retract_verify_direct_dep.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/retract/retract_verify_long_msg.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/retract/retract_verify_no_msg.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/retract/retract_verify_transitive_dep.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/sub/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/sub/nest.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/sub/nest_v2.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/sub/nest_v2_dir.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/sub/v2_dir.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/sub/v2_root.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/tidy/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/tidy/empty_sum.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/tidy/misleading_req.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/tidy/missing_go.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/tidy/missing_req_basic.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/tidy/missing_req_nested.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/tidy/missing_req_submodule.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/tidy/missing_req_twice_nested.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/gorelease/testdata/tidy/no_sum.test create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/macos-roots-test/main.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/macos-roots-test/root_cgo_darwin.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/macos-roots-test/root_darwin.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/macos-roots-test/root_nocgo_darwin.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/modgraphviz/main.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/modgraphviz/main_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/txtar/txtar.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/cmd/txtar/txtar_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/codereview.cfg create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/constraints/constraints.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/constraints/constraints_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/devtools/checklib.sh create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/ebnf/ebnf.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/ebnf/ebnf_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/ebnf/parser.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/ebnflint/doc.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/ebnflint/ebnflint.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/ebnflint/ebnflint_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/go.mod create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/go.sum create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/inotify/README.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/i2c/devfs.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/i2c/devfs_nonlinux.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/i2c/driver/driver.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/i2c/example/displayip/main.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/i2c/example_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/i2c/i2c.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/i2c/i2c_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/spi/devfs.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/spi/devfs_nonlinux.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/spi/driver/driver.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/spi/example_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/io/spi/spi.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/maps/maps.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/maps/maps_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/mmap/manual_test_program.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/mmap/mmap_other.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/mmap/mmap_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/mmap/mmap_unix.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/mmap/mmap_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/arith128_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/example_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/exp.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/modulo_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/normal.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/race_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/rand.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/rand_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/regress_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/rng.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/rand/zipf.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/README create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/binary-tree-freelist.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/binary-tree-freelist.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/binary-tree.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/binary-tree.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/binary-tree.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/chameneosredux.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/chameneosredux.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/chameneosredux.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/fannkuch-parallel.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/fannkuch-parallel.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/fannkuch.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/fannkuch.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/fannkuch.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/fasta-1000.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/fasta.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/fasta.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/fasta.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/k-nucleotide-parallel.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/k-nucleotide-parallel.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/k-nucleotide.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/k-nucleotide.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/k-nucleotide.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/mandelbrot.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/mandelbrot.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/mandelbrot.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/meteor-contest.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/meteor-contest.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/meteor-contest.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/nbody.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/nbody.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/nbody.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/pidigits.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/pidigits.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/pidigits.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/regex-dna-parallel.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/regex-dna-parallel.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/regex-dna.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/regex-dna.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/regex-dna.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/reverse-complement.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/reverse-complement.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/reverse-complement.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/spectral-norm-parallel.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/spectral-norm.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/spectral-norm.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/spectral-norm.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/threadring.c create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/threadring.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/threadring.txt create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/timing.log create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/shootout/timing.sh create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/slices/slices.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/slices/slices_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/slices/sort.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/slices/sort_benchmark_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/slices/sort_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/slices/zsortfunc.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/slices/zsortordered.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/utf8string/string.go create mode 100644 dependencies/pkg/mod/golang.org/x/exp@v0.0.0-20220613132600-b0d781184e0d/utf8string/string_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/AUTHORS create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/CONTRIBUTING.md create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/CONTRIBUTORS create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/LICENSE create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/PATENTS create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/README.md create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/codereview.cfg create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/errgroup/errgroup.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/errgroup/errgroup_example_md5all_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/errgroup/errgroup_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/go.mod create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/semaphore/semaphore.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/semaphore/semaphore_bench_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/semaphore/semaphore_example_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/semaphore/semaphore_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/singleflight/singleflight.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/singleflight/singleflight_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/syncmap/go19.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/syncmap/map.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/syncmap/map_bench_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/syncmap/map_reference_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/syncmap/map_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/syncmap/pre_go19.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/.gitattributes create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/.gitignore create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/CONTRIBUTING.md create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/LICENSE create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/PATENTS create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/README.md create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/codereview.cfg create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/asm_aix_ppc64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/byteorder.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_aix.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_arm64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_gc_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_gc_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_gc_x86.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_gccgo_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_gccgo_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_gccgo_x86.c create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_gccgo_x86.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_linux_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_linux_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_linux_mips64x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_linux_noinit.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_linux_ppc64x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_linux_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_loong64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_mips64x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_mipsx.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_netbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_openbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_openbsd_arm64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_other_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_other_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_other_mips64x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_other_ppc64x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_other_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_ppc64x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_s390x.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_s390x_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_wasm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_x86.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_x86.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_zos.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/cpu_zos_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/hwcap_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/syscall_aix_gccgo.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/cpu/syscall_aix_ppc64_gc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/execabs/execabs.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/execabs/execabs_go118.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/execabs/execabs_go119.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/execabs/execabs_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/go.mod create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/internal/unsafeheader/unsafeheader.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/internal/unsafeheader/unsafeheader_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/asm.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/asm_plan9_386.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/asm_plan9_amd64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/asm_plan9_arm.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/const_plan9.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/dir_plan9.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/env_plan9.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/errors_plan9.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/mkall.sh create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/mkerrors.sh create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/mksyscall.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/mksysnum_plan9.sh create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/pwd_go15_plan9.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/pwd_plan9.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/race.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/race0.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/str.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/syscall.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/syscall_plan9.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/syscall_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/zsyscall_plan9_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/zsyscall_plan9_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/zsyscall_plan9_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/plan9/zsysnum_plan9.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/.gitignore create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/README.md create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/affinity_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/aliases.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_aix_ppc64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_bsd_386.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_bsd_amd64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_bsd_arm.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_bsd_arm64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_bsd_ppc64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_bsd_riscv64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_linux_386.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_linux_amd64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_linux_arm.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_linux_arm64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_linux_loong64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_linux_mips64x.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_linux_mipsx.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_linux_ppc64x.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_linux_riscv64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_linux_s390x.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_openbsd_mips64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_solaris_amd64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/asm_zos_s390x.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/bluetooth_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/cap_freebsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/constants.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/creds_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/darwin_amd64_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/darwin_arm64_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/darwin_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_aix_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_aix_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_darwin.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_dragonfly.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_freebsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_linux_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_netbsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_openbsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_zos.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dev_zos_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dirent.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/dirent_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/endian_big.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/endian_little.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/env_unix.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/epoll_zos.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/epoll_zos_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/example_exec_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/example_flock_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/example_sysvshm_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/fcntl.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/fcntl_darwin.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/fcntl_linux_32bit.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/fdset.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/fdset_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/fstatfs_zos.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/fstatfs_zos_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/gccgo.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/gccgo_c.c create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/gccgo_linux_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/getdirentries_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/getfsstat_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ifreq_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ifreq_linux_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/internal/mkmerge/mkmerge.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/internal/mkmerge/mkmerge_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ioctl.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ioctl_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ioctl_zos.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/linux/Dockerfile create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/linux/mkall.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/linux/mksysnum.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/linux/types.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mkall.sh create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mkasm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mkerrors.sh create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mkpost.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mksyscall.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mksyscall_aix_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mksyscall_aix_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mksyscall_solaris.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mksysctl_openbsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mksysnum.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mmap_unix_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/mmap_zos_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/openbsd_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/pagesize_unix.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/pipe2_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/pledge_openbsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ptrace_darwin.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ptrace_ios.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/race.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/race0.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/readdirent_getdents.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/readdirent_getdirentries.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/sendfile_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/sockcmsg_dragonfly.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/sockcmsg_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/sockcmsg_unix.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/sockcmsg_unix_other.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_aix.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_aix_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_aix_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_aix_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_bsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_bsd_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_darwin.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_darwin_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_darwin_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_darwin_libSystem.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_darwin_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_dragonfly.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_dragonfly_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_freebsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_freebsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_freebsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_freebsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_freebsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_freebsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_freebsd_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_illumos.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_internal_bsd_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_internal_darwin_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_internal_linux_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_internal_solaris_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_alarm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_amd64_gc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_gc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_gc_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_gc_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_gccgo_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_gccgo_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_loong64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_mips64x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_mipsx.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_ppc64x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_sparc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_linux_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_netbsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_netbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_netbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_netbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_netbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_netbsd_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_openbsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_openbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_openbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_openbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_openbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_openbsd_libc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_openbsd_mips64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_openbsd_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_openbsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_openbsd_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_solaris.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_solaris_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_solaris_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_unix.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_unix_gc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_unix_gc_ppc64x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_unix_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_zos_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/syscall_zos_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/sysvshm_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/sysvshm_unix.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/sysvshm_unix_other.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/sysvshm_unix_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/timestruct.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/timestruct_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/types_aix.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/types_darwin.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/types_dragonfly.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/types_freebsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/types_netbsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/types_openbsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/types_solaris.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/unveil_openbsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/xattr_bsd.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/xattr_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_aix_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_aix_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_darwin_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_darwin_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_dragonfly_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_freebsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_freebsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_freebsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_freebsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_freebsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_loong64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_mips.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_mips64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_mips64le.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_mipsle.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_ppc64le.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_linux_sparc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_netbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_netbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_netbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_netbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_openbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_openbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_openbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_openbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_openbsd_mips64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_openbsd_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_openbsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_solaris_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zerrors_zos_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zptrace_armnn_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zptrace_linux_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zptrace_mipsnn_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zptrace_mipsnnle_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zptrace_x86_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_aix_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_aix_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_aix_ppc64_gc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_aix_ppc64_gccgo.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_darwin_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_darwin_amd64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_darwin_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_darwin_arm64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_dragonfly_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_freebsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_freebsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_freebsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_freebsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_freebsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_illumos_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_loong64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_mips.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_mips64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_mips64le.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_mipsle.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_ppc64le.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_linux_sparc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_netbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_netbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_netbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_netbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_386.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_amd64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_arm.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_arm64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_mips64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_ppc64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_openbsd_riscv64.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_solaris_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsyscall_zos_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysctl_openbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysctl_openbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysctl_openbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysctl_openbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysctl_openbsd_mips64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysctl_openbsd_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysctl_openbsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_darwin_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_darwin_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_dragonfly_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_freebsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_freebsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_freebsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_freebsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_freebsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_loong64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_mips.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_mips64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_mips64le.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_mipsle.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_ppc64le.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_linux_sparc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_netbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_netbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_netbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_netbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_openbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_openbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_openbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_openbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_openbsd_mips64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_openbsd_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_openbsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/zsysnum_zos_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_aix_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_aix_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_darwin_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_darwin_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_dragonfly_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_freebsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_freebsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_freebsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_freebsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_freebsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_loong64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_mips.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_mips64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_mips64le.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_mipsle.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_ppc.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_ppc64le.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_linux_sparc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_netbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_netbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_netbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_netbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_openbsd_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_openbsd_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_openbsd_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_openbsd_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_openbsd_mips64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_openbsd_ppc64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_openbsd_riscv64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_solaris_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/unix/ztypes_zos_s390x.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/aliases.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/dll_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/empty.s create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/env_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/eventlog.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/exec_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/memory_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/mkerrors.bash create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/mkknownfolderids.bash create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/mksyscall.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/mkwinsyscall/mkwinsyscall.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/race.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/race0.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/registry/export_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/registry/key.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/registry/mksyscall.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/registry/registry_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/registry/syscall.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/registry/value.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/registry/zsyscall_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/security_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/service.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/setupapi_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/str.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/debug/log.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/debug/service.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/eventlog/install.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/eventlog/log.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/eventlog/log_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/example/beep.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/example/install.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/example/main.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/example/manage.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/example/service.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/mgr/config.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/mgr/mgr.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/mgr/mgr_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/mgr/recovery.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/mgr/service.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/security.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/service.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/svc/svc_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/syscall.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/syscall_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/syscall_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/syscall_windows_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/testdata/README create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/types_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/types_windows_386.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/types_windows_amd64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/types_windows_arm.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/types_windows_arm64.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/zerrors_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/zknownfolderids_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/sys@v0.1.0/windows/zsyscall_windows.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/LICENSE create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/PATENTS create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/README create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/adaptor.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/codereview.cfg create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/doc.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/errors.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/errors_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/example_As_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/example_FormatError_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/example_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/fmt.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/fmt_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/fmt_unexported_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/format.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/frame.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/go.mod create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/internal/internal.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/stack_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/wrap.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/wrap_113_test.go create mode 100644 dependencies/pkg/mod/golang.org/x/xerrors@v0.0.0-20220907171357-04be3eba64a2/wrap_test.go create mode 100644 dependencies/pkg/sumdb/sum.golang.org/latest create mode 100644 doc/01-About.md create mode 100644 doc/02-Installation.md create mode 100644 doc/02-Installation.md.d/01-Amazon-Linux.md create mode 100644 doc/02-Installation.md.d/02-CentOS.md create mode 100644 doc/02-Installation.md.d/03-Debian.md create mode 100644 doc/02-Installation.md.d/04-RHEL.md create mode 100644 doc/02-Installation.md.d/05-SLES.md create mode 100644 doc/02-Installation.md.d/06-Ubuntu.md create mode 100644 doc/03-Configuration.md create mode 100644 doc/04-Upgrading.md create mode 100644 doc/05-Distributed-Setups.md create mode 100644 doc/06-Migration.md create mode 100644 doc/icingadb-migration.example.yml create mode 100644 doc/images/icingadb-architecture.png create mode 100644 doc/images/icingadb-daemon.png create mode 100644 doc/images/icingadb-dashboard.png create mode 100644 doc/images/icingadb-database.png create mode 100644 doc/images/icingadb-envs.png create mode 100644 doc/images/icingadb-ha.png create mode 100644 doc/images/icingadb-web.png create mode 100644 go.mod create mode 100644 go.sum create mode 100644 internal/command/command.go create mode 100644 internal/internal.go create mode 100644 internal/version.go create mode 100644 pkg/backoff/backoff.go create mode 100644 pkg/com/atomic.go create mode 100644 pkg/com/bulker.go create mode 100644 pkg/com/com.go create mode 100644 pkg/com/cond.go create mode 100644 pkg/com/counter.go create mode 100644 pkg/common/sync_subject.go create mode 100644 pkg/config/config.go create mode 100644 pkg/config/database.go create mode 100644 pkg/config/history_retention.go create mode 100644 pkg/config/logging.go create mode 100644 pkg/config/redis.go create mode 100644 pkg/contracts/contracts.go create mode 100644 pkg/driver/driver.go create mode 100644 pkg/driver/pgsql.go create mode 100644 pkg/flatten/flatten.go create mode 100644 pkg/icingadb/cleanup.go create mode 100644 pkg/icingadb/db.go create mode 100644 pkg/icingadb/delta.go create mode 100644 pkg/icingadb/delta_test.go create mode 100644 pkg/icingadb/dump_signals.go create mode 100644 pkg/icingadb/entitiesbyid.go create mode 100644 pkg/icingadb/ha.go create mode 100644 pkg/icingadb/history/retention.go create mode 100644 pkg/icingadb/history/sla.go create mode 100644 pkg/icingadb/history/sync.go create mode 100644 pkg/icingadb/objectpacker/objectpacker.go create mode 100644 pkg/icingadb/objectpacker/objectpacker_test.go create mode 100644 pkg/icingadb/overdue/get_overdues.lua create mode 100644 pkg/icingadb/overdue/sync.go create mode 100644 pkg/icingadb/runtime_updates.go create mode 100644 pkg/icingadb/scoped_entity.go create mode 100644 pkg/icingadb/sync.go create mode 100644 pkg/icingadb/v1/checkable.go create mode 100644 pkg/icingadb/v1/command.go create mode 100644 pkg/icingadb/v1/comment.go create mode 100644 pkg/icingadb/v1/customvar.go create mode 100644 pkg/icingadb/v1/downtime.go create mode 100644 pkg/icingadb/v1/endpoint.go create mode 100644 pkg/icingadb/v1/entity.go create mode 100644 pkg/icingadb/v1/environment.go create mode 100644 pkg/icingadb/v1/history/ack.go create mode 100644 pkg/icingadb/v1/history/comment.go create mode 100644 pkg/icingadb/v1/history/downtime.go create mode 100644 pkg/icingadb/v1/history/flapping.go create mode 100644 pkg/icingadb/v1/history/meta.go create mode 100644 pkg/icingadb/v1/history/notification.go create mode 100644 pkg/icingadb/v1/history/state.go create mode 100644 pkg/icingadb/v1/host.go create mode 100644 pkg/icingadb/v1/icingadb_instance.go create mode 100644 pkg/icingadb/v1/meta.go create mode 100644 pkg/icingadb/v1/notification.go create mode 100644 pkg/icingadb/v1/overdue/host.go create mode 100644 pkg/icingadb/v1/overdue/service.go create mode 100644 pkg/icingadb/v1/service.go create mode 100644 pkg/icingadb/v1/state.go create mode 100644 pkg/icingadb/v1/timeperiod.go create mode 100644 pkg/icingadb/v1/url.go create mode 100644 pkg/icingadb/v1/user.go create mode 100644 pkg/icingadb/v1/v1.go create mode 100644 pkg/icingaredis/client.go create mode 100644 pkg/icingaredis/heartbeat.go create mode 100644 pkg/icingaredis/telemetry/heartbeat.go create mode 100644 pkg/icingaredis/telemetry/stats.go create mode 100644 pkg/icingaredis/utils.go create mode 100644 pkg/icingaredis/v1/icinga_status.go create mode 100644 pkg/icingaredis/v1/stats_message.go create mode 100644 pkg/logging/journald_core.go create mode 100644 pkg/logging/logger.go create mode 100644 pkg/logging/logging.go create mode 100644 pkg/periodic/periodic.go create mode 100644 pkg/retry/retry.go create mode 100644 pkg/structify/structify.go create mode 100644 pkg/types/acknowledgement_state.go create mode 100644 pkg/types/binary.go create mode 100644 pkg/types/bool.go create mode 100644 pkg/types/comment_type.go create mode 100644 pkg/types/float.go create mode 100644 pkg/types/int.go create mode 100644 pkg/types/notification_states.go create mode 100644 pkg/types/notification_type.go create mode 100644 pkg/types/notification_types.go create mode 100644 pkg/types/state_type.go create mode 100644 pkg/types/string.go create mode 100644 pkg/types/unix_milli.go create mode 100644 pkg/types/uuid.go create mode 100644 pkg/utils/utils.go create mode 100644 pkg/version/version.go create mode 100644 schema/mysql/schema.sql create mode 100644 schema/mysql/upgrades/1.0.0-rc2.sql create mode 100644 schema/mysql/upgrades/1.0.0.sql create mode 100644 schema/pgsql/schema.sql create mode 100644 tests/cleanup_and_retention_test.go create mode 100644 tests/environment_test.go create mode 100644 tests/go.mod create mode 100644 tests/go.sum create mode 100644 tests/history_bench_test.go create mode 100644 tests/history_test.go create mode 100644 tests/history_test_zones.conf create mode 100644 tests/instance_test.go create mode 100644 tests/internal/utils/database.go create mode 100644 tests/internal/utils/redis.go create mode 100644 tests/internal/utils/slice.go create mode 100644 tests/internal/utils/slice_test.go create mode 100644 tests/internal/value/notification_states.go create mode 100644 tests/internal/value/notification_types.go create mode 100644 tests/internal/value/value.go create mode 100644 tests/main_test.go create mode 100644 tests/object_sync_test.conf create mode 100644 tests/object_sync_test.go create mode 100644 tests/regression_394_test.go create mode 100644 tests/sla_test.go create mode 100644 tests/sql/main_test.go create mode 100644 tests/sql/sla_test.go create mode 100644 tests/state_sync_test.go create mode 100755 tools/dev_update_schema.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3897cc1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Include version information on `git archive' +/internal/version.go export-subst diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..706315d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,37 @@ +--- +name: Bug Report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +## Describe the bug + +A clear and concise description of what the bug is. + +## To Reproduce + +Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include configuration, logs, etc. to reproduce, if relevant. + +1. +2. +3. +4. + +## Expected behavior + +A clear and concise description of what you expected to happen. + +## Your Environment + +Include as many relevant details about the environment you experienced the problem in + +* Icinga DB version: +* Icinga 2 version: +* Operating System and version: + +## Additional context + +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..d93658f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Ask a question + url: https://community.icinga.com/c/icinga-db/14 + about: Ask a question in our community forum diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md new file mode 100644 index 0000000..f5625ba --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release.md @@ -0,0 +1,19 @@ +--- +name: '[INTERNAL] Release' +about: Release a version +title: 'Release Version v$version' +labels: '' +assignees: '' + +--- + +# Release Workflow + +- [ ] Check that the `.mailmap` and `AUTHORS` files are up to date +- [ ] Update `internal/version.go` +- [ ] Update `CHANGELOG.md` +- [ ] Create and push a signed tag for the version +- [ ] Build packages +- [ ] Create release on GitHub +- [ ] Update public docs +- [ ] Announce release diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3395774 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: +- package-ecosystem: gomod + directory: "/" + schedule: + interval: weekly + time: '10:00' + open-pull-requests-limit: 10 + reviewers: + - Al2Klimov + - julianbrost + - lippserd diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml new file mode 100644 index 0000000..c094754 --- /dev/null +++ b/.github/workflows/compliance.yml @@ -0,0 +1,20 @@ +name: Compliance +on: + push: + branches: + - master + pull_request: {} + +jobs: + licenses: + runs-on: ubuntu-latest + steps: + - run: sudo apt install -y moreutils + + - uses: actions/setup-go@v2 + with: + go-version: 1.18.x + + - uses: actions/checkout@v2 + + - run: .github/workflows/compliance/check-licenses.sh diff --git a/.github/workflows/compliance/anonymize-license.pl b/.github/workflows/compliance/anonymize-license.pl new file mode 100755 index 0000000..573eba6 --- /dev/null +++ b/.github/workflows/compliance/anonymize-license.pl @@ -0,0 +1,11 @@ +#!/usr/bin/perl -pi + +use warnings; +use strict; +use autodie qw(:all); + +if (/^ ?(?:\w+ )?Copyright / || /^All rights reserved\.$/ || /^(?:The )?\S+ License(?: \(.+?\))?$/ || /^$/) { + $_ = "" +} + +s/Google Inc\./the copyright holder/g diff --git a/.github/workflows/compliance/check-licenses.sh b/.github/workflows/compliance/check-licenses.sh new file mode 100755 index 0000000..63ff76f --- /dev/null +++ b/.github/workflows/compliance/check-licenses.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +set -eo pipefail + +find_license_file() { + MOD_NAME="$1" + LICENSE_DIR="vendor/$MOD_NAME" + LICENSE_FILES=({,../}{,UN}LICENSE{,.txt,.md}) + + for LICENSE_FILE in "${LICENSE_FILES[@]}"; do + LICENSE_FILE="${LICENSE_DIR}/$LICENSE_FILE" + + if [ -e "$LICENSE_FILE" ]; then + echo "$LICENSE_FILE" + return + fi + done + + echo "Module ${MOD_NAME}: license file missing in ${LICENSE_DIR}. Tried:" "${LICENSE_FILES[@]}" >&2 + false +} + +list_all_deps() { + for MAIN_MOD in ./cmd/*; do + go list -deps "$MAIN_MOD" + done +} + +COMPATIBLE_LINE=$(($LINENO + 2)) + +COMPATIBLE=( + # public domain + 3cee2c43614ad4572d9d594c81b9348cf45ed5ac # vendor/github.com/vbauerster/mpb/v6/UNLICENSE + # MIT + 66d504eb2f162b9cbf11b07506eeed90c6edabe1 # vendor/github.com/cespare/xxhash/v2/LICENSE.txt + 1513ff663e946fdcadb630bed670d253b8b22e1e # vendor/github.com/davecgh/go-spew/spew/../LICENSE + 90a1030e6314df9a898e5bfbdb4c6176d0a1f81c # vendor/github.com/jmoiron/sqlx/LICENSE + # BSD-2 + 8762249b76928cb6995b98a95a9396c5aaf104f3 # vendor/github.com/go-redis/redis/v8/LICENSE + d550c89174b585d03dc67203952b38372b4ce254 # vendor/github.com/pkg/errors/LICENSE + # BSD-3 + b23b967bba92ea3c5ccde9962027cd70400865eb # vendor/github.com/google/uuid/LICENSE + 604b38b184689a3db06a0617216d52a95aea10d8 # vendor/github.com/pmezard/go-difflib/difflib/../LICENSE + # MPLv2 + 0a2b84dd9b124c4d95dd24418c3e84fd870cc0ac # vendor/github.com/go-sql-driver/mysql/LICENSE +) + +MY_DIR="$(dirname "$0")" + +go mod vendor + +for MOD_NAME in $(list_all_deps | "${MY_DIR}/ls-deps.pl"); do + LICENSE_FILE="$(find_license_file "$MOD_NAME")" + + "${MY_DIR}/anonymize-license.pl" "$LICENSE_FILE" + tr -d ., <"$LICENSE_FILE" | tr \\n\\t ' ' | sponge "$LICENSE_FILE" + perl -p0 -i -e 's/ +/ /g; s/ +$//; $_ = lc' "$LICENSE_FILE" + + for SHA1 in "${COMPATIBLE[@]}"; do + if sha1sum -c <<<"$SHA1 $LICENSE_FILE" >/dev/null 2>&1; then + continue 2 + fi + done + + echo "Module ${MOD_NAME}: unknown license. Run 'go mod vendor' (or see below), verify by yourself whether" \ + "$LICENSE_FILE is GPLv2 compatible and (if yes) update the license text hashes list at ${0}:$COMPATIBLE_LINE" \ + "and eventually .github/workflows/compliance/anonymize-license.pl:7" >&2 + + sha1sum "$LICENSE_FILE" + head "$LICENSE_FILE" + false +done diff --git a/.github/workflows/compliance/ls-deps.pl b/.github/workflows/compliance/ls-deps.pl new file mode 100755 index 0000000..a7a033a --- /dev/null +++ b/.github/workflows/compliance/ls-deps.pl @@ -0,0 +1,24 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use autodie qw(:all); + +my @mods = <>; +chomp @mods; +s~^vendor/~~ for @mods; + +@mods = grep m~^[^./]+\.~, @mods; +@mods = grep !m~^golang\.org/x(?:/|$)~, @mods; +@mods = grep !m~^github\.com/icinga/icingadb(?:/|$)~, @mods; +@mods = sort @mods; + +my $lastMod = undef; + +for (@mods) { + # prefixed with last mod (e.g. "go.uber.org/zap/buffer" after "go.uber.org/zap"), so redundant + next if defined($lastMod) && /$lastMod/; + + $lastMod = '^' . quotemeta("$_/"); + print "$_\n" +} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..1469426 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,21 @@ +name: Docker image + +on: + pull_request: {} + push: + branches: + - master + release: + types: + - published + +jobs: + docker: + runs-on: ubuntu-latest + + steps: + - name: Docker image + uses: Icinga/docker-icingadb@master + env: + INPUT_TOKEN: '${{ github.token }}' + DOCKER_HUB_PASSWORD: '${{ secrets.DOCKER_HUB_PERSONAL_TOKEN }}' diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..de15521 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,108 @@ +name: Go +on: + push: + branches: + - master + pull_request: {} + +jobs: + build-test: + + strategy: + matrix: + os: [ macos-latest, ubuntu-latest ] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-go@v2 + with: + go-version: 1.18.x + + - run: go build -gcflags="-m" ./... + + - run: go test -v -race ./... + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-go@v2 + with: + go-version: 1.18.x + + - uses: dominikh/staticcheck-action@29e9b80fb8de0521ba4ed3fdf68fed5bbe82a2d2 # v1.1.0 + with: + install-go: false + + vet: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-go@v2 + with: + go-version: 1.18.x + + - run: go vet ./... + + fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-go@v2 + with: + go-version: 1.18.x + + - name: Run gofmt -d . + run: | + fmtvar="$(gofmt -d .)" + echo "$fmtvar" + test -z "$fmtvar" + + modtidy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-go@v2 + with: + go-version: 1.18.x + + - name: Run go mod tidy + run: | + go mod tidy + gitdiff="$(git diff -U0)" + echo "$gitdiff" + test -z "$gitdiff" + + vendor-diff: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: ^1.18 + + - name: Checkout base commit + uses: actions/checkout@v3 + with: + path: a + ref: ${{ github.base_ref }} + - name: Download dependencies of base commit + run: go mod vendor + working-directory: a + + - name: Checkout PR + uses: actions/checkout@v3 + with: + path: b + - name: Download dependencies of PR + run: go mod vendor + working-directory: b + + - name: Diff of dependencies + run: diff -ur --color=always a/vendor b/vendor || true diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 0000000..dff8112 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,55 @@ +name: Integration Tests + +on: + push: + branches: + - master + pull_request: {} + schedule: + - cron: '57 3 * * *' + +jobs: + integration-tests: + strategy: + fail-fast: false + matrix: + database: + - name: mysql + pretty_name: MySQL + - name: pgsql + pretty_name: PostgreSQL + + name: ${{ matrix.database.pretty_name }} + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: '^1.18' + - name: Build Icinga DB + run: go build ./cmd/icingadb + env: + CGO_ENABLED: 0 + - name: Build Integration Tests + run: go test -o ../icingadb-test -c . + working-directory: tests/ + - name: Run Integration Tests + run: ./icingadb-test -icingatesting.debuglog debug.log -test.v + env: + ICINGADB_TESTS_DATABASE_TYPE: ${{ matrix.database.name }} + ICINGA_TESTING_ICINGADB_BINARY: ${{ github.workspace }}/icingadb + ICINGA_TESTING_ICINGADB_SCHEMA_MYSQL: ${{ github.workspace }}/schema/mysql/schema.sql + ICINGA_TESTING_ICINGADB_SCHEMA_PGSQL: ${{ github.workspace }}/schema/pgsql/schema.sql + - name: Compress Debug Log + if: ${{ always() }} + run: xz -9 debug.log + - name: Upload Debug Log + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.database.name }}-debug.log.xz + path: debug.log.xz + retention-days: 1 diff --git a/.github/workflows/sql.yml b/.github/workflows/sql.yml new file mode 100644 index 0000000..c5e4304 --- /dev/null +++ b/.github/workflows/sql.yml @@ -0,0 +1,58 @@ +name: SQL + +on: + push: + branches: + - master + pull_request: {} + +jobs: + sql: + name: ${{ matrix.database.name }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + database: + - {type: MYSQL, name: MySQL 5.5, image: "icinga/icingadb-mysql:5.5"} + - {type: MYSQL, name: MySQL 5.6, image: "icinga/icingadb-mysql:5.6"} + - {type: MYSQL, name: MySQL 5.7, image: "mysql:5.7"} + - {type: MYSQL, name: MySQL latest, image: "mysql:latest"} + - {type: MYSQL, name: MariaDB 10.1, image: "mariadb:10.1"} + - {type: MYSQL, name: MariaDB 10.2, image: "mariadb:10.2"} + - {type: MYSQL, name: MariaDB 10.3, image: "mariadb:10.3"} + - {type: MYSQL, name: MariaDB 10.4, image: "mariadb:10.4"} + - {type: MYSQL, name: MariaDB 10.5, image: "mariadb:10.5"} + - {type: MYSQL, name: MariaDB 10.6, image: "mariadb:10.6"} + - {type: MYSQL, name: MariaDB 10.7, image: "mariadb:10.7"} + - {type: MYSQL, name: MariaDB latest, image: "mariadb:latest"} + - {type: PGSQL, name: PostgreSQL 9.6, image: "postgres:9.6"} + - {type: PGSQL, name: PostgreSQL 10, image: "postgres:10"} + - {type: PGSQL, name: PostgreSQL 11, image: "postgres:11"} + - {type: PGSQL, name: PostgreSQL 12, image: "postgres:12"} + - {type: PGSQL, name: PostgreSQL 13, image: "postgres:13"} + - {type: PGSQL, name: PostgreSQL latest, image: "postgres:latest"} + + steps: + - name: Setup Go + uses: actions/setup-go@v1 + with: + go-version: '^1.16' + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Download dependencies + run: go get -v -t -d ./... + working-directory: tests/ + + - name: Run tests + env: + ICINGADB_TESTS_DATABASE_TYPE: ${{ matrix.database.type }} + ICINGA_TESTING_${{ matrix.database.type }}_IMAGE: ${{ matrix.database.image }} + ICINGA_TESTING_ICINGADB_SCHEMA_MYSQL: ${{ github.workspace }}/schema/mysql/schema.sql + ICINGA_TESTING_ICINGADB_SCHEMA_PGSQL: ${{ github.workspace }}/schema/pgsql/schema.sql + timeout-minutes: 10 + run: go test -v -timeout 5m ./sql + working-directory: tests/ diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml new file mode 100644 index 0000000..98d28c0 --- /dev/null +++ b/.github/workflows/version.yml @@ -0,0 +1,25 @@ +name: Version +on: + push: + branches: + - master + pull_request: {} + +jobs: + version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-go@v2 + with: + go-version: 1.18.x + - name: Check version + # TODO(elippmann): Needs adjustments as soon as we release from (support) branches too. + run: | + actual="$(go run cmd/icingadb/main.go --version | head -n1 | sed 's/Icinga DB version: \(.*\)/v\1/')" + expected="$(git describe --tags $(git rev-list --tags --max-count=1))" + echo "Actual version: $actual" + echo "Expected version: $expected" + test "$actual" = "$expected" || (echo "Versions do not match"; (exit 1)) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1bf23c8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.* +!.git* +!.mailmap diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..edbf393 --- /dev/null +++ b/.mailmap @@ -0,0 +1,7 @@ +Alexander A. Klimov +Diana Flach +Diana Flach +Diana Flach +Henrik Triem <43344334+htriem@users.noreply.github.com> + + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..cbb6f89 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,9 @@ +Alexander A. Klimov +Eric Lippmann +Henrik Triem +Johannes Meyer +Julian Brost +Michael Friedrich +Noah Hilverling +Ravi Kumar Kempapura Srinivasa +Yonas Habteab diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0479189 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,22 @@ +# Icinga DB Changelog + +## 1.1.0 (2022-11-10) + +This release adds a tool for migrating history from IDO. Apart from that, +it reduces RAM usage and includes updated dependencies. + +* Add `icingadb-migrate` for migrating IDO history to Icinga DB. #253 #536 #541 +* Reduce RAM usage during full sync. #525 +* Update dependencies. #522 #524 #533 #534 #540 + +## 1.0.0 (2022-06-30) + +Final release + +## 1.0.0 RC2 (2021-11-12) + +Second release candidate + +## 1.0.0 RC1 (2020-03-13) + +Initial release diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..8cc7c16 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# Icinga DB + +Icinga DB is a set of components for publishing, synchronizing and +visualizing monitoring data in the Icinga ecosystem, consisting of: + +* The Icinga DB daemon, which synchronizes monitoring data between a Redis server and a database +* Icinga 2 with its [Icinga DB feature](https://icinga.com/docs/icinga-2/latest/doc/14-features/#icinga-db) enabled, + responsible for publishing the data to the Redis server, i.e. configuration and its runtime updates, check results, + state changes, downtimes, acknowledgements, notifications, and other events such as flapping +* And Icinga Web with the + [Icinga DB Web](https://icinga.com/docs/icinga-db-web) module enabled, + which connects to both Redis and the database to display and work with the most up-to-date data + +![Icinga DB Architecture](doc/images/icingadb-architecture.png) + +## Documentation + +Icinga DB documentation is available at [icinga.com/docs](https://icinga.com/docs/icinga-db). + +## License + +Icinga DB and the Icinga DB documentation are licensed under the terms of the +[GNU General Public License Version 2](LICENSE). diff --git a/cmd/icingadb-migrate/cache.go b/cmd/icingadb-migrate/cache.go new file mode 100644 index 0000000..d1854c9 --- /dev/null +++ b/cmd/icingadb-migrate/cache.go @@ -0,0 +1,298 @@ +package main + +import ( + "database/sql" + _ "embed" + "github.com/jmoiron/sqlx" + "github.com/pkg/errors" + "math" + "strings" + "time" +) + +//go:embed embed/event_time_cache_schema.sql +var eventTimeCacheSchema string + +//go:embed embed/previous_hard_state_cache_schema.sql +var previousHardStateCacheSchema string + +// buildEventTimeCache rationale: +// +// Icinga DB's flapping_history#id always needs start_time. flapping_end rows would need an IDO subquery for that. +// That would make the IDO reading even slower than the Icinga DB writing. +// Therefore: Stream IDO's icinga_flappinghistory once, compute flapping_history#start_time +// and cache it into an SQLite database. Then steam from that database and the IDO. +// +// Similar for acknowledgements. (On non-recoverable errors the whole program exits.) +func buildEventTimeCache(ht *historyType, idoColumns []string) { + type row = struct { + Id uint64 + EventTime int64 + EventTimeUsec uint32 + EventIsStart uint8 + ObjectId uint64 + } + + chunkCacheTx(ht.cache, func(tx **sqlx.Tx, commitPeriodically func()) { + var checkpoint struct { + Cnt int64 + MaxId sql.NullInt64 + } + cacheGet(*tx, &checkpoint, "SELECT COUNT(*) cnt, MAX(history_id) max_id FROM end_start_time") + + ht.bar.SetCurrent(checkpoint.Cnt * 2) + + // Stream source data... + sliceIdoHistory( + ht, + "SELECT "+strings.Join(idoColumns, ", ")+" FROM "+ht.idoTable+ + // For actual migration icinga_objects will be joined anyway, + // so it makes no sense to take vanished objects into account. + " xh USE INDEX (PRIMARY) INNER JOIN icinga_objects o ON o.object_id=xh.object_id WHERE xh."+ + ht.idoIdColumn+" <= :toid AND xh."+ + ht.idoIdColumn+" > :checkpoint ORDER BY xh."+ht.idoIdColumn+" LIMIT :bulk", + nil, checkpoint.MaxId.Int64, // ... since we were interrupted: + func(idoRows []row) (checkpoint interface{}) { + for _, idoRow := range idoRows { + if idoRow.EventIsStart == 0 { + // Ack/flapping end event. Get the start event time: + var lst []struct { + EventTime int64 + EventTimeUsec uint32 + } + cacheSelect( + *tx, &lst, "SELECT event_time, event_time_usec FROM last_start_time WHERE object_id=?", + idoRow.ObjectId, + ) + + // If we have that, ... + if len(lst) > 0 { + // ... save the start event time for the actual migration: + cacheExec( + *tx, + "INSERT INTO end_start_time(history_id, event_time, event_time_usec) VALUES (?, ?, ?)", + idoRow.Id, lst[0].EventTime, lst[0].EventTimeUsec, + ) + + // This previously queried info isn't needed anymore. + cacheExec(*tx, "DELETE FROM last_start_time WHERE object_id=?", idoRow.ObjectId) + } + } else { + // Ack/flapping start event directly after another start event (per checkable). + // The old one won't have (but the new one will) an end event (which will need its time). + cacheExec(*tx, "DELETE FROM last_start_time WHERE object_id=?", idoRow.ObjectId) + + // An ack/flapping start event. The following end event (per checkable) will need its time. + cacheExec( + *tx, "INSERT INTO last_start_time(object_id, event_time, event_time_usec) VALUES (?, ?, ?)", + idoRow.ObjectId, idoRow.EventTime, idoRow.EventTimeUsec, + ) + } + + commitPeriodically() + checkpoint = idoRow.Id + } + + ht.bar.IncrBy(len(idoRows)) + return + }, + ) + + // This never queried info isn't needed anymore. + cacheExec(*tx, "DELETE FROM last_start_time") + }) + + ht.bar.SetTotal(ht.bar.Current(), true) +} + +// buildPreviousHardStateCache rationale: +// +// Icinga DB's state_history#previous_hard_state would need a subquery. +// That make the IDO reading even slower than the Icinga DB writing. +// Therefore: Stream IDO's icinga_statehistory once, compute state_history#previous_hard_state +// and cache it into an SQLite database. Then steam from that database and the IDO. +// +// Similar for notifications. (On non-recoverable errors the whole program exits.) +func buildPreviousHardStateCache(ht *historyType, idoColumns []string) { + type row = struct { + Id uint64 + ObjectId uint64 + LastHardState uint8 + } + + chunkCacheTx(ht.cache, func(tx **sqlx.Tx, commitPeriodically func()) { + var nextIds struct { + Cnt int64 + MinId sql.NullInt64 + } + cacheGet(*tx, &nextIds, "SELECT COUNT(*) cnt, MIN(history_id) min_id FROM next_ids") + + var previousHardStateCnt int64 + cacheGet(*tx, &previousHardStateCnt, "SELECT COUNT(*) FROM previous_hard_state") + + var checkpoint int64 + if nextIds.MinId.Valid { // there are next_ids + checkpoint = nextIds.MinId.Int64 // this kind of caches is filled descending + } else { // there aren't any next_ids + // next_ids contains the most recently processed IDs and is only empty if... + if previousHardStateCnt == 0 { + // ... we didn't actually start yet... + checkpoint = math.MaxInt64 // start from the largest (possible) ID + } else { + // ... or we've already finished. + checkpoint = 0 // make following query no-op + } + } + + ht.bar.SetCurrent(previousHardStateCnt + nextIds.Cnt) + + // We continue where we finished before. As we build the cache in reverse chronological order: + // 1. If the history grows between two migration trials, we won't migrate the difference. Workarounds: + // a. Start migration after Icinga DB is up and running. + // b. Remove the cache before the next migration trial. + // 2. If the history gets cleaned up between two migration trials, + // the difference either just doesn't appear in the cache or - if already there - will be ignored later. + + // Stream source data... + sliceIdoHistory( + ht, + "SELECT "+strings.Join(idoColumns, ", ")+" FROM "+ht.idoTable+ + // For actual migration icinga_objects will be joined anyway, + // so it makes no sense to take vanished objects into account. + " xh USE INDEX (PRIMARY) INNER JOIN icinga_objects o ON o.object_id=xh.object_id WHERE xh."+ + ht.idoIdColumn+" <= :toid AND xh."+ + ht.idoIdColumn+" < :checkpoint ORDER BY xh."+ht.idoIdColumn+" DESC LIMIT :bulk", + nil, checkpoint, // ... since we were interrupted: + func(idoRows []row) (checkpoint interface{}) { + for _, idoRow := range idoRows { + var nhs []struct{ NextHardState uint8 } + cacheSelect(*tx, &nhs, "SELECT next_hard_state FROM next_hard_state WHERE object_id=?", idoRow.ObjectId) + + if len(nhs) < 1 { // we just started (per checkable) + // At the moment (we're "travelling back in time") that's the checkable's hard state: + cacheExec( + *tx, "INSERT INTO next_hard_state(object_id, next_hard_state) VALUES (?, ?)", + idoRow.ObjectId, idoRow.LastHardState, + ) + + // But for the current time point the previous hard state isn't known, yet: + cacheExec( + *tx, "INSERT INTO next_ids(history_id, object_id) VALUES (?, ?)", + idoRow.Id, idoRow.ObjectId, + ) + } else if idoRow.LastHardState == nhs[0].NextHardState { + // The hard state didn't change yet (per checkable), + // so this time point also awaits the previous hard state. + cacheExec( + *tx, "INSERT INTO next_ids(history_id, object_id) VALUES (?, ?)", + idoRow.Id, idoRow.ObjectId, + ) + } else { // the hard state changed (per checkable) + // That past hard state is now available for the processed future time points: + cacheExec( + *tx, + "INSERT INTO previous_hard_state(history_id, previous_hard_state) "+ + "SELECT history_id, ? FROM next_ids WHERE object_id=?", + idoRow.LastHardState, idoRow.ObjectId, + ) + + // Now they have what they wanted: + cacheExec(*tx, "DELETE FROM next_hard_state WHERE object_id=?", idoRow.ObjectId) + cacheExec(*tx, "DELETE FROM next_ids WHERE object_id=?", idoRow.ObjectId) + + // That's done. + // Now do the same thing as in the "we just started" case above, for the same reason: + + cacheExec( + *tx, "INSERT INTO next_hard_state(object_id, next_hard_state) VALUES (?, ?)", + idoRow.ObjectId, idoRow.LastHardState, + ) + + cacheExec( + *tx, "INSERT INTO next_ids(history_id, object_id) VALUES (?, ?)", + idoRow.Id, idoRow.ObjectId, + ) + } + + commitPeriodically() + checkpoint = idoRow.Id + } + + ht.bar.IncrBy(len(idoRows)) + return + }, + ) + + // No past hard state is available for the processed future time points, assuming pending: + cacheExec( + *tx, "INSERT INTO previous_hard_state(history_id, previous_hard_state) SELECT history_id, 99 FROM next_ids", + ) + + // Now they should have what they wanted: + cacheExec(*tx, "DELETE FROM next_hard_state") + cacheExec(*tx, "DELETE FROM next_ids") + }) + + ht.bar.SetTotal(ht.bar.Current(), true) +} + +// chunkCacheTx rationale: during do operate on cache via *tx. After every completed operation call commitPeriodically() +// which periodically commits *tx and starts a new tx. (That's why tx is a **, not just a *.) +// (On non-recoverable errors the whole program exits.) +func chunkCacheTx(cache *sqlx.DB, do func(tx **sqlx.Tx, commitPeriodically func())) { + logger := log.With("backend", "cache") + + tx, err := cache.Beginx() + if err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "can't begin transaction")) + } + + const commitInterval = 5 * time.Minute + nextCommit := time.Now().Add(commitInterval) + + do(&tx, func() { // commitPeriodically + if now := time.Now(); now.After(nextCommit) { + if err := tx.Commit(); err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "can't commit transaction")) + } + + var err error + + tx, err = cache.Beginx() + if err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "can't begin transaction")) + } + + nextCommit = nextCommit.Add(commitInterval) + } + }) + + if err := tx.Commit(); err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "can't commit transaction")) + } +} + +// cacheGet does cache.Get(dest, query, args...). (On non-recoverable errors the whole program exits.) +func cacheGet(cache interface { + Get(dest interface{}, query string, args ...interface{}) error +}, dest interface{}, query string, args ...interface{}) { + if err := cache.Get(dest, query, args...); err != nil { + log.With("backend", "cache", "query", query, "args", args). + Fatalf("%+v", errors.Wrap(err, "can't perform query")) + } +} + +// cacheSelect does cacheTx.Select(dest, query, args...). (On non-recoverable errors the whole program exits.) +func cacheSelect(cacheTx *sqlx.Tx, dest interface{}, query string, args ...interface{}) { + if err := cacheTx.Select(dest, query, args...); err != nil { + log.With("backend", "cache", "query", query, "args", args). + Fatalf("%+v", errors.Wrap(err, "can't perform query")) + } +} + +// cacheExec does cacheTx.Exec(dml, args...). On non-recoverable errors the whole program exits. +func cacheExec(cacheTx *sqlx.Tx, dml string, args ...interface{}) { + if _, err := cacheTx.Exec(dml, args...); err != nil { + log.With("backend", "cache", "dml", dml, "args", args).Fatalf("%+v", errors.Wrap(err, "can't perform DML")) + } +} diff --git a/cmd/icingadb-migrate/convert.go b/cmd/icingadb-migrate/convert.go new file mode 100644 index 0000000..965077e --- /dev/null +++ b/cmd/icingadb-migrate/convert.go @@ -0,0 +1,824 @@ +package main + +import ( + "database/sql" + _ "embed" + "github.com/icinga/icingadb/pkg/contracts" + v1 "github.com/icinga/icingadb/pkg/icingadb/v1" + "github.com/icinga/icingadb/pkg/icingadb/v1/history" + icingadbTypes "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icingadb/pkg/utils" + "github.com/jmoiron/sqlx" + "github.com/pkg/errors" + "strconv" + "strings" + "time" +) + +//go:embed embed/comment_query.sql +var commentMigrationQuery string + +//go:embed embed/downtime_query.sql +var downtimeMigrationQuery string + +//go:embed embed/flapping_query.sql +var flappingMigrationQuery string + +//go:embed embed/notification_query.sql +var notificationMigrationQuery string + +//go:embed embed/state_query.sql +var stateMigrationQuery string + +type commentRow = struct { + CommenthistoryId uint64 + EntryTime int64 + EntryTimeUsec uint32 + EntryType uint8 + AuthorName string + CommentData string + IsPersistent uint8 + ExpirationTime int64 + DeletionTime int64 + DeletionTimeUsec uint32 + Name string + ObjecttypeId uint8 + Name1 string + Name2 string +} + +func convertCommentRows( + env string, envId icingadbTypes.Binary, + _ func(interface{}, string, ...interface{}), _ *sqlx.Tx, idoRows []commentRow, +) (icingaDbInserts, _ [][]contracts.Entity, checkpoint any) { + var commentHistory, acknowledgementHistory, allHistoryComment, allHistoryAck []contracts.Entity + + for _, row := range idoRows { + checkpoint = row.CommenthistoryId + + typ := objectTypes[row.ObjecttypeId] + hostId := calcObjectId(env, row.Name1) + serviceId := calcServiceId(env, row.Name1, row.Name2) + + switch row.EntryType { + case 1: // user + id := calcObjectId(env, row.Name) + entryTime := convertTime(row.EntryTime, row.EntryTimeUsec) + removeTime := convertTime(row.DeletionTime, row.DeletionTimeUsec) + expireTime := convertTime(row.ExpirationTime, 0) + + commentHistory = append(commentHistory, &history.CommentHistory{ + CommentHistoryEntity: history.CommentHistoryEntity{CommentId: id}, + HistoryTableMeta: history.HistoryTableMeta{ + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + }, + CommentHistoryUpserter: history.CommentHistoryUpserter{ + RemoveTime: removeTime, + HasBeenRemoved: icingadbTypes.Bool{Bool: !removeTime.Time().IsZero(), Valid: true}, + }, + EntryTime: entryTime, + Author: row.AuthorName, + Comment: row.CommentData, + EntryType: icingadbTypes.CommentType(row.EntryType), + IsPersistent: icingadbTypes.Bool{Bool: row.IsPersistent != 0, Valid: true}, + IsSticky: icingadbTypes.Bool{Bool: false, Valid: true}, + ExpireTime: expireTime, + }) + + h1 := &history.HistoryComment{ + HistoryMeta: history.HistoryMeta{ + HistoryEntity: history.HistoryEntity{Id: hashAny([]string{env, "comment_add", row.Name})}, + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + EventType: "comment_add", + }, + CommentHistoryId: id, + EntryTime: entryTime, + } + + h1.EventTime.History = h1 + allHistoryComment = append(allHistoryComment, h1) + + if !removeTime.Time().IsZero() { // remove + h2 := &history.HistoryComment{ + HistoryMeta: history.HistoryMeta{ + HistoryEntity: history.HistoryEntity{Id: hashAny([]string{env, "comment_remove", row.Name})}, + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + EventType: "comment_remove", + }, + CommentHistoryId: id, + EntryTime: entryTime, + RemoveTime: removeTime, + ExpireTime: expireTime, + } + + h2.EventTime.History = h2 + allHistoryComment = append(allHistoryComment, h2) + } + case 4: // ack + name := row.Name1 + if row.Name2 != "" { + name += "!" + row.Name2 + } + + setTime := convertTime(row.EntryTime, row.EntryTimeUsec) + setTs := float64(setTime.Time().UnixMilli()) + clearTime := convertTime(row.DeletionTime, row.DeletionTimeUsec) + acknowledgementHistoryId := hashAny([]any{env, name, setTs}) + + acknowledgementHistory = append(acknowledgementHistory, &history.AcknowledgementHistory{ + EntityWithoutChecksum: v1.EntityWithoutChecksum{ + IdMeta: v1.IdMeta{Id: acknowledgementHistoryId}, + }, + HistoryTableMeta: history.HistoryTableMeta{ + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + }, + AckHistoryUpserter: history.AckHistoryUpserter{ClearTime: clearTime}, + SetTime: setTime, + Author: icingadbTypes.String{ + NullString: sql.NullString{ + String: row.AuthorName, + Valid: true, + }, + }, + Comment: icingadbTypes.String{ + NullString: sql.NullString{ + String: row.CommentData, + Valid: true, + }, + }, + ExpireTime: convertTime(row.ExpirationTime, 0), + IsPersistent: icingadbTypes.Bool{ + Bool: row.IsPersistent != 0, + Valid: true, + }, + }) + + h1 := &history.HistoryAck{ + HistoryMeta: history.HistoryMeta{ + HistoryEntity: history.HistoryEntity{ + Id: hashAny([]any{env, "ack_set", name, setTs}), + }, + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + EventType: "ack_set", + }, + AcknowledgementHistoryId: acknowledgementHistoryId, + SetTime: setTime, + ClearTime: clearTime, + } + + h1.EventTime.History = h1 + allHistoryAck = append(allHistoryAck, h1) + + if !clearTime.Time().IsZero() { + h2 := &history.HistoryAck{ + HistoryMeta: history.HistoryMeta{ + HistoryEntity: history.HistoryEntity{ + Id: hashAny([]any{env, "ack_clear", name, setTs}), + }, + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + EventType: "ack_clear", + }, + AcknowledgementHistoryId: acknowledgementHistoryId, + SetTime: setTime, + ClearTime: clearTime, + } + + h2.EventTime.History = h2 + allHistoryAck = append(allHistoryAck, h2) + } + } + } + + icingaDbInserts = [][]contracts.Entity{commentHistory, acknowledgementHistory, allHistoryComment, allHistoryAck} + return +} + +type downtimeRow = struct { + DowntimehistoryId uint64 + EntryTime int64 + AuthorName string + CommentData string + IsFixed uint8 + Duration int64 + ScheduledStartTime int64 + ScheduledEndTime int64 + ActualStartTime int64 + ActualStartTimeUsec uint32 + ActualEndTime int64 + ActualEndTimeUsec uint32 + WasCancelled uint8 + TriggerTime int64 + Name string + ObjecttypeId uint8 + Name1 string + Name2 string + TriggeredBy string +} + +func convertDowntimeRows( + env string, envId icingadbTypes.Binary, + _ func(interface{}, string, ...interface{}), _ *sqlx.Tx, idoRows []downtimeRow, +) (icingaDbInserts, _ [][]contracts.Entity, checkpoint any) { + var downtimeHistory, allHistory, sla []contracts.Entity + + for _, row := range idoRows { + checkpoint = row.DowntimehistoryId + + id := calcObjectId(env, row.Name) + typ := objectTypes[row.ObjecttypeId] + hostId := calcObjectId(env, row.Name1) + serviceId := calcServiceId(env, row.Name1, row.Name2) + scheduledStart := convertTime(row.ScheduledStartTime, 0) + scheduledEnd := convertTime(row.ScheduledEndTime, 0) + triggerTime := convertTime(row.TriggerTime, 0) + actualStart := convertTime(row.ActualStartTime, row.ActualStartTimeUsec) + actualEnd := convertTime(row.ActualEndTime, row.ActualEndTimeUsec) + var startTime, endTime, cancelTime icingadbTypes.UnixMilli + + if scheduledEnd.Time().IsZero() { + scheduledEnd = icingadbTypes.UnixMilli(scheduledStart.Time().Add(time.Duration(row.Duration) * time.Second)) + } + + if actualStart.Time().IsZero() { + startTime = scheduledStart + } else { + startTime = actualStart + } + + if actualEnd.Time().IsZero() { + endTime = scheduledEnd + } else { + endTime = actualEnd + } + + if triggerTime.Time().IsZero() { + triggerTime = startTime + } + + if row.WasCancelled != 0 { + cancelTime = actualEnd + } + + downtimeHistory = append(downtimeHistory, &history.DowntimeHistory{ + DowntimeHistoryEntity: history.DowntimeHistoryEntity{DowntimeId: id}, + HistoryTableMeta: history.HistoryTableMeta{ + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + }, + DowntimeHistoryUpserter: history.DowntimeHistoryUpserter{ + HasBeenCancelled: icingadbTypes.Bool{Bool: row.WasCancelled != 0, Valid: true}, + CancelTime: cancelTime, + }, + TriggeredById: calcObjectId(env, row.TriggeredBy), + EntryTime: convertTime(row.EntryTime, 0), + Author: row.AuthorName, + Comment: row.CommentData, + IsFlexible: icingadbTypes.Bool{Bool: row.IsFixed == 0, Valid: true}, + FlexibleDuration: uint64(row.Duration) * 1000, + ScheduledStartTime: scheduledStart, + ScheduledEndTime: scheduledEnd, + StartTime: startTime, + EndTime: endTime, + TriggerTime: triggerTime, + }) + + h1 := &history.HistoryDowntime{ + HistoryMeta: history.HistoryMeta{ + HistoryEntity: history.HistoryEntity{Id: hashAny([]string{env, "downtime_start", row.Name})}, + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + EventType: "downtime_start", + }, + DowntimeHistoryId: id, + StartTime: startTime, + } + + h1.EventTime.History = h1 + allHistory = append(allHistory, h1) + + if !actualEnd.Time().IsZero() { // remove + h2 := &history.HistoryDowntime{ + HistoryMeta: history.HistoryMeta{ + HistoryEntity: history.HistoryEntity{Id: hashAny([]string{env, "downtime_end", row.Name})}, + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + EventType: "downtime_end", + }, + DowntimeHistoryId: id, + StartTime: startTime, + CancelTime: cancelTime, + EndTime: endTime, + HasBeenCancelled: icingadbTypes.Bool{Bool: row.WasCancelled != 0, Valid: true}, + } + + h2.EventTime.History = h2 + allHistory = append(allHistory, h2) + } + + s := &history.SlaHistoryDowntime{ + DowntimeHistoryEntity: history.DowntimeHistoryEntity{DowntimeId: id}, + HistoryTableMeta: history.HistoryTableMeta{ + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + }, + DowntimeStart: startTime, + HasBeenCancelled: icingadbTypes.Bool{Bool: row.WasCancelled != 0, Valid: true}, + CancelTime: cancelTime, + EndTime: endTime, + } + + s.DowntimeEnd.History = s + sla = append(sla, s) + } + + icingaDbInserts = [][]contracts.Entity{downtimeHistory, allHistory, sla} + return +} + +type flappingRow = struct { + FlappinghistoryId uint64 + EventTime int64 + EventTimeUsec uint32 + EventType uint16 + PercentStateChange sql.NullFloat64 + LowThreshold float64 + HighThreshold float64 + ObjecttypeId uint8 + Name1 string + Name2 string +} + +func convertFlappingRows( + env string, envId icingadbTypes.Binary, + selectCache func(dest interface{}, query string, args ...interface{}), _ *sqlx.Tx, idoRows []flappingRow, +) (icingaDbInserts, icingaDbUpserts [][]contracts.Entity, checkpoint any) { + if len(idoRows) < 1 { + return + } + + var cached []struct { + HistoryId uint64 + EventTime int64 + EventTimeUsec uint32 + } + selectCache( + &cached, "SELECT history_id, event_time, event_time_usec FROM end_start_time WHERE history_id BETWEEN ? AND ?", + idoRows[0].FlappinghistoryId, idoRows[len(idoRows)-1].FlappinghistoryId, + ) + + // Needed for start time (see below). + cachedById := make(map[uint64]icingadbTypes.UnixMilli, len(cached)) + for _, c := range cached { + cachedById[c.HistoryId] = convertTime(c.EventTime, c.EventTimeUsec) + } + + var flappingHistory, flappingHistoryUpserts, allHistory []contracts.Entity + for _, row := range idoRows { + checkpoint = row.FlappinghistoryId + + ts := convertTime(row.EventTime, row.EventTimeUsec) + + // Needed for ID (see below). + var start icingadbTypes.UnixMilli + if row.EventType == 1001 { // end + var ok bool + start, ok = cachedById[row.FlappinghistoryId] + + if !ok { + continue + } + } else { + start = ts + } + + name := row.Name1 + if row.Name2 != "" { + name += "!" + row.Name2 + } + + typ := objectTypes[row.ObjecttypeId] + hostId := calcObjectId(env, row.Name1) + serviceId := calcServiceId(env, row.Name1, row.Name2) + startTime := float64(start.Time().UnixMilli()) + flappingHistoryId := hashAny([]interface{}{env, name, startTime}) + + if row.EventType == 1001 { // end + // The start counterpart should already have been inserted. + flappingHistoryUpserts = append(flappingHistoryUpserts, &history.FlappingHistory{ + EntityWithoutChecksum: v1.EntityWithoutChecksum{ + IdMeta: v1.IdMeta{Id: flappingHistoryId}, + }, + HistoryTableMeta: history.HistoryTableMeta{ + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + }, + FlappingHistoryUpserter: history.FlappingHistoryUpserter{ + EndTime: ts, + PercentStateChangeEnd: icingadbTypes.Float{NullFloat64: row.PercentStateChange}, + FlappingThresholdLow: float32(row.LowThreshold), + FlappingThresholdHigh: float32(row.HighThreshold), + }, + StartTime: start, + }) + + h := &history.HistoryFlapping{ + HistoryMeta: history.HistoryMeta{ + HistoryEntity: history.HistoryEntity{ + Id: hashAny([]interface{}{env, "flapping_end", name, startTime}), + }, + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + EventType: "flapping_end", + }, + FlappingHistoryId: flappingHistoryId, + StartTime: start, + EndTime: ts, + } + + h.EventTime.History = h + allHistory = append(allHistory, h) + } else { + flappingHistory = append(flappingHistory, &history.FlappingHistory{ + EntityWithoutChecksum: v1.EntityWithoutChecksum{ + IdMeta: v1.IdMeta{Id: flappingHistoryId}, + }, + HistoryTableMeta: history.HistoryTableMeta{ + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + }, + FlappingHistoryUpserter: history.FlappingHistoryUpserter{ + FlappingThresholdLow: float32(row.LowThreshold), + FlappingThresholdHigh: float32(row.HighThreshold), + }, + StartTime: start, + PercentStateChangeStart: icingadbTypes.Float{NullFloat64: row.PercentStateChange}, + }) + + h := &history.HistoryFlapping{ + HistoryMeta: history.HistoryMeta{ + HistoryEntity: history.HistoryEntity{ + Id: hashAny([]interface{}{env, "flapping_start", name, startTime}), + }, + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + EventType: "flapping_start", + }, + FlappingHistoryId: flappingHistoryId, + StartTime: start, + } + + h.EventTime.History = h + allHistory = append(allHistory, h) + } + } + + icingaDbInserts = [][]contracts.Entity{flappingHistory, allHistory} + icingaDbUpserts = [][]contracts.Entity{flappingHistoryUpserts} + return +} + +type notificationRow = struct { + NotificationId uint64 + NotificationReason uint8 + EndTime int64 + EndTimeUsec uint32 + State uint8 + Output string + LongOutput sql.NullString + ContactsNotified uint16 + ObjecttypeId uint8 + Name1 string + Name2 string +} + +func convertNotificationRows( + env string, envId icingadbTypes.Binary, + selectCache func(dest interface{}, query string, args ...interface{}), ido *sqlx.Tx, idoRows []notificationRow, +) (icingaDbInserts, _ [][]contracts.Entity, checkpoint any) { + if len(idoRows) < 1 { + return + } + + var cached []struct { + HistoryId uint64 + PreviousHardState uint8 + } + selectCache( + &cached, "SELECT history_id, previous_hard_state FROM previous_hard_state WHERE history_id BETWEEN ? AND ?", + idoRows[0].NotificationId, idoRows[len(idoRows)-1].NotificationId, + ) + + cachedById := make(map[uint64]uint8, len(cached)) + for _, c := range cached { + cachedById[c.HistoryId] = c.PreviousHardState + } + + var contacts []struct { + NotificationId uint64 + Name1 string + } + + { + var query = ido.Rebind( + "SELECT c.notification_id, o.name1 FROM icinga_contactnotifications c " + + "INNER JOIN icinga_objects o ON o.object_id=c.contact_object_id WHERE c.notification_id BETWEEN ? AND ?", + ) + + err := ido.Select(&contacts, query, idoRows[0].NotificationId, idoRows[len(idoRows)-1].NotificationId) + if err != nil { + log.With("query", query).Fatalf("%+v", errors.Wrap(err, "can't perform query")) + } + } + + contactsById := map[uint64]map[string]struct{}{} + for _, contact := range contacts { + perId, ok := contactsById[contact.NotificationId] + if !ok { + perId = map[string]struct{}{} + contactsById[contact.NotificationId] = perId + } + + perId[contact.Name1] = struct{}{} + } + + var notificationHistory, userNotificationHistory, allHistory []contracts.Entity + for _, row := range idoRows { + checkpoint = row.NotificationId + + previousHardState, ok := cachedById[row.NotificationId] + if !ok { + continue + } + + // The IDO tracks only sent notifications, but not notification config objects, nor even their names. + // We have to improvise. By the way we avoid unwanted collisions between synced and migrated data via "ID" + // instead of "HOST[!SERVICE]!NOTIFICATION" (ok as this name won't be parsed, but only hashed) and between + // migrated data itself via the history ID as object name, i.e. one "virtual object" per sent notification. + name := strconv.FormatUint(row.NotificationId, 10) + + nt := convertNotificationType(row.NotificationReason, row.State) + + ntEnum, err := nt.Value() + if err != nil { + continue + } + + ts := convertTime(row.EndTime, row.EndTimeUsec) + tsMilli := float64(ts.Time().UnixMilli()) + notificationHistoryId := hashAny([]interface{}{env, name, ntEnum, tsMilli}) + id := hashAny([]interface{}{env, "notification", name, ntEnum, tsMilli}) + typ := objectTypes[row.ObjecttypeId] + hostId := calcObjectId(env, row.Name1) + serviceId := calcServiceId(env, row.Name1, row.Name2) + + text := row.Output + if row.LongOutput.Valid { + text += "\n\n" + row.LongOutput.String + } + + notificationHistory = append(notificationHistory, &history.NotificationHistory{ + HistoryTableEntity: history.HistoryTableEntity{ + EntityWithoutChecksum: v1.EntityWithoutChecksum{ + IdMeta: v1.IdMeta{Id: notificationHistoryId}, + }, + }, + HistoryTableMeta: history.HistoryTableMeta{ + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + }, + NotificationId: calcObjectId(env, name), + Type: nt, + SendTime: ts, + State: row.State, + PreviousHardState: previousHardState, + Text: icingadbTypes.String{ + NullString: sql.NullString{ + String: text, + Valid: true, + }, + }, + UsersNotified: row.ContactsNotified, + }) + + allHistory = append(allHistory, &history.HistoryNotification{ + HistoryMeta: history.HistoryMeta{ + HistoryEntity: history.HistoryEntity{Id: id}, + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + EventType: "notification", + }, + NotificationHistoryId: notificationHistoryId, + EventTime: ts, + }) + + for contact := range contactsById[row.NotificationId] { + userId := calcObjectId(env, contact) + + userNotificationHistory = append(userNotificationHistory, &history.UserNotificationHistory{ + EntityWithoutChecksum: v1.EntityWithoutChecksum{ + IdMeta: v1.IdMeta{ + Id: utils.Checksum(append(append([]byte(nil), notificationHistoryId...), userId...)), + }, + }, + EnvironmentMeta: v1.EnvironmentMeta{EnvironmentId: envId}, + NotificationHistoryId: notificationHistoryId, + UserId: userId, + }) + } + } + + icingaDbInserts = [][]contracts.Entity{notificationHistory, userNotificationHistory, allHistory} + return +} + +// convertNotificationType maps IDO values[1] to Icinga DB ones[2]. +// +// [1]: https://github.com/Icinga/icinga2/blob/32c7f7730db154ba0dff5856a8985d125791c/lib/db_ido/dbevents.cpp#L1507-L1524 +// [2]: https://github.com/Icinga/icingadb/blob/8f31ac143875498797725adb9bfacf3d4/pkg/types/notification_type.go#L53-L61 +func convertNotificationType(notificationReason, state uint8) icingadbTypes.NotificationType { + switch notificationReason { + case 0: // state + if state == 0 { + return 64 // recovery + } else { + return 32 // problem + } + case 1: // acknowledgement + return 16 + case 2: // flapping start + return 128 + case 3: // flapping end + return 256 + case 5: // downtime start + return 1 + case 6: // downtime end + return 2 + case 7: // downtime removed + return 4 + case 8: // custom + return 8 + default: // bad notification type + return 0 + } +} + +type stateRow = struct { + StatehistoryId uint64 + StateTime int64 + StateTimeUsec uint32 + State uint8 + StateType uint8 + CurrentCheckAttempt uint16 + MaxCheckAttempts uint16 + LastState uint8 + LastHardState uint8 + Output sql.NullString + LongOutput sql.NullString + CheckSource sql.NullString + ObjecttypeId uint8 + Name1 string + Name2 string +} + +func convertStateRows( + env string, envId icingadbTypes.Binary, + selectCache func(dest interface{}, query string, args ...interface{}), _ *sqlx.Tx, idoRows []stateRow, +) (icingaDbInserts, _ [][]contracts.Entity, checkpoint any) { + if len(idoRows) < 1 { + return + } + + var cached []struct { + HistoryId uint64 + PreviousHardState uint8 + } + selectCache( + &cached, "SELECT history_id, previous_hard_state FROM previous_hard_state WHERE history_id BETWEEN ? AND ?", + idoRows[0].StatehistoryId, idoRows[len(idoRows)-1].StatehistoryId, + ) + + cachedById := make(map[uint64]uint8, len(cached)) + for _, c := range cached { + cachedById[c.HistoryId] = c.PreviousHardState + } + + var stateHistory, allHistory, sla []contracts.Entity + for _, row := range idoRows { + checkpoint = row.StatehistoryId + + previousHardState, ok := cachedById[row.StatehistoryId] + if !ok { + continue + } + + name := strings.Join([]string{row.Name1, row.Name2}, "!") + ts := convertTime(row.StateTime, row.StateTimeUsec) + tsMilli := float64(ts.Time().UnixMilli()) + stateHistoryId := hashAny([]interface{}{env, name, tsMilli}) + id := hashAny([]interface{}{env, "state_change", name, tsMilli}) + typ := objectTypes[row.ObjecttypeId] + hostId := calcObjectId(env, row.Name1) + serviceId := calcServiceId(env, row.Name1, row.Name2) + + stateHistory = append(stateHistory, &history.StateHistory{ + HistoryTableEntity: history.HistoryTableEntity{ + EntityWithoutChecksum: v1.EntityWithoutChecksum{ + IdMeta: v1.IdMeta{Id: stateHistoryId}, + }, + }, + HistoryTableMeta: history.HistoryTableMeta{ + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + }, + EventTime: ts, + StateType: icingadbTypes.StateType(row.StateType), + SoftState: row.State, + HardState: row.LastHardState, + PreviousSoftState: row.LastState, + PreviousHardState: previousHardState, + CheckAttempt: uint8(row.CurrentCheckAttempt), + Output: icingadbTypes.String{NullString: row.Output}, + LongOutput: icingadbTypes.String{NullString: row.LongOutput}, + MaxCheckAttempts: uint32(row.MaxCheckAttempts), + CheckSource: icingadbTypes.String{NullString: row.CheckSource}, + }) + + allHistory = append(allHistory, &history.HistoryState{ + HistoryMeta: history.HistoryMeta{ + HistoryEntity: history.HistoryEntity{Id: id}, + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + EventType: "state_change", + }, + StateHistoryId: stateHistoryId, + EventTime: ts, + }) + + if icingadbTypes.StateType(row.StateType) == icingadbTypes.StateHard { + // only hard state changes are relevant for SLA history, discard all others + + sla = append(sla, &history.SlaHistoryState{ + HistoryTableEntity: history.HistoryTableEntity{ + EntityWithoutChecksum: v1.EntityWithoutChecksum{ + IdMeta: v1.IdMeta{Id: stateHistoryId}, + }, + }, + HistoryTableMeta: history.HistoryTableMeta{ + EnvironmentId: envId, + ObjectType: typ, + HostId: hostId, + ServiceId: serviceId, + }, + EventTime: ts, + StateType: icingadbTypes.StateType(row.StateType), + HardState: row.LastHardState, + PreviousHardState: previousHardState, + }) + } + } + + icingaDbInserts = [][]contracts.Entity{stateHistory, allHistory, sla} + return +} diff --git a/cmd/icingadb-migrate/embed/comment_query.sql b/cmd/icingadb-migrate/embed/comment_query.sql new file mode 100644 index 0000000..774ccf9 --- /dev/null +++ b/cmd/icingadb-migrate/embed/comment_query.sql @@ -0,0 +1,11 @@ +SELECT ch.commenthistory_id, UNIX_TIMESTAMP(ch.entry_time) entry_time, + ch.entry_time_usec, ch.entry_type, ch.author_name, ch.comment_data, ch.is_persistent, + COALESCE(UNIX_TIMESTAMP(ch.expiration_time), 0) expiration_time, + COALESCE(UNIX_TIMESTAMP(ch.deletion_time), 0) deletion_time, + ch.deletion_time_usec, ch.name, o.objecttype_id, o.name1, COALESCE(o.name2, '') name2 +FROM icinga_commenthistory ch USE INDEX (PRIMARY) +INNER JOIN icinga_objects o ON o.object_id=ch.object_id +WHERE ch.commenthistory_id BETWEEN :fromid AND :toid +AND ch.commenthistory_id > :checkpoint -- where we were interrupted +ORDER BY ch.commenthistory_id -- this way we know what has already been migrated from just the last row's ID +LIMIT :bulk diff --git a/cmd/icingadb-migrate/embed/downtime_query.sql b/cmd/icingadb-migrate/embed/downtime_query.sql new file mode 100644 index 0000000..e3d36bf --- /dev/null +++ b/cmd/icingadb-migrate/embed/downtime_query.sql @@ -0,0 +1,14 @@ +SELECT dh.downtimehistory_id, UNIX_TIMESTAMP(dh.entry_time) entry_time, dh.author_name, dh.comment_data, + dh.is_fixed, dh.duration, UNIX_TIMESTAMP(dh.scheduled_start_time) scheduled_start_time, + COALESCE(UNIX_TIMESTAMP(dh.scheduled_end_time), 0) scheduled_end_time, + COALESCE(UNIX_TIMESTAMP(dh.actual_start_time), 0) actual_start_time, dh.actual_start_time_usec, + COALESCE(UNIX_TIMESTAMP(dh.actual_end_time), 0) actual_end_time, dh.actual_end_time_usec, dh.was_cancelled, + COALESCE(UNIX_TIMESTAMP(dh.trigger_time), 0) trigger_time, dh.name, o.objecttype_id, + o.name1, COALESCE(o.name2, '') name2, COALESCE(sd.name, '') triggered_by +FROM icinga_downtimehistory dh USE INDEX (PRIMARY) +INNER JOIN icinga_objects o ON o.object_id=dh.object_id +LEFT JOIN icinga_scheduleddowntime sd ON sd.scheduleddowntime_id=dh.triggered_by_id +WHERE dh.downtimehistory_id BETWEEN :fromid AND :toid +AND dh.downtimehistory_id > :checkpoint -- where we were interrupted +ORDER BY dh.downtimehistory_id -- this way we know what has already been migrated from just the last row's ID +LIMIT :bulk diff --git a/cmd/icingadb-migrate/embed/event_time_cache_schema.sql b/cmd/icingadb-migrate/embed/event_time_cache_schema.sql new file mode 100644 index 0000000..5940754 --- /dev/null +++ b/cmd/icingadb-migrate/embed/event_time_cache_schema.sql @@ -0,0 +1,15 @@ +PRAGMA main.auto_vacuum = 1; + +-- Icinga DB's flapping_history#start_time per flapping_end row (IDO's icinga_flappinghistory#flappinghistory_id). +CREATE TABLE IF NOT EXISTS end_start_time ( + history_id INT PRIMARY KEY, + event_time INT NOT NULL, + event_time_usec INT NOT NULL +); + +-- Helper table, the last start_time per icinga_statehistory#object_id. +CREATE TABLE IF NOT EXISTS last_start_time ( + object_id INT PRIMARY KEY, + event_time INT NOT NULL, + event_time_usec INT NOT NULL +); diff --git a/cmd/icingadb-migrate/embed/flapping_query.sql b/cmd/icingadb-migrate/embed/flapping_query.sql new file mode 100644 index 0000000..5e25bde --- /dev/null +++ b/cmd/icingadb-migrate/embed/flapping_query.sql @@ -0,0 +1,9 @@ +SELECT fh.flappinghistory_id, UNIX_TIMESTAMP(fh.event_time) event_time, + fh.event_time_usec, fh.event_type, fh.percent_state_change, fh.low_threshold, + fh.high_threshold, o.objecttype_id, o.name1, COALESCE(o.name2, '') name2 +FROM icinga_flappinghistory fh USE INDEX (PRIMARY) +INNER JOIN icinga_objects o ON o.object_id=fh.object_id +WHERE fh.flappinghistory_id BETWEEN :fromid AND :toid +AND fh.flappinghistory_id > :checkpoint -- where we were interrupted +ORDER BY fh.flappinghistory_id -- this way we know what has already been migrated from just the last row's ID +LIMIT :bulk diff --git a/cmd/icingadb-migrate/embed/ido_migration_progress_schema.sql b/cmd/icingadb-migrate/embed/ido_migration_progress_schema.sql new file mode 100644 index 0000000..54c1c00 --- /dev/null +++ b/cmd/icingadb-migrate/embed/ido_migration_progress_schema.sql @@ -0,0 +1,9 @@ +CREATE TABLE IF NOT EXISTS ido_migration_progress ( + environment_id CHAR(40) NOT NULL, -- Hex SHA1. Rationale: CHAR(40) is not RDBMS-specific + history_type VARCHAR(63) NOT NULL, + from_ts BIGINT NOT NULL, + to_ts BIGINT NOT NULL, + last_ido_id BIGINT NOT NULL, + + CONSTRAINT pk_ido_migration_progress PRIMARY KEY (environment_id, history_type, from_ts, to_ts) +); diff --git a/cmd/icingadb-migrate/embed/notification_query.sql b/cmd/icingadb-migrate/embed/notification_query.sql new file mode 100644 index 0000000..f963b2e --- /dev/null +++ b/cmd/icingadb-migrate/embed/notification_query.sql @@ -0,0 +1,9 @@ +SELECT n.notification_id, n.notification_reason, UNIX_TIMESTAMP(n.end_time) end_time, + n.end_time_usec, n.state, COALESCE(n.output, '') output, n.long_output, + n.contacts_notified, o.objecttype_id, o.name1, COALESCE(o.name2, '') name2 +FROM icinga_notifications n USE INDEX (PRIMARY) +INNER JOIN icinga_objects o ON o.object_id=n.object_id +WHERE n.notification_id BETWEEN :fromid AND :toid +AND n.notification_id <= :cache_limit AND n.notification_id > :checkpoint -- where we were interrupted +ORDER BY n.notification_id -- this way we know what has already been migrated from just the last row's ID +LIMIT :bulk diff --git a/cmd/icingadb-migrate/embed/previous_hard_state_cache_schema.sql b/cmd/icingadb-migrate/embed/previous_hard_state_cache_schema.sql new file mode 100644 index 0000000..315f22d --- /dev/null +++ b/cmd/icingadb-migrate/embed/previous_hard_state_cache_schema.sql @@ -0,0 +1,22 @@ +PRAGMA main.auto_vacuum = 1; + +-- Icinga DB's state_history#previous_hard_state per IDO's icinga_statehistory#statehistory_id. +CREATE TABLE IF NOT EXISTS previous_hard_state ( + history_id INT PRIMARY KEY, + previous_hard_state INT NOT NULL +); + +-- Helper table, the current last_hard_state per icinga_statehistory#object_id. +CREATE TABLE IF NOT EXISTS next_hard_state ( + object_id INT PRIMARY KEY, + next_hard_state INT NOT NULL +); + +-- Helper table for stashing icinga_statehistory#statehistory_id until last_hard_state changes. +CREATE TABLE IF NOT EXISTS next_ids ( + object_id INT NOT NULL, + history_id INT NOT NULL +); + +CREATE INDEX IF NOT EXISTS next_ids_object_id ON next_ids (object_id); +CREATE INDEX IF NOT EXISTS next_ids_history_id ON next_ids (history_id); diff --git a/cmd/icingadb-migrate/embed/state_query.sql b/cmd/icingadb-migrate/embed/state_query.sql new file mode 100644 index 0000000..3e95d48 --- /dev/null +++ b/cmd/icingadb-migrate/embed/state_query.sql @@ -0,0 +1,9 @@ +SELECT sh.statehistory_id, UNIX_TIMESTAMP(sh.state_time) state_time, sh.state_time_usec, sh.state, + sh.state_type, sh.current_check_attempt, sh.max_check_attempts, sh.last_state, sh.last_hard_state, + sh.output, sh.long_output, sh.check_source, o.objecttype_id, o.name1, COALESCE(o.name2, '') name2 +FROM icinga_statehistory sh USE INDEX (PRIMARY) +INNER JOIN icinga_objects o ON o.object_id=sh.object_id +WHERE sh.statehistory_id BETWEEN :fromid AND :toid +AND sh.statehistory_id <= :cache_limit AND sh.statehistory_id > :checkpoint -- where we were interrupted +ORDER BY sh.statehistory_id -- this way we know what has already been migrated from just the last row's ID +LIMIT :bulk diff --git a/cmd/icingadb-migrate/main.go b/cmd/icingadb-migrate/main.go new file mode 100644 index 0000000..9618ec2 --- /dev/null +++ b/cmd/icingadb-migrate/main.go @@ -0,0 +1,493 @@ +package main + +import ( + "context" + "database/sql" + _ "embed" + "encoding/hex" + "fmt" + "github.com/creasty/defaults" + "github.com/goccy/go-yaml" + "github.com/icinga/icingadb/pkg/config" + "github.com/icinga/icingadb/pkg/contracts" + "github.com/icinga/icingadb/pkg/icingadb" + "github.com/icinga/icingadb/pkg/logging" + icingadbTypes "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icingadb/pkg/utils" + "github.com/jessevdk/go-flags" + "github.com/jmoiron/sqlx" + "github.com/jmoiron/sqlx/reflectx" + _ "github.com/mattn/go-sqlite3" + "github.com/pkg/errors" + "github.com/vbauerster/mpb/v6" + "go.uber.org/zap" + "golang.org/x/sync/errgroup" + "math" + "os" + "path" + "path/filepath" + "regexp" + "strings" + "time" +) + +// Flags defines the CLI flags. +type Flags struct { + // Config is the path to the config file. + Config string `short:"c" long:"config" description:"path to config file" required:"true"` + // Cache is a (not necessarily yet existing) directory for caching. + Cache string `short:"t" long:"cache" description:"path for caching" required:"true"` +} + +// Config defines the YAML config structure. +type Config struct { + IDO struct { + config.Database `yaml:"-,inline"` + From int32 `yaml:"from"` + To int32 `yaml:"to" default:"2147483647"` + } `yaml:"ido"` + IcingaDB config.Database `yaml:"icingadb"` + // Icinga2 specifies information the IDO doesn't provide. + Icinga2 struct { + // Env specifies the environment ID, hex. + Env string `yaml:"env"` + } `yaml:"icinga2"` +} + +// main validates the CLI, parses the config and migrates history from IDO to Icinga DB (see comments below). +// Most of the called functions exit the whole program by themselves on non-recoverable errors. +func main() { + f := &Flags{} + if _, err := flags.NewParser(f, flags.Default).Parse(); err != nil { + os.Exit(2) + } + + c, ex := parseConfig(f) + if c == nil { + os.Exit(ex) + } + + envId, err := hex.DecodeString(c.Icinga2.Env) + if err != nil { + _, _ = fmt.Fprintf(os.Stderr, "bad env ID: %s\n", err.Error()) + os.Exit(2) + } + + defer func() { _ = log.Sync() }() + + log.Info("Starting IDO to Icinga DB history migration") + + ido, idb := connectAll(c) + + if err := idb.CheckSchema(context.Background()); err != nil { + log.Fatalf("%+v", err) + } + + // Start repeatable-read-isolated transactions (consistent SELECTs) + // not to have to care for IDO data changes during migration. + startIdoTx(ido) + + // Prepare the directory structure the following fillCache() will need later. + mkCache(f, c, idb.Mapper) + + log.Info("Computing progress") + + // Convert Config#IDO.From and .To to IDs to restrict data by PK. + computeIdRange(c) + + // computeProgress figures out which data has already been migrated + // not to start from the beginning every time in the following migrate(). + computeProgress(c, idb, envId) + + // On rationale read buildEventTimeCache() and buildPreviousHardStateCache() docs. + log.Info("Filling cache") + fillCache() + + log.Info("Actually migrating") + migrate(c, idb, envId) + + log.Info("Cleaning up cache") + cleanupCache(f) +} + +// parseConfig validates the f.Config file and returns the config and -1 or - on failure - nil and an exit code. +func parseConfig(f *Flags) (_ *Config, exit int) { + cf, err := os.Open(f.Config) + if err != nil { + _, _ = fmt.Fprintf(os.Stderr, "can't open config file: %s\n", err.Error()) + return nil, 2 + } + defer func() { _ = cf.Close() }() + + c := &Config{} + if err := defaults.Set(c); err != nil { + _, _ = fmt.Fprintf(os.Stderr, "can't set config defaults: %s\n", err.Error()) + return nil, 2 + } + + if err := yaml.NewDecoder(cf).Decode(c); err != nil { + _, _ = fmt.Fprintf(os.Stderr, "can't parse config file: %s\n", err.Error()) + return nil, 2 + } + + return c, -1 +} + +var nonWords = regexp.MustCompile(`\W+`) + +// mkCache ensures /.sqlite3 files are present and contain their schema +// and initializes types[*].cache. (On non-recoverable errors the whole program exits.) +func mkCache(f *Flags, c *Config, mapper *reflectx.Mapper) { + log.Info("Preparing cache") + + if err := os.MkdirAll(f.Cache, 0700); err != nil { + log.With("dir", f.Cache).Fatalf("%+v", errors.Wrap(err, "can't create directory")) + } + + types.forEach(func(ht *historyType) { + if ht.cacheSchema == "" { + return + } + + file := path.Join(f.Cache, fmt.Sprintf( + "%s_%d-%d.sqlite3", nonWords.ReplaceAllLiteralString(ht.name, "_"), c.IDO.From, c.IDO.To, + )) + + var err error + + ht.cache, err = sqlx.Open("sqlite3", "file:"+file) + if err != nil { + log.With("file", file).Fatalf("%+v", errors.Wrap(err, "can't open SQLite database")) + } + + ht.cacheFile = file + ht.cache.Mapper = mapper + + if _, err := ht.cache.Exec(ht.cacheSchema); err != nil { + log.With("file", file, "ddl", ht.cacheSchema). + Fatalf("%+v", errors.Wrap(err, "can't import schema into SQLite database")) + } + }) +} + +// connectAll connects to ido and idb (Icinga DB) as c specifies. (On non-recoverable errors the whole program exits.) +func connectAll(c *Config) (ido, idb *icingadb.DB) { + log.Info("Connecting to databases") + eg, _ := errgroup.WithContext(context.Background()) + + eg.Go(func() error { + ido = connect("IDO", &c.IDO.Database) + return nil + }) + + eg.Go(func() error { + idb = connect("Icinga DB", &c.IcingaDB) + return nil + }) + + _ = eg.Wait() + return +} + +// connect connects to which DB as cfg specifies. (On non-recoverable errors the whole program exits.) +func connect(which string, cfg *config.Database) *icingadb.DB { + db, err := cfg.Open(logging.NewLogger(zap.NewNop().Sugar(), 20*time.Second)) + if err != nil { + log.With("backend", which).Fatalf("%+v", errors.Wrap(err, "can't connect to database")) + } + + if err := db.Ping(); err != nil { + log.With("backend", which).Fatalf("%+v", errors.Wrap(err, "can't connect to database")) + } + + return db +} + +// startIdoTx initializes types[*].snapshot with new repeatable-read-isolated ido transactions. +// (On non-recoverable errors the whole program exits.) +func startIdoTx(ido *icingadb.DB) { + types.forEach(func(ht *historyType) { + tx, err := ido.BeginTxx(context.Background(), &sql.TxOptions{Isolation: sql.LevelRepeatableRead}) + if err != nil { + log.Fatalf("%+v", errors.Wrap(err, "can't begin snapshot transaction")) + } + + ht.snapshot = tx + }) +} + +// computeIdRange initializes types[*].fromId and types[*].toId. +// (On non-recoverable errors the whole program exits.) +func computeIdRange(c *Config) { + types.forEach(func(ht *historyType) { + getBorderId := func(id *uint64, timeColumns []string, compOperator string, borderTime int32, sortOrder string) { + deZeroFied := make([]string, 0, len(timeColumns)) + for _, column := range timeColumns { + deZeroFied = append(deZeroFied, fmt.Sprintf( + "CASE WHEN %[1]s < '1970-01-03 00:00:00' THEN NULL ELSE %[1]s END", column, + )) + } + + var timeExpr string + if len(deZeroFied) > 1 { + timeExpr = "COALESCE(" + strings.Join(deZeroFied, ",") + ")" + } else { + timeExpr = deZeroFied[0] + } + + query := ht.snapshot.Rebind( + "SELECT " + ht.idoIdColumn + " FROM " + ht.idoTable + " WHERE " + timeExpr + " " + compOperator + + " FROM_UNIXTIME(?) ORDER BY " + ht.idoIdColumn + " " + sortOrder + " LIMIT 1", + ) + + switch err := ht.snapshot.Get(id, query, borderTime); err { + case nil, sql.ErrNoRows: + default: + log.With("backend", "IDO", "query", query, "args", []any{borderTime}). + Fatalf("%+v", errors.Wrap(err, "can't perform query")) + } + } + + ht.fromId = math.MaxInt64 + + getBorderId(&ht.fromId, ht.idoEndColumns, ">=", c.IDO.From, "ASC") + getBorderId(&ht.toId, ht.idoStartColumns, "<=", c.IDO.To, "DESC") + }) +} + +//go:embed embed/ido_migration_progress_schema.sql +var idoMigrationProgressSchema string + +// computeProgress initializes types[*].lastId, types[*].total and types[*].done. +// (On non-recoverable errors the whole program exits.) +func computeProgress(c *Config, idb *icingadb.DB, envId []byte) { + if _, err := idb.Exec(idoMigrationProgressSchema); err != nil { + log.Fatalf("%+v", errors.Wrap(err, "can't create table ido_migration_progress")) + } + + envIdHex := hex.EncodeToString(envId) + types.forEach(func(ht *historyType) { + var query = idb.Rebind( + "SELECT last_ido_id FROM ido_migration_progress" + + " WHERE environment_id=? AND history_type=? AND from_ts=? AND to_ts=?", + ) + + args := []any{envIdHex, ht.name, c.IDO.From, c.IDO.To} + + if err := idb.Get(&ht.lastId, query, args...); err != nil && err != sql.ErrNoRows { + log.With("backend", "Icinga DB", "query", query, "args", args). + Fatalf("%+v", errors.Wrap(err, "can't perform query")) + } + }) + + types.forEach(func(ht *historyType) { + if ht.cacheFiller != nil { + err := ht.snapshot.Get( + &ht.cacheTotal, + ht.snapshot.Rebind( + // For actual migration icinga_objects will be joined anyway, + // so it makes no sense to take vanished objects into account. + "SELECT COUNT(*) FROM "+ht.idoTable+ + " xh INNER JOIN icinga_objects o ON o.object_id=xh.object_id WHERE xh."+ht.idoIdColumn+" <= ?", + ), + ht.toId, + ) + if err != nil { + log.Fatalf("%+v", errors.Wrap(err, "can't count query")) + } + } + }) + + types.forEach(func(ht *historyType) { + var rows []struct { + Migrated uint8 + Cnt int64 + } + + err := ht.snapshot.Select( + &rows, + ht.snapshot.Rebind( + // For actual migration icinga_objects will be joined anyway, + // so it makes no sense to take vanished objects into account. + "SELECT CASE WHEN xh."+ht.idoIdColumn+"<=? THEN 1 ELSE 0 END migrated, COUNT(*) cnt FROM "+ + ht.idoTable+" xh INNER JOIN icinga_objects o ON o.object_id=xh.object_id WHERE xh."+ + ht.idoIdColumn+" BETWEEN ? AND ? GROUP BY migrated", + ), + ht.lastId, ht.fromId, ht.toId, + ) + if err != nil { + log.Fatalf("%+v", errors.Wrap(err, "can't count query")) + } + + for _, row := range rows { + ht.total += row.Cnt + + if row.Migrated == 1 { + ht.done = row.Cnt + } + } + + log.Infow("Counted migrated IDO events", "type", ht.name, "migrated", ht.done, "total", ht.total) + }) +} + +// fillCache fills /.sqlite3 (actually types[*].cacheFiller does). +func fillCache() { + progress := mpb.New() + for _, ht := range types { + if ht.cacheFiller != nil { + ht.setupBar(progress, ht.cacheTotal) + } + } + + types.forEach(func(ht *historyType) { + if ht.cacheFiller != nil { + ht.cacheFiller(ht) + } + }) + + progress.Wait() +} + +// migrate does the actual migration. +func migrate(c *Config, idb *icingadb.DB, envId []byte) { + progress := mpb.New() + for _, ht := range types { + ht.setupBar(progress, ht.total) + } + + types.forEach(func(ht *historyType) { + ht.migrate(c, idb, envId, ht) + }) + + progress.Wait() +} + +// migrate does the actual migration for one history type. +func migrateOneType[IdoRow any]( + c *Config, idb *icingadb.DB, envId []byte, ht *historyType, + convertRows func(env string, envId icingadbTypes.Binary, + selectCache func(dest interface{}, query string, args ...interface{}), ido *sqlx.Tx, + idoRows []IdoRow) (icingaDbInserts, icingaDbUpserts [][]contracts.Entity, checkpoint any), +) { + var lastQuery string + var lastStmt *sqlx.Stmt + + defer func() { + if lastStmt != nil { + _ = lastStmt.Close() + } + }() + + selectCache := func(dest interface{}, query string, args ...interface{}) { + // Prepare new one, if old one doesn't fit anymore. + if query != lastQuery { + if lastStmt != nil { + _ = lastStmt.Close() + } + + var err error + + lastStmt, err = ht.cache.Preparex(query) + if err != nil { + log.With("backend", "cache", "query", query). + Fatalf("%+v", errors.Wrap(err, "can't prepare query")) + } + + lastQuery = query + } + + if err := lastStmt.Select(dest, args...); err != nil { + log.With("backend", "cache", "query", query, "args", args). + Fatalf("%+v", errors.Wrap(err, "can't perform query")) + } + } + + var args map[string]interface{} + + // For the case that the cache was older that the IDO, + // but ht.cacheFiller couldn't update it, limit (WHERE) our source data set. + if ht.cacheLimitQuery != "" { + var limit sql.NullInt64 + cacheGet(ht.cache, &limit, ht.cacheLimitQuery) + args = map[string]interface{}{"cache_limit": limit.Int64} + } + + upsertProgress, _ := idb.BuildUpsertStmt(&IdoMigrationProgress{}) + envIdHex := hex.EncodeToString(envId) + + ht.bar.SetCurrent(ht.done) + + // Stream IDO rows, ... + sliceIdoHistory( + ht, ht.migrationQuery, args, ht.lastId, + func(idoRows []IdoRow) (checkpoint interface{}) { + // ... convert them, ... + inserts, upserts, lastIdoId := convertRows(c.Icinga2.Env, envId, selectCache, ht.snapshot, idoRows) + + // ... and insert them: + + for _, op := range []struct { + kind string + data [][]contracts.Entity + streamer func(context.Context, <-chan contracts.Entity, ...icingadb.OnSuccess[contracts.Entity]) error + }{{"INSERT IGNORE", inserts, idb.CreateIgnoreStreamed}, {"UPSERT", upserts, idb.UpsertStreamed}} { + for _, table := range op.data { + if len(table) < 1 { + continue + } + + ch := make(chan contracts.Entity, len(table)) + for _, row := range table { + ch <- row + } + + close(ch) + + if err := op.streamer(context.Background(), ch); err != nil { + log.With("backend", "Icinga DB", "op", op.kind, "table", utils.TableName(table[0])). + Fatalf("%+v", errors.Wrap(err, "can't perform DML")) + } + } + } + + if lastIdoId != nil { + args := map[string]interface{}{"history_type": ht.name, "last_ido_id": lastIdoId} + + _, err := idb.NamedExec(upsertProgress, &IdoMigrationProgress{ + IdoMigrationProgressUpserter{lastIdoId}, envIdHex, ht.name, c.IDO.From, c.IDO.To, + }) + if err != nil { + log.With("backend", "Icinga DB", "dml", upsertProgress, "args", args). + Fatalf("%+v", errors.Wrap(err, "can't perform DML")) + } + } + + ht.bar.IncrBy(len(idoRows)) + return lastIdoId + }, + ) + + ht.bar.SetTotal(ht.bar.Current(), true) +} + +// cleanupCache removes /.sqlite3 files. +func cleanupCache(f *Flags) { + types.forEach(func(ht *historyType) { + if ht.cacheFile != "" { + if err := ht.cache.Close(); err != nil { + log.With("file", ht.cacheFile).Warnf("%+v", errors.Wrap(err, "can't close SQLite database")) + } + } + }) + + if matches, err := filepath.Glob(path.Join(f.Cache, "*.sqlite3")); err == nil { + for _, match := range matches { + if err := os.Remove(match); err != nil { + log.With("file", match).Warnf("%+v", errors.Wrap(err, "can't remove SQLite database")) + } + } + } else { + log.With("dir", f.Cache).Warnf("%+v", errors.Wrap(err, "can't list SQLite databases")) + } +} diff --git a/cmd/icingadb-migrate/misc.go b/cmd/icingadb-migrate/misc.go new file mode 100644 index 0000000..c228f3a --- /dev/null +++ b/cmd/icingadb-migrate/misc.go @@ -0,0 +1,317 @@ +package main + +import ( + "context" + "crypto/sha1" + "github.com/icinga/icingadb/pkg/contracts" + "github.com/icinga/icingadb/pkg/driver" + "github.com/icinga/icingadb/pkg/icingadb" + "github.com/icinga/icingadb/pkg/icingadb/objectpacker" + icingadbTypes "github.com/icinga/icingadb/pkg/types" + "github.com/jmoiron/sqlx" + "github.com/pkg/errors" + "github.com/vbauerster/mpb/v6" + "github.com/vbauerster/mpb/v6/decor" + "go.uber.org/zap" + "golang.org/x/sync/errgroup" + "strings" + "time" +) + +type IdoMigrationProgressUpserter struct { + LastIdoId any `json:"last_ido_id"` +} + +// Upsert implements the contracts.Upserter interface. +func (impu *IdoMigrationProgressUpserter) Upsert() interface{} { + return impu +} + +type IdoMigrationProgress struct { + IdoMigrationProgressUpserter `json:",inline"` + EnvironmentId string `json:"environment_id"` + HistoryType string `json:"history_type"` + FromTs int32 `json:"from_ts"` + ToTs int32 `json:"to_ts"` +} + +// Assert interface compliance. +var ( + _ contracts.Upserter = (*IdoMigrationProgressUpserter)(nil) + _ contracts.Upserter = (*IdoMigrationProgress)(nil) +) + +// log is the root logger. +var log = func() *zap.SugaredLogger { + logger, err := zap.NewDevelopmentConfig().Build() + if err != nil { + panic(err) + } + + return logger.Sugar() +}() + +// objectTypes maps IDO values to Icinga DB ones. +var objectTypes = map[uint8]string{1: "host", 2: "service"} + +// hashAny combines objectpacker.PackAny and SHA1 hashing. +func hashAny(in interface{}) []byte { + hash := sha1.New() + if err := objectpacker.PackAny(in, hash); err != nil { + panic(err) + } + + return hash.Sum(nil) +} + +// convertTime converts *nix timestamps from the IDO for Icinga DB. +func convertTime(ts int64, tsUs uint32) icingadbTypes.UnixMilli { + if ts == 0 && tsUs == 0 { + return icingadbTypes.UnixMilli{} + } + + return icingadbTypes.UnixMilli(time.Unix(ts, int64(tsUs)*int64(time.Microsecond/time.Nanosecond))) +} + +// calcObjectId calculates the ID of the config object named name1 for Icinga DB. +func calcObjectId(env, name1 string) []byte { + if name1 == "" { + return nil + } + + return hashAny([2]string{env, name1}) +} + +// calcServiceId calculates the ID of the service name2 of the host name1 for Icinga DB. +func calcServiceId(env, name1, name2 string) []byte { + if name2 == "" { + return nil + } + + return hashAny([2]string{env, name1 + "!" + name2}) +} + +// sliceIdoHistory performs query with args+fromid,toid,checkpoint,bulk on ht.snapshot +// and passes the results to onRows until either an empty result set or onRows() returns nil. +// Rationale: split the likely large result set of a query by adding a WHERE condition and a LIMIT, +// both with :named placeholders (:checkpoint, :bulk). +// checkpoint is the initial value for the WHERE condition, onRows() returns follow-up ones. +// (On non-recoverable errors the whole program exits.) +func sliceIdoHistory[Row any]( + ht *historyType, query string, args map[string]any, + checkpoint interface{}, onRows func([]Row) (checkpoint interface{}), +) { + if args == nil { + args = map[string]interface{}{} + } + + args["fromid"] = ht.fromId + args["toid"] = ht.toId + args["checkpoint"] = checkpoint + args["bulk"] = 20000 + + if ht.snapshot.DriverName() != driver.MySQL { + query = strings.ReplaceAll(query, " USE INDEX (PRIMARY)", "") + } + + for { + // TODO: use Tx#SelectNamed() one nice day (https://github.com/jmoiron/sqlx/issues/779) + stmt, err := ht.snapshot.PrepareNamed(query) + if err != nil { + log.With("query", query).Fatalf("%+v", errors.Wrap(err, "can't prepare query")) + } + + var rows []Row + if err := stmt.Select(&rows, args); err != nil { + log.With("query", query).Fatalf("%+v", errors.Wrap(err, "can't perform query")) + } + + _ = stmt.Close() + + if len(rows) < 1 { + break + } + + if checkpoint = onRows(rows); checkpoint == nil { + break + } + + args["checkpoint"] = checkpoint + } +} + +type progressBar struct { + *mpb.Bar + + lastUpdate time.Time +} + +// IncrBy does pb.Bar.DecoratorEwmaUpdate() automatically. +func (pb *progressBar) IncrBy(n int) { + pb.Bar.IncrBy(n) + + now := time.Now() + + if !pb.lastUpdate.IsZero() { + pb.Bar.DecoratorEwmaUpdate(now.Sub(pb.lastUpdate)) + } + + pb.lastUpdate = now +} + +// historyType specifies a history data type. +type historyType struct { + // name is a human-readable common name. + name string + // idoTable specifies the source table. + idoTable string + // idoIdColumn specifies idoTable's primary key. + idoIdColumn string + // idoStartColumns specifies idoTable's event start time locations. (First non-NULL is used.) + idoStartColumns []string + // idoEndColumns specifies idoTable's event end time locations. (First non-NULL is used.) + idoEndColumns []string + // cacheSchema specifies .sqlite3's structure. + cacheSchema string + // cacheFiller fills cache from snapshot. + cacheFiller func(*historyType) + // cacheLimitQuery rationale: see migrate(). + cacheLimitQuery string + // migrationQuery SELECTs source data for actual migration. + migrationQuery string + // migrate does the actual migration. + migrate func(c *Config, idb *icingadb.DB, envId []byte, ht *historyType) + + // cacheFile locates .sqlite3. + cacheFile string + // cache represents . + cache *sqlx.DB + // snapshot represents the data source. + snapshot *sqlx.Tx + // fromId is the first IDO row ID to migrate. + fromId uint64 + // toId is the last IDO row ID to migrate. + toId uint64 + // total summarizes the source data. + total int64 + // cacheTotal summarizes the cache source data. + cacheTotal int64 + // done summarizes the migrated data. + done int64 + // bar represents the current progress bar. + bar *progressBar + // lastId is the last already migrated ID. + lastId uint64 +} + +// setupBar (re-)initializes ht.bar. +func (ht *historyType) setupBar(progress *mpb.Progress, total int64) { + ht.bar = &progressBar{Bar: progress.AddBar( + total, + mpb.BarFillerClearOnComplete(), + mpb.PrependDecorators( + decor.Name(ht.name, decor.WC{W: len(ht.name) + 1, C: decor.DidentRight}), + decor.Percentage(decor.WC{W: 5}), + ), + mpb.AppendDecorators( + decor.EwmaETA(decor.ET_STYLE_GO, 0, decor.WC{W: 4}), + decor.Name(" "), + decor.EwmaSpeed(0, "%.0f/s", 0, decor.WC{W: 4}), + ), + )} +} + +type historyTypes []*historyType + +// forEach performs f per hts in parallel. +func (hts historyTypes) forEach(f func(*historyType)) { + eg, _ := errgroup.WithContext(context.Background()) + for _, ht := range hts { + ht := ht + eg.Go(func() error { + f(ht) + return nil + }) + } + + _ = eg.Wait() +} + +var types = historyTypes{ + { + name: "ack & comment", + idoTable: "icinga_commenthistory", + idoIdColumn: "commenthistory_id", + idoStartColumns: []string{"entry_time"}, + // Manual deletion time wins vs. time of expiration which never happens due to manual deletion. + idoEndColumns: []string{"deletion_time", "expiration_time"}, + migrationQuery: commentMigrationQuery, + migrate: func(c *Config, idb *icingadb.DB, envId []byte, ht *historyType) { + migrateOneType(c, idb, envId, ht, convertCommentRows) + }, + }, + { + name: "downtime", + idoTable: "icinga_downtimehistory", + idoIdColumn: "downtimehistory_id", + // Fall back to scheduled time if actual time is missing. + idoStartColumns: []string{"actual_start_time", "scheduled_start_time"}, + idoEndColumns: []string{"actual_end_time", "scheduled_end_time"}, + migrationQuery: downtimeMigrationQuery, + migrate: func(c *Config, idb *icingadb.DB, envId []byte, ht *historyType) { + migrateOneType(c, idb, envId, ht, convertDowntimeRows) + }, + }, + { + name: "flapping", + idoTable: "icinga_flappinghistory", + idoIdColumn: "flappinghistory_id", + idoStartColumns: []string{"event_time"}, + idoEndColumns: []string{"event_time"}, + cacheSchema: eventTimeCacheSchema, + cacheFiller: func(ht *historyType) { + buildEventTimeCache(ht, []string{ + "xh.flappinghistory_id id", "UNIX_TIMESTAMP(xh.event_time) event_time", + "xh.event_time_usec", "1001-xh.event_type event_is_start", "xh.object_id", + }) + }, + migrationQuery: flappingMigrationQuery, + migrate: func(c *Config, idb *icingadb.DB, envId []byte, ht *historyType) { + migrateOneType(c, idb, envId, ht, convertFlappingRows) + }, + }, + { + name: "notification", + idoTable: "icinga_notifications", + idoIdColumn: "notification_id", + idoStartColumns: []string{"start_time"}, + idoEndColumns: []string{"end_time"}, + cacheSchema: previousHardStateCacheSchema, + cacheFiller: func(ht *historyType) { + buildPreviousHardStateCache(ht, []string{ + "xh.notification_id id", "xh.object_id", "xh.state last_hard_state", + }) + }, + cacheLimitQuery: "SELECT MAX(history_id) FROM previous_hard_state", + migrationQuery: notificationMigrationQuery, + migrate: func(c *Config, idb *icingadb.DB, envId []byte, ht *historyType) { + migrateOneType(c, idb, envId, ht, convertNotificationRows) + }, + }, + { + name: "state", + idoTable: "icinga_statehistory", + idoIdColumn: "statehistory_id", + idoStartColumns: []string{"state_time"}, + idoEndColumns: []string{"state_time"}, + cacheSchema: previousHardStateCacheSchema, + cacheFiller: func(ht *historyType) { + buildPreviousHardStateCache(ht, []string{"xh.statehistory_id id", "xh.object_id", "xh.last_hard_state"}) + }, + cacheLimitQuery: "SELECT MAX(history_id) FROM previous_hard_state", + migrationQuery: stateMigrationQuery, + migrate: func(c *Config, idb *icingadb.DB, envId []byte, ht *historyType) { + migrateOneType(c, idb, envId, ht, convertStateRows) + }, + }, +} diff --git a/cmd/icingadb/main.go b/cmd/icingadb/main.go new file mode 100644 index 0000000..29b7c44 --- /dev/null +++ b/cmd/icingadb/main.go @@ -0,0 +1,400 @@ +package main + +import ( + "context" + "fmt" + "github.com/go-redis/redis/v8" + "github.com/icinga/icingadb/internal/command" + "github.com/icinga/icingadb/pkg/common" + "github.com/icinga/icingadb/pkg/icingadb" + "github.com/icinga/icingadb/pkg/icingadb/history" + "github.com/icinga/icingadb/pkg/icingadb/overdue" + v1 "github.com/icinga/icingadb/pkg/icingadb/v1" + "github.com/icinga/icingadb/pkg/icingaredis" + "github.com/icinga/icingadb/pkg/icingaredis/telemetry" + "github.com/icinga/icingadb/pkg/logging" + "github.com/icinga/icingadb/pkg/utils" + "github.com/okzk/sdnotify" + "github.com/pkg/errors" + "go.uber.org/zap" + "golang.org/x/sync/errgroup" + "net" + "os" + "os/signal" + "sync" + "sync/atomic" + "syscall" + "time" +) + +const ( + ExitSuccess = 0 + ExitFailure = 1 + expectedRedisSchemaVersion = "5" +) + +func main() { + os.Exit(run()) +} + +func run() int { + cmd := command.New() + logs, err := logging.NewLogging( + utils.AppName(), + cmd.Config.Logging.Level, + cmd.Config.Logging.Output, + cmd.Config.Logging.Options, + cmd.Config.Logging.Interval, + ) + if err != nil { + utils.Fatal(errors.Wrap(err, "can't configure logging")) + } + // When started by systemd, NOTIFY_SOCKET is set by systemd for Type=notify supervised services, which is the + // default setting for the Icinga DB service. So we notify that Icinga DB finished starting up. + _ = sdnotify.Ready() + + logger := logs.GetLogger() + defer logger.Sync() + + logger.Info("Starting Icinga DB") + + db, err := cmd.Database(logs.GetChildLogger("database")) + if err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "can't create database connection pool from config")) + } + defer db.Close() + { + logger.Infof("Connecting to database at '%s'", net.JoinHostPort(cmd.Config.Database.Host, fmt.Sprint(cmd.Config.Database.Port))) + err := db.Ping() + if err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "can't connect to database")) + } + } + + if err := db.CheckSchema(context.Background()); err != nil { + logger.Fatalf("%+v", err) + } + + rc, err := cmd.Redis(logs.GetChildLogger("redis")) + if err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "can't create Redis client from config")) + } + { + logger.Infof("Connecting to Redis at '%s'", net.JoinHostPort(cmd.Config.Redis.Host, fmt.Sprint(cmd.Config.Redis.Port))) + _, err := rc.Ping(context.Background()).Result() + if err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "can't connect to Redis")) + } + } + + { + pos, err := checkRedisSchema(logger, rc, "0-0") + if err != nil { + logger.Fatalf("%+v", err) + } + + go monitorRedisSchema(logger, rc, pos) + } + + ctx, cancelCtx := context.WithCancel(context.Background()) + defer cancelCtx() + + // Use dedicated connections for heartbeat and HA to ensure that heartbeats are always processed and + // the instance table is updated. Otherwise, the connections can be too busy due to the synchronization of + // configuration, status, history, etc., which can lead to handover / takeover loops because + // the heartbeat is not read while HA gets stuck when updating the instance table. + var heartbeat *icingaredis.Heartbeat + var ha *icingadb.HA + { + rc, err := cmd.Redis(logs.GetChildLogger("redis")) + if err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "can't create Redis client from config")) + } + heartbeat = icingaredis.NewHeartbeat(ctx, rc, logs.GetChildLogger("heartbeat")) + + db, err := cmd.Database(logs.GetChildLogger("database")) + if err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "can't create database connection pool from config")) + } + defer db.Close() + ha = icingadb.NewHA(ctx, db, heartbeat, logs.GetChildLogger("high-availability")) + + telemetryLogger := logs.GetChildLogger("telemetry") + telemetry.StartHeartbeat(ctx, rc, telemetryLogger, ha, heartbeat) + telemetry.WriteStats(ctx, rc, telemetryLogger) + } + // Closing ha on exit ensures that this instance retracts its heartbeat + // from the database so that another instance can take over immediately. + defer func() { + // Give up after 3s, not 5m (default) not to hang for 5m if DB is down. + ctx, cancelCtx := context.WithTimeout(context.Background(), 3*time.Second) + + ha.Close(ctx) + cancelCtx() + }() + s := icingadb.NewSync(db, rc, logs.GetChildLogger("config-sync")) + hs := history.NewSync(db, rc, logs.GetChildLogger("history-sync")) + rt := icingadb.NewRuntimeUpdates(db, rc, logs.GetChildLogger("runtime-updates")) + ods := overdue.NewSync(db, rc, logs.GetChildLogger("overdue-sync")) + ret := history.NewRetention( + db, + cmd.Config.Retention.HistoryDays, + cmd.Config.Retention.SlaDays, + cmd.Config.Retention.Interval, + cmd.Config.Retention.Count, + cmd.Config.Retention.Options, + logs.GetChildLogger("retention"), + ) + + sig := make(chan os.Signal, 1) + signal.Notify(sig, os.Interrupt, syscall.SIGTERM, syscall.SIGHUP) + + go func() { + logger.Info("Starting history sync") + + if err := hs.Sync(ctx); err != nil && !utils.IsContextCanceled(err) { + logger.Fatalf("%+v", err) + } + }() + + // Main loop + for { + hactx, cancelHactx := context.WithCancel(ctx) + for hactx.Err() == nil { + select { + case <-ha.Takeover(): + logger.Info("Taking over") + + go func() { + for hactx.Err() == nil { + synctx, cancelSynctx := context.WithCancel(ha.Environment().NewContext(hactx)) + g, synctx := errgroup.WithContext(synctx) + // WaitGroups for initial synchronization. + // Runtime updates must wait for initial synchronization to complete. + configInitSync := sync.WaitGroup{} + stateInitSync := &sync.WaitGroup{} + + // Clear the runtime update streams before starting anything else (rather than after the sync), + // otherwise updates may be lost. + runtimeConfigUpdateStreams, runtimeStateUpdateStreams, err := rt.ClearStreams(synctx) + if err != nil { + logger.Fatalf("%+v", err) + } + + dump := icingadb.NewDumpSignals(rc, logs.GetChildLogger("dump-signals")) + g.Go(func() error { + logger.Debug("Staring config dump signal handling") + + return dump.Listen(synctx) + }) + + g.Go(func() error { + select { + case <-dump.InProgress(): + logger.Info("Icinga 2 started a new config dump, waiting for it to complete") + cancelSynctx() + + return nil + case <-synctx.Done(): + return synctx.Err() + } + }) + + g.Go(func() error { + logger.Info("Starting overdue sync") + + return ods.Sync(synctx) + }) + + syncStart := time.Now() + atomic.StoreInt64(&telemetry.OngoingSyncStartMilli, syncStart.UnixMilli()) + + logger.Info("Starting config sync") + for _, factory := range v1.ConfigFactories { + factory := factory + + configInitSync.Add(1) + g.Go(func() error { + defer configInitSync.Done() + + return s.SyncAfterDump(synctx, common.NewSyncSubject(factory), dump) + }) + } + logger.Info("Starting initial state sync") + for _, factory := range v1.StateFactories { + factory := factory + + stateInitSync.Add(1) + g.Go(func() error { + defer stateInitSync.Done() + + return s.SyncAfterDump(synctx, common.NewSyncSubject(factory), dump) + }) + } + + configInitSync.Add(1) + g.Go(func() error { + defer configInitSync.Done() + + select { + case <-dump.Done("icinga:customvar"): + case <-synctx.Done(): + return synctx.Err() + } + + return s.SyncCustomvars(synctx) + }) + + g.Go(func() error { + configInitSync.Wait() + atomic.StoreInt64(&telemetry.OngoingSyncStartMilli, 0) + + syncEnd := time.Now() + elapsed := syncEnd.Sub(syncStart) + logger := logs.GetChildLogger("config-sync") + + if synctx.Err() == nil { + telemetry.LastSuccessfulSync.Store(telemetry.SuccessfulSync{ + FinishMilli: syncEnd.UnixMilli(), + DurationMilli: elapsed.Milliseconds(), + }) + + logger.Infof("Finished config sync in %s", elapsed) + } else { + logger.Warnf("Aborted config sync after %s", elapsed) + } + + return nil + }) + + g.Go(func() error { + stateInitSync.Wait() + + elapsed := time.Since(syncStart) + logger := logs.GetChildLogger("config-sync") + if synctx.Err() == nil { + logger.Infof("Finished initial state sync in %s", elapsed) + } else { + logger.Warnf("Aborted initial state sync after %s", elapsed) + } + + return nil + }) + + g.Go(func() error { + configInitSync.Wait() + + if err := synctx.Err(); err != nil { + return err + } + + logger.Info("Starting config runtime updates sync") + + return rt.Sync(synctx, v1.ConfigFactories, runtimeConfigUpdateStreams, false) + }) + + g.Go(func() error { + stateInitSync.Wait() + + if err := synctx.Err(); err != nil { + return err + } + + logger.Info("Starting state runtime updates sync") + + return rt.Sync(synctx, v1.StateFactories, runtimeStateUpdateStreams, true) + }) + + g.Go(func() error { + // Wait for config and state sync to avoid putting additional pressure on the database. + configInitSync.Wait() + stateInitSync.Wait() + + if err := synctx.Err(); err != nil { + return err + } + + logger.Info("Starting history retention") + + return ret.Start(synctx) + }) + + if err := g.Wait(); err != nil && !utils.IsContextCanceled(err) { + logger.Fatalf("%+v", err) + } + } + }() + case <-ha.Handover(): + logger.Warn("Handing over") + + cancelHactx() + case <-hactx.Done(): + // Nothing to do here, surrounding loop will terminate now. + case <-ha.Done(): + if err := ha.Err(); err != nil { + logger.Fatalf("%+v", errors.Wrap(err, "HA exited with an error")) + } else if ctx.Err() == nil { + // ha is created as a single instance once. It should only exit if the main context is cancelled, + // otherwise there is no way to get Icinga DB back into a working state. + logger.Fatalf("%+v", errors.New("HA exited without an error but main context isn't cancelled")) + } + cancelHactx() + + return ExitFailure + case <-ctx.Done(): + logger.Fatalf("%+v", errors.New("main context closed unexpectedly")) + case s := <-sig: + logger.Infow("Exiting due to signal", zap.String("signal", s.String())) + cancelHactx() + + return ExitSuccess + } + } + + cancelHactx() + } +} + +// monitorRedisSchema monitors rc's icinga:schema version validity. +func monitorRedisSchema(logger *logging.Logger, rc *icingaredis.Client, pos string) { + for { + var err error + pos, err = checkRedisSchema(logger, rc, pos) + + if err != nil { + logger.Fatalf("%+v", err) + } + } +} + +// checkRedisSchema verifies rc's icinga:schema version. +func checkRedisSchema(logger *logging.Logger, rc *icingaredis.Client, pos string) (newPos string, err error) { + if pos == "0-0" { + defer time.AfterFunc(3*time.Second, func() { + logger.Info("Waiting for Icinga 2 to write into Redis, please make sure you have started Icinga 2 and the Icinga DB feature is enabled") + }).Stop() + } else { + logger.Debug("Checking Icinga 2 and Icinga DB compatibility") + } + + streams, err := rc.XReadUntilResult(context.Background(), &redis.XReadArgs{ + Streams: []string{"icinga:schema", pos}, + }) + if err != nil { + return "", errors.Wrap(err, "can't read Redis schema version") + } + + message := streams[0].Messages[0] + if version := message.Values["version"]; version != expectedRedisSchemaVersion { + // Since these error messages are trivial and mostly caused by users, we don't need + // to print a stack trace here. However, since errors.Errorf() does this automatically, + // we need to use fmt instead. + return "", fmt.Errorf( + "unexpected Redis schema version: %q (expected %q), please make sure you are running compatible"+ + " versions of Icinga 2 and Icinga DB", version, expectedRedisSchemaVersion, + ) + } + + logger.Debug("Redis schema version is correct") + return message.ID, nil +} diff --git a/config.example.yml b/config.example.yml new file mode 100644 index 0000000..61d3933 --- /dev/null +++ b/config.example.yml @@ -0,0 +1,91 @@ +# This is the configuration file for Icinga DB. + +# Connection configuration for the database to which Icinga DB synchronizes monitoring data. +# This is also the database used in Icinga DB Web to view and work with the data. +# In high availability setups, all Icinga DB instances must write to the same database. +database: + # Database type. Either 'mysql' for MySQL or 'pgsql' for PostgreSQL. + # Defaults to 'mysql'. +# type: mysql + + # Database host or absolute Unix socket path. + host: localhost + + # Database port. By default, the MySQL or PostgreSQL port, depending on the database type. +# port: + + # Database name. + database: icingadb + + # Database user. + user: icingadb + + # Database password. + password: CHANGEME + +# Connection configuration for the Redis server where Icinga 2 writes its configuration, state and history items. +# This is the same connection as configured in the 'icingadb' feature of the corresponding Icinga 2 node. +# High availability setups require a dedicated Redis server per Icinga 2 node and +# therefore a dedicated Icinga DB instance that connects to it. +redis: + # Redis host or absolute Unix socket path. + host: localhost + + # Redis port. + # Defaults to '6380' since the Redis server provided by the 'icingadb-redis' package listens on that port. +# port: 6380 + + # Redis password. +# password: + +# Icinga DB logs its activities at various severity levels and any errors that occur either +# on the console or in systemd's journal. The latter is used automatically when running under systemd. +# In any case, the default log level is 'info'. +logging: + # Default logging level. Can be set to 'fatal', 'error', 'warn', 'info' or 'debug'. + # If not set, defaults to 'info'. +# level: info + + # Logging output. Can be set to 'console' (stderr) or 'systemd-journald'. + # If not set, logs to systemd-journald when running under systemd, otherwise stderr. +# output: + + # Interval for periodic logging defined as duration string. + # A duration string is a sequence of decimal numbers and a unit suffix, such as "20s". + # Valid units are "ms", "s", "m", "h". + # Defaults to "20s". +# interval: 20s + + # Map of component-logging level pairs to define a different log level than the default value for each component. + options: +# config-sync: +# database: +# dump-signals: +# heartbeat: +# high-availability: +# history-sync: +# overdue-sync: +# redis: +# retention: +# runtime-updates: +# telemetry: + +# Retention is an optional feature to limit the number of days that historical data is available, +# as no historical data is deleted by default. +retention: + # Number of days to retain full historical data. By default, historical data is retained forever. +# history-days: + + # Number of days to retain historical data for SLA reporting. By default, it is retained forever. +# sla-days: + + # Map of history category to number of days to retain its data in order to + # enable retention only for specific categories or to + # override the number that has been configured in history-days. + options: +# acknowledgement: +# comment: +# downtime: +# flapping: +# notification: +# state: diff --git a/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/list b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/list new file mode 100644 index 0000000..79127d8 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/list @@ -0,0 +1 @@ +v1.2.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.info b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.info new file mode 100644 index 0000000..95e3b21 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.info @@ -0,0 +1 @@ +{"Version":"v1.2.0","Time":"2021-04-26T20:50:39Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.lock b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.mod b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.mod new file mode 100644 index 0000000..e481e3d --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.mod @@ -0,0 +1,3 @@ +module github.com/VividCortex/ewma + +go 1.12 diff --git a/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.zip b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.zip new file mode 100644 index 0000000..74ca894 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.ziphash b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.ziphash new file mode 100644 index 0000000..3d93020 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/!vivid!cortex/ewma/@v/v1.2.0.ziphash @@ -0,0 +1 @@ +h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/list b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/list new file mode 100644 index 0000000..0d60943 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/list @@ -0,0 +1 @@ +v0.0.0-20180116102854-5a71ef0e047d diff --git a/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.info b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.info new file mode 100644 index 0000000..c5a9fe2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.info @@ -0,0 +1 @@ +{"Version":"v0.0.0-20180116102854-5a71ef0e047d","Time":"2018-01-16T10:28:54Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.lock b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.mod b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.mod new file mode 100644 index 0000000..506da78 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.mod @@ -0,0 +1 @@ +module github.com/acarl005/stripansi diff --git a/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.zip b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.zip new file mode 100644 index 0000000..85f8006 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.ziphash b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.ziphash new file mode 100644 index 0000000..56fb476 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/acarl005/stripansi/@v/v0.0.0-20180116102854-5a71ef0e047d.ziphash @@ -0,0 +1 @@ +h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/benbjohnson/clock/@v/list b/dependencies/pkg/mod/cache/download/github.com/benbjohnson/clock/@v/list new file mode 100644 index 0000000..795460f --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/benbjohnson/clock/@v/list @@ -0,0 +1 @@ +v1.1.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/benbjohnson/clock/@v/v1.1.0.mod b/dependencies/pkg/mod/cache/download/github.com/benbjohnson/clock/@v/v1.1.0.mod new file mode 100644 index 0000000..758903a --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/benbjohnson/clock/@v/v1.1.0.mod @@ -0,0 +1,3 @@ +module github.com/benbjohnson/clock + +go 1.15 diff --git a/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/list b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/list new file mode 100644 index 0000000..5969682 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/list @@ -0,0 +1 @@ +v2.1.2 diff --git a/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.info b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.info new file mode 100644 index 0000000..fdc7be7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.info @@ -0,0 +1 @@ +{"Version":"v2.1.2","Time":"2021-08-24T09:58:46Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.lock b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.mod b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.mod new file mode 100644 index 0000000..49f6760 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.mod @@ -0,0 +1,3 @@ +module github.com/cespare/xxhash/v2 + +go 1.11 diff --git a/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.zip b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.zip new file mode 100644 index 0000000..abc5f21 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.ziphash b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.ziphash new file mode 100644 index 0000000..21a12fd --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/cespare/xxhash/v2/@v/v2.1.2.ziphash @@ -0,0 +1 @@ +h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/list b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/list new file mode 100644 index 0000000..b7c0a9b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/list @@ -0,0 +1 @@ +v1.6.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.info b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.info new file mode 100644 index 0000000..8da27aa --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.info @@ -0,0 +1 @@ +{"Version":"v1.6.0","Time":"2022-04-11T07:51:49Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.lock b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.mod b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.mod new file mode 100644 index 0000000..2b71726 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.mod @@ -0,0 +1,3 @@ +module github.com/creasty/defaults + +go 1.14 diff --git a/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.zip b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.zip new file mode 100644 index 0000000..ec7666d Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.ziphash b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.ziphash new file mode 100644 index 0000000..ff0f29b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/creasty/defaults/@v/v1.6.0.ziphash @@ -0,0 +1 @@ +h1:ltuE9cfphUtlrBeomuu8PEyISTXnxqkBIoQfXgv7BSc= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/list b/dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/list new file mode 100644 index 0000000..1af0c48 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/list @@ -0,0 +1,2 @@ +v1.1.0 +v1.1.1 diff --git a/dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.0.mod b/dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.0.mod new file mode 100644 index 0000000..5e4b0f5 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.0.mod @@ -0,0 +1 @@ +module github.com/davecgh/go-spew diff --git a/dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.1.mod b/dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.1.mod new file mode 100644 index 0000000..5e4b0f5 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.1.mod @@ -0,0 +1 @@ +module github.com/davecgh/go-spew diff --git a/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/list b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/list new file mode 100644 index 0000000..beb1058 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/list @@ -0,0 +1 @@ +v0.0.0-20200823014737-9f7001d12a5f diff --git a/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.info b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.info new file mode 100644 index 0000000..d4bbc64 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.info @@ -0,0 +1 @@ +{"Version":"v0.0.0-20200823014737-9f7001d12a5f","Time":"2020-08-23T01:47:37Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.lock b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.mod b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.mod new file mode 100644 index 0000000..9bf7bb2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.mod @@ -0,0 +1 @@ +module github.com/dgryski/go-rendezvous diff --git a/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.zip b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.zip new file mode 100644 index 0000000..243eb0e Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.ziphash b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.ziphash new file mode 100644 index 0000000..96e3a92 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/dgryski/go-rendezvous/@v/v0.0.0-20200823014737-9f7001d12a5f.ziphash @@ -0,0 +1 @@ +h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/list b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/list new file mode 100644 index 0000000..1324be2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/list @@ -0,0 +1,2 @@ +v1.10.0 +v1.13.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.10.0.mod b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.10.0.mod new file mode 100644 index 0000000..7887281 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.10.0.mod @@ -0,0 +1,8 @@ +module github.com/fatih/color + +go 1.13 + +require ( + github.com/mattn/go-colorable v0.1.8 + github.com/mattn/go-isatty v0.0.12 +) diff --git a/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.info b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.info new file mode 100644 index 0000000..5a88578 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.info @@ -0,0 +1 @@ +{"Version":"v1.13.0","Time":"2021-09-21T18:52:55Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.lock b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.mod b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.mod new file mode 100644 index 0000000..c9b3cd5 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.mod @@ -0,0 +1,8 @@ +module github.com/fatih/color + +go 1.13 + +require ( + github.com/mattn/go-colorable v0.1.9 + github.com/mattn/go-isatty v0.0.14 +) diff --git a/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.zip b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.zip new file mode 100644 index 0000000..def7906 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.ziphash b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.ziphash new file mode 100644 index 0000000..55f6b4e --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/fatih/color/@v/v1.13.0.ziphash @@ -0,0 +1 @@ +h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/go-playground/assert/v2/@v/list b/dependencies/pkg/mod/cache/download/github.com/go-playground/assert/v2/@v/list new file mode 100644 index 0000000..0ac852d --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-playground/assert/v2/@v/list @@ -0,0 +1 @@ +v2.0.1 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-playground/assert/v2/@v/v2.0.1.mod b/dependencies/pkg/mod/cache/download/github.com/go-playground/assert/v2/@v/v2.0.1.mod new file mode 100644 index 0000000..52d4090 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-playground/assert/v2/@v/v2.0.1.mod @@ -0,0 +1,3 @@ +module github.com/go-playground/assert/v2 + +go 1.13 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-playground/locales/@v/list b/dependencies/pkg/mod/cache/download/github.com/go-playground/locales/@v/list new file mode 100644 index 0000000..6345c21 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-playground/locales/@v/list @@ -0,0 +1 @@ +v0.13.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-playground/locales/@v/v0.13.0.mod b/dependencies/pkg/mod/cache/download/github.com/go-playground/locales/@v/v0.13.0.mod new file mode 100644 index 0000000..34ab6f2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-playground/locales/@v/v0.13.0.mod @@ -0,0 +1,5 @@ +module github.com/go-playground/locales + +go 1.13 + +require golang.org/x/text v0.3.2 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-playground/universal-translator/@v/list b/dependencies/pkg/mod/cache/download/github.com/go-playground/universal-translator/@v/list new file mode 100644 index 0000000..6b60281 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-playground/universal-translator/@v/list @@ -0,0 +1 @@ +v0.17.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-playground/universal-translator/@v/v0.17.0.mod b/dependencies/pkg/mod/cache/download/github.com/go-playground/universal-translator/@v/v0.17.0.mod new file mode 100644 index 0000000..8079590 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-playground/universal-translator/@v/v0.17.0.mod @@ -0,0 +1,5 @@ +module github.com/go-playground/universal-translator + +go 1.13 + +require github.com/go-playground/locales v0.13.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-playground/validator/v10/@v/list b/dependencies/pkg/mod/cache/download/github.com/go-playground/validator/v10/@v/list new file mode 100644 index 0000000..23e3a0f --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-playground/validator/v10/@v/list @@ -0,0 +1 @@ +v10.4.1 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-playground/validator/v10/@v/v10.4.1.mod b/dependencies/pkg/mod/cache/download/github.com/go-playground/validator/v10/@v/v10.4.1.mod new file mode 100644 index 0000000..d457100 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-playground/validator/v10/@v/v10.4.1.mod @@ -0,0 +1,11 @@ +module github.com/go-playground/validator/v10 + +go 1.13 + +require ( + github.com/go-playground/assert/v2 v2.0.1 + github.com/go-playground/locales v0.13.0 + github.com/go-playground/universal-translator v0.17.0 + github.com/leodido/go-urn v1.2.0 + golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 +) diff --git a/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/list b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/list new file mode 100644 index 0000000..dbb87b9 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/list @@ -0,0 +1 @@ +v8.11.5 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.info b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.info new file mode 100644 index 0000000..38f5c02 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.info @@ -0,0 +1 @@ +{"Version":"v8.11.5","Time":"2022-03-17T13:27:49Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.lock b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.mod b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.mod new file mode 100644 index 0000000..d2610c2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.mod @@ -0,0 +1,20 @@ +module github.com/go-redis/redis/v8 + +go 1.17 + +require ( + github.com/cespare/xxhash/v2 v2.1.2 + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f + github.com/onsi/ginkgo v1.16.5 + github.com/onsi/gomega v1.18.1 +) + +require ( + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/nxadm/tail v1.4.8 // indirect + golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect + golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/text v0.3.6 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +) diff --git a/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.zip b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.zip new file mode 100644 index 0000000..ac79681 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.ziphash b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.ziphash new file mode 100644 index 0000000..17c3a46 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-redis/redis/v8/@v/v8.11.5.ziphash @@ -0,0 +1 @@ +h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/list b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/list new file mode 100644 index 0000000..b7c0a9b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/list @@ -0,0 +1 @@ +v1.6.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.info b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.info new file mode 100644 index 0000000..6f0ef86 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.info @@ -0,0 +1 @@ +{"Version":"v1.6.0","Time":"2021-04-01T01:56:49Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.lock b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.mod b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.mod new file mode 100644 index 0000000..fffbf6a --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.mod @@ -0,0 +1,3 @@ +module github.com/go-sql-driver/mysql + +go 1.10 diff --git a/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.zip b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.zip new file mode 100644 index 0000000..b5d195e Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.ziphash b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.ziphash new file mode 100644 index 0000000..4bfcd0a --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/go-sql-driver/mysql/@v/v1.6.0.ziphash @@ -0,0 +1 @@ +h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/list b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/list new file mode 100644 index 0000000..bf1809a --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/list @@ -0,0 +1 @@ +v1.9.6 diff --git a/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.info b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.info new file mode 100644 index 0000000..e9dbf68 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.info @@ -0,0 +1 @@ +{"Version":"v1.9.6","Time":"2022-10-26T09:00:25Z","Origin":{"VCS":"git","URL":"https://github.com/goccy/go-yaml","Ref":"refs/tags/v1.9.6","Hash":"33858b492fae41aee3da611c0c94f67e6fd29d59"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.lock b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.mod b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.mod new file mode 100644 index 0000000..3356ece --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.mod @@ -0,0 +1,11 @@ +module github.com/goccy/go-yaml + +go 1.12 + +require ( + github.com/fatih/color v1.10.0 + github.com/go-playground/validator/v10 v10.4.1 + github.com/mattn/go-colorable v0.1.8 + golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 +) diff --git a/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.zip b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.zip new file mode 100644 index 0000000..4911c90 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.ziphash b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.ziphash new file mode 100644 index 0000000..430cde7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/goccy/go-yaml/@v/v1.9.6.ziphash @@ -0,0 +1 @@ +h1:KhAu1zf9JXnm3vbG49aDE0E5uEBUsM4uwD31/58ZWyI= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/list b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/list new file mode 100644 index 0000000..18fa8e7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/list @@ -0,0 +1 @@ +v1.3.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.info b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.info new file mode 100644 index 0000000..abbd344 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.info @@ -0,0 +1 @@ +{"Version":"v1.3.0","Time":"2021-07-12T22:33:52Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.lock b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.mod b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.mod new file mode 100644 index 0000000..fc84cd7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.mod @@ -0,0 +1 @@ +module github.com/google/uuid diff --git a/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.zip b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.zip new file mode 100644 index 0000000..63e6022 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.ziphash b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.ziphash new file mode 100644 index 0000000..dc67306 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/google/uuid/@v/v1.3.0.ziphash @@ -0,0 +1 @@ +h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/list b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/list new file mode 100644 index 0000000..2e7bd91 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/list @@ -0,0 +1 @@ +v1.5.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.info b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.info new file mode 100644 index 0000000..73552f9 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.info @@ -0,0 +1 @@ +{"Version":"v1.5.0","Time":"2021-03-21T10:32:44Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.lock b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.mod b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.mod new file mode 100644 index 0000000..a626c5d --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.mod @@ -0,0 +1,5 @@ +module github.com/jessevdk/go-flags + +go 1.15 + +require golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 diff --git a/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.zip b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.zip new file mode 100644 index 0000000..1100c63 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.ziphash b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.ziphash new file mode 100644 index 0000000..fbb8cc6 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/jessevdk/go-flags/@v/v1.5.0.ziphash @@ -0,0 +1 @@ +h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/list b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/list new file mode 100644 index 0000000..3252f64 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/list @@ -0,0 +1 @@ +v1.3.5 diff --git a/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.info b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.info new file mode 100644 index 0000000..69d514c --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.info @@ -0,0 +1 @@ +{"Version":"v1.3.5","Time":"2022-04-16T13:03:07Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.lock b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.mod b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.mod new file mode 100644 index 0000000..8d5aeba --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.mod @@ -0,0 +1,9 @@ +module github.com/jmoiron/sqlx + +go 1.10 + +require ( + github.com/go-sql-driver/mysql v1.6.0 + github.com/lib/pq v1.2.0 + github.com/mattn/go-sqlite3 v1.14.6 +) diff --git a/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.zip b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.zip new file mode 100644 index 0000000..52cffee Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.ziphash b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.ziphash new file mode 100644 index 0000000..c04c5b5 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/jmoiron/sqlx/@v/v1.3.5.ziphash @@ -0,0 +1 @@ +h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/leodido/go-urn/@v/list b/dependencies/pkg/mod/cache/download/github.com/leodido/go-urn/@v/list new file mode 100644 index 0000000..79127d8 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/leodido/go-urn/@v/list @@ -0,0 +1 @@ +v1.2.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/leodido/go-urn/@v/v1.2.0.mod b/dependencies/pkg/mod/cache/download/github.com/leodido/go-urn/@v/v1.2.0.mod new file mode 100644 index 0000000..65bc1ca --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/leodido/go-urn/@v/v1.2.0.mod @@ -0,0 +1,5 @@ +module github.com/leodido/go-urn + +go 1.13 + +require github.com/stretchr/testify v1.4.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/list b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/list new file mode 100644 index 0000000..0d145e1 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/list @@ -0,0 +1,2 @@ +v1.2.0 +v1.10.7 diff --git a/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.info b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.info new file mode 100644 index 0000000..5c188ec --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.info @@ -0,0 +1 @@ +{"Version":"v1.10.7","Time":"2022-09-06T21:25:00Z","Origin":{"VCS":"git","URL":"https://github.com/lib/pq","Ref":"refs/tags/v1.10.7","Hash":"d5affd5073b06f745459768de35356df2e5fd91d"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.lock b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.mod b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.mod new file mode 100644 index 0000000..b5a5639 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.mod @@ -0,0 +1,3 @@ +module github.com/lib/pq + +go 1.13 diff --git a/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.zip b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.zip new file mode 100644 index 0000000..5702c5a Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.ziphash b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.ziphash new file mode 100644 index 0000000..f8da789 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.10.7.ziphash @@ -0,0 +1 @@ +h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.2.0.mod b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.2.0.mod new file mode 100644 index 0000000..edf0b34 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/lib/pq/@v/v1.2.0.mod @@ -0,0 +1 @@ +module github.com/lib/pq diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/list b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/list new file mode 100644 index 0000000..2ba464e --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/list @@ -0,0 +1,3 @@ +v0.1.8 +v0.1.9 +v0.1.13 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.info b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.info new file mode 100644 index 0000000..0b9e9e9 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.info @@ -0,0 +1 @@ +{"Version":"v0.1.13","Time":"2022-08-15T05:53:26Z","Origin":{"VCS":"git","URL":"https://github.com/mattn/go-colorable","Ref":"refs/tags/v0.1.13","Hash":"11a925cff3d38c293ddc8c05a16b504e3e2c63be"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.lock b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.mod b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.mod new file mode 100644 index 0000000..914c6b0 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.mod @@ -0,0 +1,5 @@ +module github.com/mattn/go-colorable + +require github.com/mattn/go-isatty v0.0.16 + +go 1.15 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.zip b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.zip new file mode 100644 index 0000000..4dcc5b3 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.ziphash b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.ziphash new file mode 100644 index 0000000..21355ef --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.13.ziphash @@ -0,0 +1 @@ +h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.8.mod b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.8.mod new file mode 100644 index 0000000..1e590b8 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.8.mod @@ -0,0 +1,8 @@ +module github.com/mattn/go-colorable + +require ( + github.com/mattn/go-isatty v0.0.12 + golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect +) + +go 1.13 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.9.mod b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.9.mod new file mode 100644 index 0000000..1e590b8 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-colorable/@v/v0.1.9.mod @@ -0,0 +1,8 @@ +module github.com/mattn/go-colorable + +require ( + github.com/mattn/go-isatty v0.0.12 + golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect +) + +go 1.13 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/list b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/list new file mode 100644 index 0000000..14699c6 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/list @@ -0,0 +1,3 @@ +v0.0.12 +v0.0.14 +v0.0.16 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.12.mod b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.12.mod new file mode 100644 index 0000000..605c4c2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.12.mod @@ -0,0 +1,5 @@ +module github.com/mattn/go-isatty + +go 1.12 + +require golang.org/x/sys v0.0.0-20200116001909-b77594299b42 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.14.mod b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.14.mod new file mode 100644 index 0000000..c9a20b7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.14.mod @@ -0,0 +1,5 @@ +module github.com/mattn/go-isatty + +go 1.12 + +require golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.info b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.info new file mode 100644 index 0000000..929730f --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.info @@ -0,0 +1 @@ +{"Version":"v0.0.16","Time":"2022-08-15T05:52:20Z","Origin":{"VCS":"git","URL":"https://github.com/mattn/go-isatty","Ref":"refs/tags/v0.0.16","Hash":"13e91bf4058fb93d5629deb7b2e3763ec8f4fdf8"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.lock b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.mod b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.mod new file mode 100644 index 0000000..db887a6 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.mod @@ -0,0 +1,5 @@ +module github.com/mattn/go-isatty + +go 1.15 + +require golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.zip b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.zip new file mode 100644 index 0000000..96c0ce0 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.ziphash b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.ziphash new file mode 100644 index 0000000..cdb0884 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-isatty/@v/v0.0.16.ziphash @@ -0,0 +1 @@ +h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/list b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/list new file mode 100644 index 0000000..067cb8c --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/list @@ -0,0 +1,2 @@ +v0.0.12 +v0.0.14 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.lock b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.mod b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.mod new file mode 100644 index 0000000..8a9d524 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.mod @@ -0,0 +1,5 @@ +module github.com/mattn/go-runewidth + +go 1.9 + +require github.com/rivo/uniseg v0.1.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.zip b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.zip new file mode 100644 index 0000000..db6b107 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.ziphash b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.ziphash new file mode 100644 index 0000000..f6316de --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.12.ziphash @@ -0,0 +1 @@ +h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.14.info b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.14.info new file mode 100644 index 0000000..572fb1f --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.14.info @@ -0,0 +1 @@ +{"Version":"v0.0.14","Time":"2022-09-20T12:35:16Z","Origin":{"VCS":"git","URL":"https://github.com/mattn/go-runewidth","Ref":"refs/tags/v0.0.14","Hash":"2c6a438f68cfe01255a90824599da41fdf76d1e2"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.14.mod b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.14.mod new file mode 100644 index 0000000..62dba1b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-runewidth/@v/v0.0.14.mod @@ -0,0 +1,5 @@ +module github.com/mattn/go-runewidth + +go 1.9 + +require github.com/rivo/uniseg v0.2.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/list b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/list new file mode 100644 index 0000000..662d06b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/list @@ -0,0 +1,2 @@ +v1.14.6 +v1.14.16 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.info b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.info new file mode 100644 index 0000000..1e0d532 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.info @@ -0,0 +1 @@ +{"Version":"v1.14.16","Time":"2022-10-26T13:03:24Z","Origin":{"VCS":"git","URL":"https://github.com/mattn/go-sqlite3","Ref":"refs/tags/v1.14.16","Hash":"bce3773726b3f7ef4609661a0f0f4fb00a0df761"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.lock b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.mod b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.mod new file mode 100644 index 0000000..89788ab --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.mod @@ -0,0 +1,7 @@ +module github.com/mattn/go-sqlite3 + +go 1.16 + +retract ( + [v2.0.0+incompatible, v2.0.6+incompatible] // Accidental; no major changes or features. +) diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.zip b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.zip new file mode 100644 index 0000000..06031d9 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.ziphash b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.ziphash new file mode 100644 index 0000000..53a4bf0 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.16.ziphash @@ -0,0 +1 @@ +h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.6.mod b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.6.mod new file mode 100644 index 0000000..3d0854a --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/mattn/go-sqlite3/@v/v1.14.6.mod @@ -0,0 +1,3 @@ +module github.com/mattn/go-sqlite3 + +go 1.12 diff --git a/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/list b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/list new file mode 100644 index 0000000..5248d10 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/list @@ -0,0 +1 @@ +v0.0.0-20180710141335-d9becc38acbd diff --git a/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.info b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.info new file mode 100644 index 0000000..0947f28 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.info @@ -0,0 +1 @@ +{"Version":"v0.0.0-20180710141335-d9becc38acbd","Time":"2018-07-10T14:13:35Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.lock b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.mod b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.mod new file mode 100644 index 0000000..bbc18b1 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.mod @@ -0,0 +1 @@ +module github.com/okzk/sdnotify diff --git a/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.zip b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.zip new file mode 100644 index 0000000..36fe375 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.ziphash b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.ziphash new file mode 100644 index 0000000..86f1d5b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/okzk/sdnotify/@v/v0.0.0-20180710141335-d9becc38acbd.ziphash @@ -0,0 +1 @@ +h1:+iAPaTbi1gZpcpDwe/BW1fx7Xoesv69hLNGPheoyhBs= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/list b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/list new file mode 100644 index 0000000..1165db2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/list @@ -0,0 +1,2 @@ +v0.8.1 +v0.9.1 diff --git a/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.8.1.mod b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.8.1.mod new file mode 100644 index 0000000..a52fd84 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.8.1.mod @@ -0,0 +1 @@ +module github.com/pkg/errors diff --git a/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.info b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.info new file mode 100644 index 0000000..8872ca7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.info @@ -0,0 +1 @@ +{"Version":"v0.9.1","Time":"2020-01-14T19:47:44Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.lock b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.mod b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.mod new file mode 100644 index 0000000..a52fd84 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.mod @@ -0,0 +1 @@ +module github.com/pkg/errors diff --git a/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.zip b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.zip new file mode 100644 index 0000000..685dd91 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.ziphash b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.ziphash new file mode 100644 index 0000000..a1965b4 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/pkg/errors/@v/v0.9.1.ziphash @@ -0,0 +1 @@ +h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/pmezard/go-difflib/@v/list b/dependencies/pkg/mod/cache/download/github.com/pmezard/go-difflib/@v/list new file mode 100644 index 0000000..0ec25f7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/pmezard/go-difflib/@v/list @@ -0,0 +1 @@ +v1.0.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/pmezard/go-difflib/@v/v1.0.0.mod b/dependencies/pkg/mod/cache/download/github.com/pmezard/go-difflib/@v/v1.0.0.mod new file mode 100644 index 0000000..a03051f --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/pmezard/go-difflib/@v/v1.0.0.mod @@ -0,0 +1 @@ +module github.com/pmezard/go-difflib diff --git a/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/list b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/list new file mode 100644 index 0000000..d1e27c4 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/list @@ -0,0 +1,3 @@ +v0.1.0 +v0.2.0 +v0.4.2 diff --git a/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.1.0.mod b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.1.0.mod new file mode 100644 index 0000000..a54280b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.1.0.mod @@ -0,0 +1,3 @@ +module github.com/rivo/uniseg + +go 1.12 diff --git a/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.lock b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.mod b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.mod new file mode 100644 index 0000000..a54280b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.mod @@ -0,0 +1,3 @@ +module github.com/rivo/uniseg + +go 1.12 diff --git a/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.zip b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.zip new file mode 100644 index 0000000..5e0190f Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.ziphash b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.ziphash new file mode 100644 index 0000000..076e6b5 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.2.0.ziphash @@ -0,0 +1 @@ +h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.4.2.info b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.4.2.info new file mode 100644 index 0000000..cde4e6b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.4.2.info @@ -0,0 +1 @@ +{"Version":"v0.4.2","Time":"2022-09-10T22:28:47Z","Origin":{"VCS":"git","URL":"https://github.com/rivo/uniseg","Ref":"refs/tags/v0.4.2","Hash":"1a52aa66ecd9c3c5199c46ccfd81d25b711414f8"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.4.2.mod b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.4.2.mod new file mode 100644 index 0000000..b2dc25c --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/rivo/uniseg/@v/v0.4.2.mod @@ -0,0 +1,3 @@ +module github.com/rivo/uniseg + +go 1.18 diff --git a/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/list b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/list new file mode 100644 index 0000000..0ec25f7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/list @@ -0,0 +1 @@ +v1.0.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.info b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.info new file mode 100644 index 0000000..b873af5 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.info @@ -0,0 +1 @@ +{"Version":"v1.0.0","Time":"2018-12-25T08:09:08Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.lock b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.mod b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.mod new file mode 100644 index 0000000..fa1d296 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.mod @@ -0,0 +1 @@ +module github.com/ssgreg/journald diff --git a/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.zip b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.zip new file mode 100644 index 0000000..6437e28 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.ziphash b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.ziphash new file mode 100644 index 0000000..9aa18ea --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/ssgreg/journald/@v/v1.0.0.ziphash @@ -0,0 +1 @@ +h1:0YmTDPJXxcWDPba12qNMdO6TxvfkFSYpFIJ31CwmLcU= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/list b/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/list new file mode 100644 index 0000000..008f082 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/list @@ -0,0 +1,3 @@ +v0.1.0 +v0.4.0 +v0.5.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.1.0.mod b/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.1.0.mod new file mode 100644 index 0000000..cbaa421 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.1.0.mod @@ -0,0 +1 @@ +module github.com/stretchr/objx diff --git a/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.4.0.mod b/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.4.0.mod new file mode 100644 index 0000000..45a55d2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.4.0.mod @@ -0,0 +1,8 @@ +module github.com/stretchr/objx + +go 1.12 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/stretchr/testify v1.7.1 +) diff --git a/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.5.0.mod b/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.5.0.mod new file mode 100644 index 0000000..eeb2cb3 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.5.0.mod @@ -0,0 +1,5 @@ +module github.com/stretchr/objx + +go 1.12 + +require github.com/stretchr/testify v1.8.0 diff --git a/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/list b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/list new file mode 100644 index 0000000..20c931a --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/list @@ -0,0 +1,5 @@ +v1.3.0 +v1.4.0 +v1.7.1 +v1.8.0 +v1.8.1 diff --git a/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.3.0.mod b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.3.0.mod new file mode 100644 index 0000000..90e5dbe --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.3.0.mod @@ -0,0 +1,7 @@ +module github.com/stretchr/testify + +require ( + github.com/davecgh/go-spew v1.1.0 + github.com/pmezard/go-difflib v1.0.0 + github.com/stretchr/objx v0.1.0 +) diff --git a/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.4.0.mod b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.4.0.mod new file mode 100644 index 0000000..5053648 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.4.0.mod @@ -0,0 +1,8 @@ +module github.com/stretchr/testify + +require ( + github.com/davecgh/go-spew v1.1.0 + github.com/pmezard/go-difflib v1.0.0 + github.com/stretchr/objx v0.1.0 + gopkg.in/yaml.v2 v2.2.2 +) diff --git a/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.7.1.mod b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.7.1.mod new file mode 100644 index 0000000..ed0b50b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.7.1.mod @@ -0,0 +1,10 @@ +module github.com/stretchr/testify + +go 1.13 + +require ( + github.com/davecgh/go-spew v1.1.0 + github.com/pmezard/go-difflib v1.0.0 + github.com/stretchr/objx v0.1.0 + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c +) diff --git a/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.8.0.mod b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.8.0.mod new file mode 100644 index 0000000..c5d3e88 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.8.0.mod @@ -0,0 +1,10 @@ +module github.com/stretchr/testify + +go 1.13 + +require ( + github.com/davecgh/go-spew v1.1.1 + github.com/pmezard/go-difflib v1.0.0 + github.com/stretchr/objx v0.4.0 + gopkg.in/yaml.v3 v3.0.1 +) diff --git a/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.8.1.mod b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.8.1.mod new file mode 100644 index 0000000..3fe9bab --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.8.1.mod @@ -0,0 +1,10 @@ +module github.com/stretchr/testify + +go 1.13 + +require ( + github.com/davecgh/go-spew v1.1.1 + github.com/pmezard/go-difflib v1.0.0 + github.com/stretchr/objx v0.5.0 + gopkg.in/yaml.v3 v3.0.1 +) diff --git a/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/list b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/list new file mode 100644 index 0000000..6e0d7fb --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/list @@ -0,0 +1 @@ +v6.0.4 diff --git a/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.info b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.info new file mode 100644 index 0000000..7ab2d8d --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.info @@ -0,0 +1 @@ +{"Version":"v6.0.4","Time":"2021-05-18T08:33:03Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.lock b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.mod b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.mod new file mode 100644 index 0000000..d9dad96 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.mod @@ -0,0 +1,11 @@ +module github.com/vbauerster/mpb/v6 + +require ( + github.com/VividCortex/ewma v1.2.0 + github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d + github.com/mattn/go-runewidth v0.0.12 + github.com/rivo/uniseg v0.2.0 + golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 +) + +go 1.14 diff --git a/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.zip b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.zip new file mode 100644 index 0000000..6ce7c9a Binary files /dev/null and b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.zip differ diff --git a/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.ziphash b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.ziphash new file mode 100644 index 0000000..de67ce3 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/github.com/vbauerster/mpb/v6/@v/v6.0.4.ziphash @@ -0,0 +1 @@ +h1:h6J5zM/2wimP5Hj00unQuV8qbo5EPcj6wbkCqgj7KcY= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/list b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/list new file mode 100644 index 0000000..cda353c --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/list @@ -0,0 +1,2 @@ +v1.7.0 +v1.10.0 diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.10.0.info b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.10.0.info new file mode 100644 index 0000000..de682d8 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.10.0.info @@ -0,0 +1 @@ +{"Version":"v1.10.0","Time":"2022-08-11T23:31:55Z","Origin":{"VCS":"git","URL":"https://github.com/uber-go/atomic","Ref":"refs/tags/v1.10.0","Hash":"96800363039fbf926a6c826795797abcde5f07a5"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.10.0.mod b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.10.0.mod new file mode 100644 index 0000000..69616f7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.10.0.mod @@ -0,0 +1,10 @@ +module go.uber.org/atomic + +require github.com/stretchr/testify v1.3.0 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect +) + +go 1.18 diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.lock b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.mod b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.mod new file mode 100644 index 0000000..daa7599 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.mod @@ -0,0 +1,8 @@ +module go.uber.org/atomic + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/stretchr/testify v1.3.0 +) + +go 1.13 diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.zip b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.zip new file mode 100644 index 0000000..8a9a04e Binary files /dev/null and b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.ziphash b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.ziphash new file mode 100644 index 0000000..4195cd8 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/atomic/@v/v1.7.0.ziphash @@ -0,0 +1 @@ +h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/list b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/list new file mode 100644 index 0000000..8daa709 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/list @@ -0,0 +1,2 @@ +v1.6.0 +v1.8.0 diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.lock b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.mod b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.mod new file mode 100644 index 0000000..ff8bdf9 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.mod @@ -0,0 +1,8 @@ +module go.uber.org/multierr + +go 1.12 + +require ( + github.com/stretchr/testify v1.3.0 + go.uber.org/atomic v1.7.0 +) diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.zip b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.zip new file mode 100644 index 0000000..b622a76 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.ziphash b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.ziphash new file mode 100644 index 0000000..bf61483 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.6.0.ziphash @@ -0,0 +1 @@ +h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.8.0.info b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.8.0.info new file mode 100644 index 0000000..9b24dcc --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.8.0.info @@ -0,0 +1 @@ +{"Version":"v1.8.0","Time":"2022-02-28T20:35:35Z"} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.8.0.mod b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.8.0.mod new file mode 100644 index 0000000..398d6c9 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/multierr/@v/v1.8.0.mod @@ -0,0 +1,9 @@ +module go.uber.org/multierr + +go 1.14 + +require ( + github.com/stretchr/testify v1.7.0 + go.uber.org/atomic v1.7.0 + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect +) diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/list b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/list new file mode 100644 index 0000000..645dc7a --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/list @@ -0,0 +1 @@ +v1.23.0 diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.info b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.info new file mode 100644 index 0000000..f0c4496 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.info @@ -0,0 +1 @@ +{"Version":"v1.23.0","Time":"2022-08-24T15:40:16Z","Origin":{"VCS":"git","URL":"https://github.com/uber-go/zap","Ref":"refs/tags/v1.23.0","Hash":"1ae5819539453056267ba3033697df2b231e8af8"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.lock b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.mod b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.mod new file mode 100644 index 0000000..29ea56e --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.mod @@ -0,0 +1,18 @@ +module go.uber.org/zap + +go 1.18 + +require ( + github.com/benbjohnson/clock v1.1.0 + github.com/pkg/errors v0.8.1 + github.com/stretchr/testify v1.8.0 + go.uber.org/atomic v1.7.0 + go.uber.org/goleak v1.1.11 + go.uber.org/multierr v1.6.0 + gopkg.in/yaml.v3 v3.0.1 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect +) diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.zip b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.zip new file mode 100644 index 0000000..3eeaa41 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.ziphash b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.ziphash new file mode 100644 index 0000000..3918444 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/go.uber.org/zap/@v/v1.23.0.ziphash @@ -0,0 +1 @@ +h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/list b/dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/list new file mode 100644 index 0000000..7a5b6e9 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/list @@ -0,0 +1,2 @@ +v0.0.0-20190308221718-c2843e01d9a2 +v0.0.0-20200622213623-75b288015ac9 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.0.0-20190308221718-c2843e01d9a2.mod b/dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.0.0-20190308221718-c2843e01d9a2.mod new file mode 100644 index 0000000..3a8a43e --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.0.0-20190308221718-c2843e01d9a2.mod @@ -0,0 +1,3 @@ +module golang.org/x/crypto + +require golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.0.0-20200622213623-75b288015ac9.mod b/dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.0.0-20200622213623-75b288015ac9.mod new file mode 100644 index 0000000..6a004e4 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/crypto/@v/v0.0.0-20200622213623-75b288015ac9.mod @@ -0,0 +1,8 @@ +module golang.org/x/crypto + +go 1.11 + +require ( + golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 + golang.org/x/sys v0.0.0-20190412213103-97732733099d +) diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/list b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/list new file mode 100644 index 0000000..cf81dc0 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/list @@ -0,0 +1,2 @@ +v0.0.0-20220613132600-b0d781184e0d +v0.0.0-20221109134031-9ce248df8de5 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.lock b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.mod b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.mod new file mode 100644 index 0000000..c64f300 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.mod @@ -0,0 +1,14 @@ +module golang.org/x/exp + +go 1.18 + +require ( + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 + golang.org/x/tools v0.1.10 +) + +require ( + github.com/google/go-cmp v0.5.8 // indirect + golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect +) diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.zip b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.zip new file mode 100644 index 0000000..046435a Binary files /dev/null and b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.zip differ diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.ziphash b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.ziphash new file mode 100644 index 0000000..3c7c8fa --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20220613132600-b0d781184e0d.ziphash @@ -0,0 +1 @@ +h1:vtUKgx8dahOomfFzLREU8nSv25YHnTgLBn4rDnWZdU0= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20221109134031-9ce248df8de5.info b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20221109134031-9ce248df8de5.info new file mode 100644 index 0000000..111ba92 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20221109134031-9ce248df8de5.info @@ -0,0 +1 @@ +{"Version":"v0.0.0-20221109134031-9ce248df8de5","Time":"2022-11-09T13:40:31Z","Origin":{"VCS":"git","URL":"https://go.googlesource.com/exp","Hash":"9ce248df8de5f220f7cc4fffdd6b4c3138e081d6"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20221109134031-9ce248df8de5.mod b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20221109134031-9ce248df8de5.mod new file mode 100644 index 0000000..0df6ab3 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/exp/@v/v0.0.0-20221109134031-9ce248df8de5.mod @@ -0,0 +1,11 @@ +module golang.org/x/exp + +go 1.18 + +require ( + github.com/google/go-cmp v0.5.8 + golang.org/x/mod v0.6.0 + golang.org/x/tools v0.2.0 +) + +require golang.org/x/sys v0.1.0 // indirect diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/net/@v/list b/dependencies/pkg/mod/cache/download/golang.org/x/net/@v/list new file mode 100644 index 0000000..59bc365 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/net/@v/list @@ -0,0 +1 @@ +v0.0.0-20190404232315-eb5bcb51f2a3 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/net/@v/v0.0.0-20190404232315-eb5bcb51f2a3.mod b/dependencies/pkg/mod/cache/download/golang.org/x/net/@v/v0.0.0-20190404232315-eb5bcb51f2a3.mod new file mode 100644 index 0000000..78a1450 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/net/@v/v0.0.0-20190404232315-eb5bcb51f2a3.mod @@ -0,0 +1,6 @@ +module golang.org/x/net + +require ( + golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 + golang.org/x/text v0.3.0 +) diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/list b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/list new file mode 100644 index 0000000..f9c0bf7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/list @@ -0,0 +1,2 @@ +v0.0.0-20210220032951-036812b2e83c +v0.1.0 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.lock b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.mod new file mode 100644 index 0000000..091b76e --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.mod @@ -0,0 +1 @@ +module golang.org/x/sync diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.zip b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.zip new file mode 100644 index 0000000..552878c Binary files /dev/null and b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.zip differ diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.ziphash b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.ziphash new file mode 100644 index 0000000..a7a4ef2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.0.0-20210220032951-036812b2e83c.ziphash @@ -0,0 +1 @@ +h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.1.0.info b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.1.0.info new file mode 100644 index 0000000..14a1f05 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.1.0.info @@ -0,0 +1 @@ +{"Version":"v0.1.0","Time":"2022-09-29T20:41:14Z","Origin":{"VCS":"git","URL":"https://go.googlesource.com/sync","Ref":"refs/tags/v0.1.0","Hash":"8fcdb60fdcc0539c5e357b2308249e4e752147f1"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.1.0.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.1.0.mod new file mode 100644 index 0000000..091b76e --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sync/@v/v0.1.0.mod @@ -0,0 +1 @@ +module golang.org/x/sync diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/list b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/list new file mode 100644 index 0000000..0c8c224 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/list @@ -0,0 +1,13 @@ +v0.0.0-20190215142949-d0b11bdaac8a +v0.0.0-20190412213103-97732733099d +v0.0.0-20200116001909-b77594299b42 +v0.0.0-20200223170610-d5e6a3e2c0ae +v0.0.0-20210320140829-1e4c9ba3b0c4 +v0.0.0-20210514084401-e8d321eab015 +v0.0.0-20210630005230-0f9fa26af87c +v0.0.0-20211019181941-9d821ace8654 +v0.0.0-20211216021012-1d35b9e2eb4e +v0.0.0-20220406163625-3f8b81556e12 +v0.0.0-20220811171246-fbc7d0a398ab +v0.1.0 +v0.2.0 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20190215142949-d0b11bdaac8a.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20190215142949-d0b11bdaac8a.mod new file mode 100644 index 0000000..6dfcf51 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20190215142949-d0b11bdaac8a.mod @@ -0,0 +1 @@ +module golang.org/x/sys diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20190412213103-97732733099d.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20190412213103-97732733099d.mod new file mode 100644 index 0000000..b12171f --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20190412213103-97732733099d.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.12 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20200116001909-b77594299b42.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20200116001909-b77594299b42.mod new file mode 100644 index 0000000..b12171f --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20200116001909-b77594299b42.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.12 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20200223170610-d5e6a3e2c0ae.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20200223170610-d5e6a3e2c0ae.mod new file mode 100644 index 0000000..b12171f --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20200223170610-d5e6a3e2c0ae.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.12 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210320140829-1e4c9ba3b0c4.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210320140829-1e4c9ba3b0c4.mod new file mode 100644 index 0000000..b12171f --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210320140829-1e4c9ba3b0c4.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.12 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210514084401-e8d321eab015.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210514084401-e8d321eab015.mod new file mode 100644 index 0000000..29eb4d2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210514084401-e8d321eab015.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.17 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210630005230-0f9fa26af87c.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210630005230-0f9fa26af87c.mod new file mode 100644 index 0000000..29eb4d2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20210630005230-0f9fa26af87c.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.17 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20211019181941-9d821ace8654.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20211019181941-9d821ace8654.mod new file mode 100644 index 0000000..29eb4d2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20211019181941-9d821ace8654.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.17 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20211216021012-1d35b9e2eb4e.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20211216021012-1d35b9e2eb4e.mod new file mode 100644 index 0000000..29eb4d2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20211216021012-1d35b9e2eb4e.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.17 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20220406163625-3f8b81556e12.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20220406163625-3f8b81556e12.mod new file mode 100644 index 0000000..29eb4d2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20220406163625-3f8b81556e12.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.17 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20220811171246-fbc7d0a398ab.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20220811171246-fbc7d0a398ab.mod new file mode 100644 index 0000000..29eb4d2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.0.0-20220811171246-fbc7d0a398ab.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.17 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.lock b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.mod new file mode 100644 index 0000000..29eb4d2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.17 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.zip b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.zip new file mode 100644 index 0000000..f2c9ed1 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.zip differ diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.ziphash b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.ziphash new file mode 100644 index 0000000..7840a3c --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.1.0.ziphash @@ -0,0 +1 @@ +h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.2.0.info b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.2.0.info new file mode 100644 index 0000000..db905f1 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.2.0.info @@ -0,0 +1 @@ +{"Version":"v0.2.0","Time":"2022-11-02T19:48:38Z","Origin":{"VCS":"git","URL":"https://go.googlesource.com/sys","Ref":"refs/tags/v0.2.0","Hash":"fc697a31fa06b616162e34fd66047ab52722ba6c"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.2.0.mod b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.2.0.mod new file mode 100644 index 0000000..29eb4d2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/sys/@v/v0.2.0.mod @@ -0,0 +1,3 @@ +module golang.org/x/sys + +go 1.17 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/text/@v/list b/dependencies/pkg/mod/cache/download/golang.org/x/text/@v/list new file mode 100644 index 0000000..8339b16 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/text/@v/list @@ -0,0 +1,2 @@ +v0.3.0 +v0.3.2 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/text/@v/v0.3.0.mod b/dependencies/pkg/mod/cache/download/golang.org/x/text/@v/v0.3.0.mod new file mode 100644 index 0000000..f8a27b6 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/text/@v/v0.3.0.mod @@ -0,0 +1 @@ +module golang.org/x/text diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/text/@v/v0.3.2.mod b/dependencies/pkg/mod/cache/download/golang.org/x/text/@v/v0.3.2.mod new file mode 100644 index 0000000..5eb1e8b --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/text/@v/v0.3.2.mod @@ -0,0 +1,3 @@ +module golang.org/x/text + +require golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/tools/@v/list b/dependencies/pkg/mod/cache/download/golang.org/x/tools/@v/list new file mode 100644 index 0000000..1676b10 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/tools/@v/list @@ -0,0 +1 @@ +v0.0.0-20180917221912-90fa682c2a6e diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/tools/@v/v0.0.0-20180917221912-90fa682c2a6e.mod b/dependencies/pkg/mod/cache/download/golang.org/x/tools/@v/v0.0.0-20180917221912-90fa682c2a6e.mod new file mode 100644 index 0000000..552f878 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/tools/@v/v0.0.0-20180917221912-90fa682c2a6e.mod @@ -0,0 +1 @@ +module golang.org/x/tools diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/list b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/list new file mode 100644 index 0000000..44bf687 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/list @@ -0,0 +1,2 @@ +v0.0.0-20200804184101-5ec99f83aff1 +v0.0.0-20220907171357-04be3eba64a2 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20200804184101-5ec99f83aff1.mod b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20200804184101-5ec99f83aff1.mod new file mode 100644 index 0000000..870d4f6 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20200804184101-5ec99f83aff1.mod @@ -0,0 +1,3 @@ +module golang.org/x/xerrors + +go 1.11 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.info b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.info new file mode 100644 index 0000000..a46d865 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.info @@ -0,0 +1 @@ +{"Version":"v0.0.0-20220907171357-04be3eba64a2","Time":"2022-09-07T17:13:57Z","Origin":{"VCS":"git","URL":"https://go.googlesource.com/xerrors","Hash":"04be3eba64a22a838cdb17b8dca15a52871c08b4"}} \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.lock b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.lock new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.mod b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.mod new file mode 100644 index 0000000..9235759 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.mod @@ -0,0 +1,3 @@ +module golang.org/x/xerrors + +go 1.17 diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.zip b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.zip new file mode 100644 index 0000000..f5eacda Binary files /dev/null and b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.zip differ diff --git a/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.ziphash b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.ziphash new file mode 100644 index 0000000..ae63bbf --- /dev/null +++ b/dependencies/pkg/mod/cache/download/golang.org/x/xerrors/@v/v0.0.0-20220907171357-04be3eba64a2.ziphash @@ -0,0 +1 @@ +h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= \ No newline at end of file diff --git a/dependencies/pkg/mod/cache/download/gopkg.in/check.v1/@v/list b/dependencies/pkg/mod/cache/download/gopkg.in/check.v1/@v/list new file mode 100644 index 0000000..d4c3e43 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/gopkg.in/check.v1/@v/list @@ -0,0 +1 @@ +v0.0.0-20161208181325-20d25e280405 diff --git a/dependencies/pkg/mod/cache/download/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.mod b/dependencies/pkg/mod/cache/download/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.mod new file mode 100644 index 0000000..7cec6a0 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.mod @@ -0,0 +1 @@ +module gopkg.in/check.v1 diff --git a/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v2/@v/list b/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v2/@v/list new file mode 100644 index 0000000..6c8b2a3 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v2/@v/list @@ -0,0 +1 @@ +v2.2.2 diff --git a/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v2/@v/v2.2.2.mod b/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v2/@v/v2.2.2.mod new file mode 100644 index 0000000..1934e87 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v2/@v/v2.2.2.mod @@ -0,0 +1,5 @@ +module "gopkg.in/yaml.v2" + +require ( + "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 +) diff --git a/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/list b/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/list new file mode 100644 index 0000000..2c0cc33 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/list @@ -0,0 +1,2 @@ +v3.0.0-20200313102051-9f266ea9e77c +v3.0.1 diff --git a/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/v3.0.0-20200313102051-9f266ea9e77c.mod b/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/v3.0.0-20200313102051-9f266ea9e77c.mod new file mode 100644 index 0000000..f407ea3 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/v3.0.0-20200313102051-9f266ea9e77c.mod @@ -0,0 +1,5 @@ +module "gopkg.in/yaml.v3" + +require ( + "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 +) diff --git a/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/v3.0.1.mod b/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/v3.0.1.mod new file mode 100644 index 0000000..f407ea3 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/gopkg.in/yaml.v3/@v/v3.0.1.mod @@ -0,0 +1,5 @@ +module "gopkg.in/yaml.v3" + +require ( + "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 +) diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/mattn/go-runewidth@v0.0.14 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/mattn/go-runewidth@v0.0.14 new file mode 100644 index 0000000..36575f2 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/mattn/go-runewidth@v0.0.14 @@ -0,0 +1,9 @@ +13113335 +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= + +go.sum database tree +13843026 +Sj3ffgtXDLaVOntZ9s+FQ/ssHM3SameTFCkGHSX3Gxg= + +— sum.golang.org Az3grrMwCs2Gh9FwAwXKoI0FW4QxiVCkusoq/YTEFRVSxdJU5W+f3cnMkKnQct7kxJQH4HVhXHD7or2IZfFGUEApbgw= diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/pkg/errors@v0.8.1 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/pkg/errors@v0.8.1 new file mode 100644 index 0000000..fb1f13c --- /dev/null +++ b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/pkg/errors@v0.8.1 @@ -0,0 +1,9 @@ +52 +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= + +go.sum database tree +13844849 +umoQY6Ft7Cez3ztXq8BXtpdkXpYSyv1a09nYqsspjsA= + +— sum.golang.org Az3grlkC+StHF+bDRYiHjO6Qe8k8Y3xqsjU8zu0bfsJG0dAQ2v6+8vi2MQzzWpstW3bpSjkTivhpJ/9WnJ0Umde94wA= diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/rivo/uniseg@v0.4.2 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/rivo/uniseg@v0.4.2 new file mode 100644 index 0000000..d03a7be --- /dev/null +++ b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/rivo/uniseg@v0.4.2 @@ -0,0 +1,9 @@ +12264070 +github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= +github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= + +go.sum database tree +13843639 +MsQ35MElgAWcqg3aR7JeJBfnNucw9nZPgRpqUH3K7i0= + +— sum.golang.org Az3groHPJjvJWBgRWDpQ3Oj++/tWc/OD1fC6KLImZpBezHmPI0TReoKeRlarMk5CJxNfx9Nix40oE5DefVOARiQcOAU= diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/go.uber.org/atomic@v1.10.0 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/go.uber.org/atomic@v1.10.0 new file mode 100644 index 0000000..c9d533d --- /dev/null +++ b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/go.uber.org/atomic@v1.10.0 @@ -0,0 +1,9 @@ +11863438 +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= + +go.sum database tree +13843293 +TGL5Ck1NjFw6q7JIEkjpAkH+SKul8oDo8EFv7B8AiGU= + +— sum.golang.org Az3grkusSmkG2vgbiFdWNXcoFjVY2+uevp7DJb5dzv0wGFerJn8oyM9Ajm4/udDlukZ1XPsLV/fAyRRI5b/ftNYoegs= diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/go.uber.org/multierr@v1.8.0 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/go.uber.org/multierr@v1.8.0 new file mode 100644 index 0000000..ea741d6 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/go.uber.org/multierr@v1.8.0 @@ -0,0 +1,9 @@ +9400221 +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.sum database tree +13843814 +2NV7dDTDqC3Fb8qFIHsm5SGA4MDpnJcsqKgjfk+cBI0= + +— sum.golang.org Az3grieeY4x8TtWpQ1goL9k6WSPE//idv0jb88oWQj6lRurBXpD+v4Gx6VkeZne+B7FjShhM+XX7qyN9rSPxbCtHUAI= diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/exp@v0.0.0-20221109134031-9ce248df8de5 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/exp@v0.0.0-20221109134031-9ce248df8de5 new file mode 100644 index 0000000..abd0305 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/exp@v0.0.0-20221109134031-9ce248df8de5 @@ -0,0 +1,9 @@ +13843653 +golang.org/x/exp v0.0.0-20221109134031-9ce248df8de5 h1:pug8He0YPdPwDXZN4B/1sJ/8d4YsZqwVZEzg/Xi5w3Y= +golang.org/x/exp v0.0.0-20221109134031-9ce248df8de5/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= + +go.sum database tree +13843814 +2NV7dDTDqC3Fb8qFIHsm5SGA4MDpnJcsqKgjfk+cBI0= + +— sum.golang.org Az3grieeY4x8TtWpQ1goL9k6WSPE//idv0jb88oWQj6lRurBXpD+v4Gx6VkeZne+B7FjShhM+XX7qyN9rSPxbCtHUAI= diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sync@v0.1.0 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sync@v0.1.0 new file mode 100644 index 0000000..875e1e7 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sync@v0.1.0 @@ -0,0 +1,9 @@ +13544323 +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= + +go.sum database tree +13842904 +FBSqwHx68uR+Lloi94rLFy1JaQhmGqMPgzFqrjGydUU= + +— sum.golang.org Az3grjvGJY3AhCe1EhdzNNxLg2+bHNMrP/ysn2V3vKEeS9QWILC5EYtl+v475dIdzzPswjsUV8YPMaKYKHqJek00CAc= diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.0.0-20211019181941-9d821ace8654 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.0.0-20211019181941-9d821ace8654 new file mode 100644 index 0000000..99498cd --- /dev/null +++ b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.0.0-20211019181941-9d821ace8654 @@ -0,0 +1,9 @@ +7349054 +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + +go.sum database tree +13843150 +wQuj3wdO+q4bp3QsGDyuao2ogrm3m7ciaveTiTC8k8k= + +— sum.golang.org Az3grskZi0FN4UhrpgQ7VZftT3kj2AppvEyAD6bSqd5LO6z8XHwH5aREs3Jz2jxcKjAFEVxvkZqlvo2C5jCV18NY0Qc= diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.0.0-20211216021012-1d35b9e2eb4e b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.0.0-20211216021012-1d35b9e2eb4e new file mode 100644 index 0000000..2d10451 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.0.0-20211216021012-1d35b9e2eb4e @@ -0,0 +1,9 @@ +8409401 +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + +go.sum database tree +13843054 +xpBJPeNp9J2HI1XQqcLpkVVdx1163Zjj+FtrhsQSfg8= + +— sum.golang.org Az3griIVA2StT0Svt3HeJmk4hj6Z6EAhMt7Yq8bhxuKKB3W6ELpp6xU6Cu6WUoXRnZSDbaQc1gBZm9GfVUkR9Opliwk= diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.2.0 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.2.0 new file mode 100644 index 0000000..e986611 --- /dev/null +++ b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/golang.org/x/sys@v0.2.0 @@ -0,0 +1,9 @@ +13819336 +golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + +go.sum database tree +13843817 +1mD3+yn99YuPLgGYA2+SDBX5LASNA+2h3JPdO4n66bU= + +— sum.golang.org Az3grhD5L0EzCsRCi/0TNLDY4YBDpUVy6OUchiIbR2Am0d4etTI6O0jRnuabL4onvy6EKWsEEnNU7czHBUdKCgqxXgk= diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/000 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/000 new file mode 100644 index 0000000..2a37345 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/000 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x028/707 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x028/707 new file mode 100644 index 0000000..8ef24fd Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x028/707 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x032/849 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x032/849 new file mode 100644 index 0000000..6cd8ecc Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x032/849 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x036/719 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x036/719 new file mode 100644 index 0000000..a57a55b Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x036/719 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x046/341 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x046/341 new file mode 100644 index 0000000..c7622bd Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x046/341 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x047/906 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x047/906 new file mode 100644 index 0000000..e760f32 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x047/906 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x051/223 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x051/223 new file mode 100644 index 0000000..04bec0a Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x051/223 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x052/907 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x052/907 new file mode 100644 index 0000000..733a1d7 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x052/907 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x053/981 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x053/981 new file mode 100644 index 0000000..24f87e5 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x053/981 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/073 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/073 new file mode 100644 index 0000000..dfb728d Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/073 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/074 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/074 new file mode 100644 index 0000000..dab08ee Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/074 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/074.p/110 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/074.p/110 new file mode 100644 index 0000000..b26e23c Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/074.p/110 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/075 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/075 new file mode 100644 index 0000000..802b346 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/075 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/076 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/076 new file mode 100644 index 0000000..fa9ed7e Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/076 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/077 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/077 new file mode 100644 index 0000000..86e10ef Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/077 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/081.p/113 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/081.p/113 new file mode 100644 index 0000000..372c617 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/0/x054/081.p/113 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/000 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/000 new file mode 100644 index 0000000..d4b0b5f Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/000 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/112 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/112 new file mode 100644 index 0000000..7dc6d78 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/112 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/128 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/128 new file mode 100644 index 0000000..dc31fc6 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/128 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/143 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/143 new file mode 100644 index 0000000..e457e67 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/143 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/181 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/181 new file mode 100644 index 0000000..00bb302 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/181 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/187 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/187 new file mode 100644 index 0000000..7b72f5c Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/187 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/200 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/200 new file mode 100644 index 0000000..4950151 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/200 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/206 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/206 new file mode 100644 index 0000000..e595c7e Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/206 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/210 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/210 new file mode 100644 index 0000000..80b9c7a Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/210 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/211.p/58 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/211.p/58 new file mode 100644 index 0000000..36116b4 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/211.p/58 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/211.p/65 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/211.p/65 new file mode 100644 index 0000000..2cdad58 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/1/211.p/65 differ diff --git a/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/2/000.p/211 b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/2/000.p/211 new file mode 100644 index 0000000..59a6bf8 Binary files /dev/null and b/dependencies/pkg/mod/cache/download/sumdb/sum.golang.org/tile/8/2/000.p/211 differ diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/ISSUE_TEMPLATE.md b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..f3c1908 --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,10 @@ +Before you file an issue, please consider: + +We only accept pull requests for minor fixes or improvements. This includes: + +* Small bug fixes +* Typos +* Documentation or comments + +Please open issues to discuss new features. Pull requests for new features will be rejected, +so we recommend forking the repository and making changes in your fork for your use case. diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/PULL_REQUEST_TEMPLATE.md b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..0c22b92 --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +Before you create a pull request, please consider: + +We only accept pull requests for minor fixes or improvements. This includes: + +* Small bug fixes +* Typos +* Documentation or comments + +Please open issues to discuss new features. Pull requests for new features will be rejected, +so we recommend forking the repository and making changes in your fork for your use case. diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/workflows/build.yml b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/workflows/build.yml new file mode 100644 index 0000000..a63f405 --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.github/workflows/build.yml @@ -0,0 +1,56 @@ +name: build + +on: + push: + branches: + - master + paths-ignore: + - .github/** + - .gitignore + - .whitesource + - codecov.yml + - README.md + pull_request: + paths-ignore: + - .github/** + - .gitignore + - .whitesource + - codecov.yml + - README.md + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - go: 1.15 + build-with: true + - go: 1.16 + build-with: false + continue-on-error: ${{ matrix.build-with == false }} + name: Build with ${{ matrix.go }} + env: + GO111MODULE: on + + steps: + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go }} + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Vet + run: go vet ./... + + - name: Test + run: go test -vet=off -race -coverprofile=coverage.txt -covermode=atomic ./... + + - name: Upload code coverage report + if: matrix.build-with == true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: bash <(curl -s https://raw.githubusercontent.com/VividCortex/codecov-bash/master/codecov) diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.gitignore b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.gitignore new file mode 100644 index 0000000..c66769f --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +.*.sw? +/coverage.txt \ No newline at end of file diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.whitesource b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.whitesource new file mode 100644 index 0000000..d7eebc0 --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/.whitesource @@ -0,0 +1,3 @@ +{ + "settingsInheritedFrom": "VividCortex/whitesource-config@master" +} \ No newline at end of file diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/LICENSE b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/LICENSE new file mode 100644 index 0000000..a78d643 --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013 VividCortex + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/README.md b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/README.md new file mode 100644 index 0000000..87b4a3c --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/README.md @@ -0,0 +1,145 @@ +# EWMA + +[![GoDoc](https://godoc.org/github.com/VividCortex/ewma?status.svg)](https://godoc.org/github.com/VividCortex/ewma) +![build](https://github.com/VividCortex/ewma/workflows/build/badge.svg) +[![codecov](https://codecov.io/gh/VividCortex/ewma/branch/master/graph/badge.svg)](https://codecov.io/gh/VividCortex/ewma) + +This repo provides Exponentially Weighted Moving Average algorithms, or EWMAs for short, [based on our +Quantifying Abnormal Behavior talk](https://vividcortex.com/blog/2013/07/23/a-fast-go-library-for-exponential-moving-averages/). + +### Exponentially Weighted Moving Average + +An exponentially weighted moving average is a way to continuously compute a type of +average for a series of numbers, as the numbers arrive. After a value in the series is +added to the average, its weight in the average decreases exponentially over time. This +biases the average towards more recent data. EWMAs are useful for several reasons, chiefly +their inexpensive computational and memory cost, as well as the fact that they represent +the recent central tendency of the series of values. + +The EWMA algorithm requires a decay factor, alpha. The larger the alpha, the more the average +is biased towards recent history. The alpha must be between 0 and 1, and is typically +a fairly small number, such as 0.04. We will discuss the choice of alpha later. + +The algorithm works thus, in pseudocode: + +1. Multiply the next number in the series by alpha. +2. Multiply the current value of the average by 1 minus alpha. +3. Add the result of steps 1 and 2, and store it as the new current value of the average. +4. Repeat for each number in the series. + +There are special-case behaviors for how to initialize the current value, and these vary +between implementations. One approach is to start with the first value in the series; +another is to average the first 10 or so values in the series using an arithmetic average, +and then begin the incremental updating of the average. Each method has pros and cons. + +It may help to look at it pictorially. Suppose the series has five numbers, and we choose +alpha to be 0.50 for simplicity. Here's the series, with numbers in the neighborhood of 300. + +![Data Series](https://user-images.githubusercontent.com/279875/28242350-463289a2-6977-11e7-88ca-fd778ccef1f0.png) + +Now let's take the moving average of those numbers. First we set the average to the value +of the first number. + +![EWMA Step 1](https://user-images.githubusercontent.com/279875/28242353-464c96bc-6977-11e7-9981-dc4e0789c7ba.png) + +Next we multiply the next number by alpha, multiply the current value by 1-alpha, and add +them to generate a new value. + +![EWMA Step 2](https://user-images.githubusercontent.com/279875/28242351-464abefa-6977-11e7-95d0-43900f29bef2.png) + +This continues until we are done. + +![EWMA Step N](https://user-images.githubusercontent.com/279875/28242352-464c58f0-6977-11e7-8cd0-e01e4efaac7f.png) + +Notice how each of the values in the series decays by half each time a new value +is added, and the top of the bars in the lower portion of the image represents the +size of the moving average. It is a smoothed, or low-pass, average of the original +series. + +For further reading, see [Exponentially weighted moving average](http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average) on wikipedia. + +### Choosing Alpha + +Consider a fixed-size sliding-window moving average (not an exponentially weighted moving average) +that averages over the previous N samples. What is the average age of each sample? It is N/2. + +Now suppose that you wish to construct a EWMA whose samples have the same average age. The formula +to compute the alpha required for this is: alpha = 2/(N+1). Proof is in the book +"Production and Operations Analysis" by Steven Nahmias. + +So, for example, if you have a time-series with samples once per second, and you want to get the +moving average over the previous minute, you should use an alpha of .032786885. This, by the way, +is the constant alpha used for this repository's SimpleEWMA. + +### Implementations + +This repository contains two implementations of the EWMA algorithm, with different properties. + +The implementations all conform to the MovingAverage interface, and the constructor returns +that type. + +Current implementations assume an implicit time interval of 1.0 between every sample added. +That is, the passage of time is treated as though it's the same as the arrival of samples. +If you need time-based decay when samples are not arriving precisely at set intervals, then +this package will not support your needs at present. + +#### SimpleEWMA + +A SimpleEWMA is designed for low CPU and memory consumption. It **will** have different behavior than the VariableEWMA +for multiple reasons. It has no warm-up period and it uses a constant +decay. These properties let it use less memory. It will also behave +differently when it's equal to zero, which is assumed to mean +uninitialized, so if a value is likely to actually become zero over time, +then any non-zero value will cause a sharp jump instead of a small change. + +#### VariableEWMA + +Unlike SimpleEWMA, this supports a custom age which must be stored, and thus uses more memory. +It also has a "warmup" time when you start adding values to it. It will report a value of 0.0 +until you have added the required number of samples to it. It uses some memory to store the +number of samples added to it. As a result it uses a little over twice the memory of SimpleEWMA. + +## Usage + +### API Documentation + +View the GoDoc generated documentation [here](http://godoc.org/github.com/VividCortex/ewma). + +```go +package main + +import "github.com/VividCortex/ewma" + +func main() { + samples := [100]float64{ + 4599, 5711, 4746, 4621, 5037, 4218, 4925, 4281, 5207, 5203, 5594, 5149, + } + + e := ewma.NewMovingAverage() //=> Returns a SimpleEWMA if called without params + a := ewma.NewMovingAverage(5) //=> returns a VariableEWMA with a decay of 2 / (5 + 1) + + for _, f := range samples { + e.Add(f) + a.Add(f) + } + + e.Value() //=> 13.577404704631077 + a.Value() //=> 1.5806140565521463e-12 +} +``` + +## Contributing + +We only accept pull requests for minor fixes or improvements. This includes: + +* Small bug fixes +* Typos +* Documentation or comments + +Please open issues to discuss new features. Pull requests for new features will be rejected, +so we recommend forking the repository and making changes in your fork for your use case. + +## License + +This repository is Copyright (c) 2013 VividCortex, Inc. All rights reserved. +It is licensed under the MIT license. Please see the LICENSE file for applicable license terms. diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/codecov.yml b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/codecov.yml new file mode 100644 index 0000000..0d36d90 --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/codecov.yml @@ -0,0 +1,6 @@ +coverage: + status: + project: + default: + threshold: 15% + patch: off diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/ewma.go b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/ewma.go new file mode 100644 index 0000000..44d5d53 --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/ewma.go @@ -0,0 +1,126 @@ +// Package ewma implements exponentially weighted moving averages. +package ewma + +// Copyright (c) 2013 VividCortex, Inc. All rights reserved. +// Please see the LICENSE file for applicable license terms. + +const ( + // By default, we average over a one-minute period, which means the average + // age of the metrics in the period is 30 seconds. + AVG_METRIC_AGE float64 = 30.0 + + // The formula for computing the decay factor from the average age comes + // from "Production and Operations Analysis" by Steven Nahmias. + DECAY float64 = 2 / (float64(AVG_METRIC_AGE) + 1) + + // For best results, the moving average should not be initialized to the + // samples it sees immediately. The book "Production and Operations + // Analysis" by Steven Nahmias suggests initializing the moving average to + // the mean of the first 10 samples. Until the VariableEwma has seen this + // many samples, it is not "ready" to be queried for the value of the + // moving average. This adds some memory cost. + WARMUP_SAMPLES uint8 = 10 +) + +// MovingAverage is the interface that computes a moving average over a time- +// series stream of numbers. The average may be over a window or exponentially +// decaying. +type MovingAverage interface { + Add(float64) + Value() float64 + Set(float64) +} + +// NewMovingAverage constructs a MovingAverage that computes an average with the +// desired characteristics in the moving window or exponential decay. If no +// age is given, it constructs a default exponentially weighted implementation +// that consumes minimal memory. The age is related to the decay factor alpha +// by the formula given for the DECAY constant. It signifies the average age +// of the samples as time goes to infinity. +func NewMovingAverage(age ...float64) MovingAverage { + if len(age) == 0 || age[0] == AVG_METRIC_AGE { + return new(SimpleEWMA) + } + return &VariableEWMA{ + decay: 2 / (age[0] + 1), + } +} + +// A SimpleEWMA represents the exponentially weighted moving average of a +// series of numbers. It WILL have different behavior than the VariableEWMA +// for multiple reasons. It has no warm-up period and it uses a constant +// decay. These properties let it use less memory. It will also behave +// differently when it's equal to zero, which is assumed to mean +// uninitialized, so if a value is likely to actually become zero over time, +// then any non-zero value will cause a sharp jump instead of a small change. +// However, note that this takes a long time, and the value may just +// decays to a stable value that's close to zero, but which won't be mistaken +// for uninitialized. See http://play.golang.org/p/litxBDr_RC for example. +type SimpleEWMA struct { + // The current value of the average. After adding with Add(), this is + // updated to reflect the average of all values seen thus far. + value float64 +} + +// Add adds a value to the series and updates the moving average. +func (e *SimpleEWMA) Add(value float64) { + if e.value == 0 { // this is a proxy for "uninitialized" + e.value = value + } else { + e.value = (value * DECAY) + (e.value * (1 - DECAY)) + } +} + +// Value returns the current value of the moving average. +func (e *SimpleEWMA) Value() float64 { + return e.value +} + +// Set sets the EWMA's value. +func (e *SimpleEWMA) Set(value float64) { + e.value = value +} + +// VariableEWMA represents the exponentially weighted moving average of a series of +// numbers. Unlike SimpleEWMA, it supports a custom age, and thus uses more memory. +type VariableEWMA struct { + // The multiplier factor by which the previous samples decay. + decay float64 + // The current value of the average. + value float64 + // The number of samples added to this instance. + count uint8 +} + +// Add adds a value to the series and updates the moving average. +func (e *VariableEWMA) Add(value float64) { + switch { + case e.count < WARMUP_SAMPLES: + e.count++ + e.value += value + case e.count == WARMUP_SAMPLES: + e.count++ + e.value = e.value / float64(WARMUP_SAMPLES) + e.value = (value * e.decay) + (e.value * (1 - e.decay)) + default: + e.value = (value * e.decay) + (e.value * (1 - e.decay)) + } +} + +// Value returns the current value of the average, or 0.0 if the series hasn't +// warmed up yet. +func (e *VariableEWMA) Value() float64 { + if e.count <= WARMUP_SAMPLES { + return 0.0 + } + + return e.value +} + +// Set sets the EWMA's value. +func (e *VariableEWMA) Set(value float64) { + e.value = value + if e.count <= WARMUP_SAMPLES { + e.count = WARMUP_SAMPLES + 1 + } +} diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/ewma_test.go b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/ewma_test.go new file mode 100644 index 0000000..a6cd37b --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/ewma_test.go @@ -0,0 +1,103 @@ +package ewma + +// Copyright (c) 2013 VividCortex, Inc. All rights reserved. +// Please see the LICENSE file for applicable license terms. + +import ( + "math" + "testing" +) + +const testMargin = 0.00000001 + +var samples = [100]float64{ + 4599, 5711, 4746, 4621, 5037, 4218, 4925, 4281, 5207, 5203, 5594, 5149, + 4948, 4994, 6056, 4417, 4973, 4714, 4964, 5280, 5074, 4913, 4119, 4522, + 4631, 4341, 4909, 4750, 4663, 5167, 3683, 4964, 5151, 4892, 4171, 5097, + 3546, 4144, 4551, 6557, 4234, 5026, 5220, 4144, 5547, 4747, 4732, 5327, + 5442, 4176, 4907, 3570, 4684, 4161, 5206, 4952, 4317, 4819, 4668, 4603, + 4885, 4645, 4401, 4362, 5035, 3954, 4738, 4545, 5433, 6326, 5927, 4983, + 5364, 4598, 5071, 5231, 5250, 4621, 4269, 3953, 3308, 3623, 5264, 5322, + 5395, 4753, 4936, 5315, 5243, 5060, 4989, 4921, 4480, 3426, 3687, 4220, + 3197, 5139, 6101, 5279, +} + +func withinMargin(a, b float64) bool { + return math.Abs(a-b) <= testMargin +} + +func TestSimpleEWMA(t *testing.T) { + var e SimpleEWMA + for _, f := range samples { + e.Add(f) + } + if !withinMargin(e.Value(), 4734.500946466118) { + t.Errorf("e.Value() is %v, wanted %v", e.Value(), 4734.500946466118) + } + e.Set(1.0) + if e.Value() != 1.0 { + t.Errorf("e.Value() is %v", e.Value()) + } +} + +func TestVariableEWMA(t *testing.T) { + e := NewMovingAverage(30) + for _, f := range samples { + e.Add(f) + } + if !withinMargin(e.Value(), 4734.500946466118) { + t.Errorf("e.Value() is %v, wanted %v", e.Value(), 4734.500946466118) + } + e.Set(1.0) + if e.Value() != 1.0 { + t.Errorf("e.Value() is %v", e.Value()) + } +} + +func TestVariableEWMA2(t *testing.T) { + e := NewMovingAverage(5) + for _, f := range samples { + e.Add(f) + } + if !withinMargin(e.Value(), 5015.397367486725) { + t.Errorf("e.Value() is %v, wanted %v", e.Value(), 5015.397367486725) + } +} + +func TestVariableEWMAWarmup(t *testing.T) { + e := NewMovingAverage(5) + for i, f := range samples { + e.Add(f) + + // all values returned during warmup should be 0.0 + if uint8(i) < WARMUP_SAMPLES { + if e.Value() != 0.0 { + t.Errorf("e.Value() is %v, expected %v", e.Value(), 0.0) + } + } + } + e = NewMovingAverage(5) + e.Set(5) + e.Add(1) + if e.Value() >= 5 { + t.Errorf("e.Value() is %v, expected it to decay towards 0", e.Value()) + } +} + +func TestVariableEWMAWarmup2(t *testing.T) { + e := NewMovingAverage(5) + testSamples := [12]float64{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10000, 1} + for i, f := range testSamples { + e.Add(f) + + // all values returned during warmup should be 0.0 + if uint8(i) < WARMUP_SAMPLES { + if e.Value() != 0.0 { + t.Errorf("e.Value() is %v, expected %v", e.Value(), 0.0) + } + } + } + if val := e.Value(); val == 1.0 { + t.Errorf("e.Value() is expected to be greater than %v", 1.0) + } +} diff --git a/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/go.mod b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/go.mod new file mode 100644 index 0000000..e481e3d --- /dev/null +++ b/dependencies/pkg/mod/github.com/!vivid!cortex/ewma@v1.2.0/go.mod @@ -0,0 +1,3 @@ +module github.com/VividCortex/ewma + +go 1.12 diff --git a/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/LICENSE b/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/LICENSE new file mode 100644 index 0000000..00abe0d --- /dev/null +++ b/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Andrew Carlson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/README.md b/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/README.md new file mode 100644 index 0000000..8bdb1f5 --- /dev/null +++ b/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/README.md @@ -0,0 +1,30 @@ +Strip ANSI +========== + +This Go package removes ANSI escape codes from strings. + +Ideally, we would prevent these from appearing in any text we want to process. +However, sometimes this can't be helped, and we need to be able to deal with that noise. +This will use a regexp to remove those unwanted escape codes. + + +## Install + +```sh +$ go get -u github.com/acarl005/stripansi +``` + +## Usage + +```go +import ( + "fmt" + "github.com/acarl005/stripansi" +) + +func main() { + msg := "\x1b[38;5;140m foo\x1b[0m bar" + cleanMsg := stripansi.Strip(msg) + fmt.Println(cleanMsg) // " foo bar" +} +``` diff --git a/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/stripansi.go b/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/stripansi.go new file mode 100644 index 0000000..235732a --- /dev/null +++ b/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/stripansi.go @@ -0,0 +1,13 @@ +package stripansi + +import ( + "regexp" +) + +const ansi = "[\u001B\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))" + +var re = regexp.MustCompile(ansi) + +func Strip(str string) string { + return re.ReplaceAllString(str, "") +} diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/.github/workflows/test.yml b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/.github/workflows/test.yml new file mode 100644 index 0000000..606cf83 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Test + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + strategy: + matrix: + go-version: [1.16.x, 1.17.x] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + + steps: + - name: Install go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Check out code + uses: actions/checkout@v2 + + - name: Test + run: go test -count 1 -bench . -benchtime 1x ./... + + - name: Test with -tags purego + run: go test -count 1 -bench . -benchtime 1x -tags purego ./... + +# TODO: Test on other architectures. Unfortunately only amd64 is supported +# by GH Actions. We could use QEMU in the meantime. diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/LICENSE.txt b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/LICENSE.txt new file mode 100644 index 0000000..24b5306 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2016 Caleb Spare + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/README.md b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/README.md new file mode 100644 index 0000000..792b4a6 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/README.md @@ -0,0 +1,69 @@ +# xxhash + +[![Go Reference](https://pkg.go.dev/badge/github.com/cespare/xxhash/v2.svg)](https://pkg.go.dev/github.com/cespare/xxhash/v2) +[![Test](https://github.com/cespare/xxhash/actions/workflows/test.yml/badge.svg)](https://github.com/cespare/xxhash/actions/workflows/test.yml) + +xxhash is a Go implementation of the 64-bit +[xxHash](http://cyan4973.github.io/xxHash/) algorithm, XXH64. This is a +high-quality hashing algorithm that is much faster than anything in the Go +standard library. + +This package provides a straightforward API: + +``` +func Sum64(b []byte) uint64 +func Sum64String(s string) uint64 +type Digest struct{ ... } + func New() *Digest +``` + +The `Digest` type implements hash.Hash64. Its key methods are: + +``` +func (*Digest) Write([]byte) (int, error) +func (*Digest) WriteString(string) (int, error) +func (*Digest) Sum64() uint64 +``` + +This implementation provides a fast pure-Go implementation and an even faster +assembly implementation for amd64. + +## Compatibility + +This package is in a module and the latest code is in version 2 of the module. +You need a version of Go with at least "minimal module compatibility" to use +github.com/cespare/xxhash/v2: + +* 1.9.7+ for Go 1.9 +* 1.10.3+ for Go 1.10 +* Go 1.11 or later + +I recommend using the latest release of Go. + +## Benchmarks + +Here are some quick benchmarks comparing the pure-Go and assembly +implementations of Sum64. + +| input size | purego | asm | +| --- | --- | --- | +| 5 B | 979.66 MB/s | 1291.17 MB/s | +| 100 B | 7475.26 MB/s | 7973.40 MB/s | +| 4 KB | 17573.46 MB/s | 17602.65 MB/s | +| 10 MB | 17131.46 MB/s | 17142.16 MB/s | + +These numbers were generated on Ubuntu 18.04 with an Intel i7-8700K CPU using +the following commands under Go 1.11.2: + +``` +$ go test -tags purego -benchtime 10s -bench '/xxhash,direct,bytes' +$ go test -benchtime 10s -bench '/xxhash,direct,bytes' +``` + +## Projects using this package + +- [InfluxDB](https://github.com/influxdata/influxdb) +- [Prometheus](https://github.com/prometheus/prometheus) +- [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics) +- [FreeCache](https://github.com/coocood/freecache) +- [FastCache](https://github.com/VictoriaMetrics/fastcache) diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/bench_test.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/bench_test.go new file mode 100644 index 0000000..4dfeb91 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/bench_test.go @@ -0,0 +1,74 @@ +package xxhash + +import ( + "strings" + "testing" +) + +var benchmarks = []struct { + name string + n int64 +}{ + {"4B", 4}, + {"100B", 100}, + {"4KB", 4e3}, + {"10MB", 10e6}, +} + +func BenchmarkSum64(b *testing.B) { + for _, bb := range benchmarks { + in := make([]byte, bb.n) + for i := range in { + in[i] = byte(i) + } + b.Run(bb.name, func(b *testing.B) { + b.SetBytes(bb.n) + for i := 0; i < b.N; i++ { + _ = Sum64(in) + } + }) + } +} + +func BenchmarkSum64String(b *testing.B) { + for _, bb := range benchmarks { + s := strings.Repeat("a", int(bb.n)) + b.Run(bb.name, func(b *testing.B) { + b.SetBytes(bb.n) + for i := 0; i < b.N; i++ { + _ = Sum64String(s) + } + }) + } +} + +func BenchmarkDigestBytes(b *testing.B) { + for _, bb := range benchmarks { + in := make([]byte, bb.n) + for i := range in { + in[i] = byte(i) + } + b.Run(bb.name, func(b *testing.B) { + b.SetBytes(bb.n) + for i := 0; i < b.N; i++ { + h := New() + h.Write(in) + _ = h.Sum64() + } + }) + } +} + +func BenchmarkDigestString(b *testing.B) { + for _, bb := range benchmarks { + s := strings.Repeat("a", int(bb.n)) + b.Run(bb.name, func(b *testing.B) { + b.SetBytes(bb.n) + for i := 0; i < b.N; i++ { + h := New() + h.WriteString(s) + _ = h.Sum64() + } + }) + } +} diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/.gitignore b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/.gitignore new file mode 100644 index 0000000..8a84f19 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/.gitignore @@ -0,0 +1 @@ +/plugin.so diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/dynamic_test.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/dynamic_test.go new file mode 100644 index 0000000..c86bc93 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/dynamic_test.go @@ -0,0 +1,46 @@ +// +build linux darwin + +package main + +import ( + "bytes" + "log" + "os/exec" + "plugin" + "testing" +) + +// This is a cursory test that checks whether things work under dynamic linking. + +func TestMain(m *testing.M) { + cmd := exec.Command( + "go", "build", + "-buildmode", "plugin", + "-o", "plugin.so", + "plugin.go", + ) + var out bytes.Buffer + cmd.Stdout = &out + cmd.Stderr = &out + if err := cmd.Run(); err != nil { + log.Fatalf("Error building plugin: %s\nOutput:\n%s", err, out.String()) + } + m.Run() +} + +func TestDynamic(t *testing.T) { + plug, err := plugin.Open("plugin.so") + if err != nil { + t.Fatal(err) + } + for _, test := range []string{ + "TestSum", + "TestDigest", + } { + f, err := plug.Lookup(test) + if err != nil { + t.Fatalf("cannot find func %s: %s", test, err) + } + f.(func(*testing.T))(t) + } +} diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/plugin.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/plugin.go new file mode 100644 index 0000000..319ed71 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/dynamic/plugin.go @@ -0,0 +1,46 @@ +// +build ignore + +package main + +import ( + "fmt" + "log" + "testing" + + "github.com/cespare/xxhash/v2" +) + +const ( + in = "Call me Ishmael. Some years ago--never mind how long precisely-" + want = 0x02a2e85470d6fd96 +) + +func TestSum(t *testing.T) { + got := xxhash.Sum64String(in) + if got != want { + t.Fatalf("Sum64String: got 0x%x; want 0x%x", got, want) + } +} + +func TestDigest(t *testing.T) { + for chunkSize := 1; chunkSize <= len(in); chunkSize++ { + name := fmt.Sprintf("[chunkSize=%d]", chunkSize) + t.Run(name, func(t *testing.T) { + d := xxhash.New() + for i := 0; i < len(in); i += chunkSize { + chunk := in[i:] + if len(chunk) > chunkSize { + chunk = chunk[:chunkSize] + } + n, err := d.WriteString(chunk) + if err != nil || n != len(chunk) { + t.Fatalf("Digest.WriteString: got (%d, %v); want (%d, nil)", + n, err, len(chunk)) + } + } + if got := d.Sum64(); got != want { + log.Fatalf("Digest.Sum64: got 0x%x; want 0x%x", got, want) + } + }) + } +} diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/go.mod b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/go.mod new file mode 100644 index 0000000..49f6760 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/go.mod @@ -0,0 +1,3 @@ +module github.com/cespare/xxhash/v2 + +go 1.11 diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/go.sum b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/go.sum new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash.go new file mode 100644 index 0000000..15c835d --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash.go @@ -0,0 +1,235 @@ +// Package xxhash implements the 64-bit variant of xxHash (XXH64) as described +// at http://cyan4973.github.io/xxHash/. +package xxhash + +import ( + "encoding/binary" + "errors" + "math/bits" +) + +const ( + prime1 uint64 = 11400714785074694791 + prime2 uint64 = 14029467366897019727 + prime3 uint64 = 1609587929392839161 + prime4 uint64 = 9650029242287828579 + prime5 uint64 = 2870177450012600261 +) + +// NOTE(caleb): I'm using both consts and vars of the primes. Using consts where +// possible in the Go code is worth a small (but measurable) performance boost +// by avoiding some MOVQs. Vars are needed for the asm and also are useful for +// convenience in the Go code in a few places where we need to intentionally +// avoid constant arithmetic (e.g., v1 := prime1 + prime2 fails because the +// result overflows a uint64). +var ( + prime1v = prime1 + prime2v = prime2 + prime3v = prime3 + prime4v = prime4 + prime5v = prime5 +) + +// Digest implements hash.Hash64. +type Digest struct { + v1 uint64 + v2 uint64 + v3 uint64 + v4 uint64 + total uint64 + mem [32]byte + n int // how much of mem is used +} + +// New creates a new Digest that computes the 64-bit xxHash algorithm. +func New() *Digest { + var d Digest + d.Reset() + return &d +} + +// Reset clears the Digest's state so that it can be reused. +func (d *Digest) Reset() { + d.v1 = prime1v + prime2 + d.v2 = prime2 + d.v3 = 0 + d.v4 = -prime1v + d.total = 0 + d.n = 0 +} + +// Size always returns 8 bytes. +func (d *Digest) Size() int { return 8 } + +// BlockSize always returns 32 bytes. +func (d *Digest) BlockSize() int { return 32 } + +// Write adds more data to d. It always returns len(b), nil. +func (d *Digest) Write(b []byte) (n int, err error) { + n = len(b) + d.total += uint64(n) + + if d.n+n < 32 { + // This new data doesn't even fill the current block. + copy(d.mem[d.n:], b) + d.n += n + return + } + + if d.n > 0 { + // Finish off the partial block. + copy(d.mem[d.n:], b) + d.v1 = round(d.v1, u64(d.mem[0:8])) + d.v2 = round(d.v2, u64(d.mem[8:16])) + d.v3 = round(d.v3, u64(d.mem[16:24])) + d.v4 = round(d.v4, u64(d.mem[24:32])) + b = b[32-d.n:] + d.n = 0 + } + + if len(b) >= 32 { + // One or more full blocks left. + nw := writeBlocks(d, b) + b = b[nw:] + } + + // Store any remaining partial block. + copy(d.mem[:], b) + d.n = len(b) + + return +} + +// Sum appends the current hash to b and returns the resulting slice. +func (d *Digest) Sum(b []byte) []byte { + s := d.Sum64() + return append( + b, + byte(s>>56), + byte(s>>48), + byte(s>>40), + byte(s>>32), + byte(s>>24), + byte(s>>16), + byte(s>>8), + byte(s), + ) +} + +// Sum64 returns the current hash. +func (d *Digest) Sum64() uint64 { + var h uint64 + + if d.total >= 32 { + v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4 + h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4) + h = mergeRound(h, v1) + h = mergeRound(h, v2) + h = mergeRound(h, v3) + h = mergeRound(h, v4) + } else { + h = d.v3 + prime5 + } + + h += d.total + + i, end := 0, d.n + for ; i+8 <= end; i += 8 { + k1 := round(0, u64(d.mem[i:i+8])) + h ^= k1 + h = rol27(h)*prime1 + prime4 + } + if i+4 <= end { + h ^= uint64(u32(d.mem[i:i+4])) * prime1 + h = rol23(h)*prime2 + prime3 + i += 4 + } + for i < end { + h ^= uint64(d.mem[i]) * prime5 + h = rol11(h) * prime1 + i++ + } + + h ^= h >> 33 + h *= prime2 + h ^= h >> 29 + h *= prime3 + h ^= h >> 32 + + return h +} + +const ( + magic = "xxh\x06" + marshaledSize = len(magic) + 8*5 + 32 +) + +// MarshalBinary implements the encoding.BinaryMarshaler interface. +func (d *Digest) MarshalBinary() ([]byte, error) { + b := make([]byte, 0, marshaledSize) + b = append(b, magic...) + b = appendUint64(b, d.v1) + b = appendUint64(b, d.v2) + b = appendUint64(b, d.v3) + b = appendUint64(b, d.v4) + b = appendUint64(b, d.total) + b = append(b, d.mem[:d.n]...) + b = b[:len(b)+len(d.mem)-d.n] + return b, nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. +func (d *Digest) UnmarshalBinary(b []byte) error { + if len(b) < len(magic) || string(b[:len(magic)]) != magic { + return errors.New("xxhash: invalid hash state identifier") + } + if len(b) != marshaledSize { + return errors.New("xxhash: invalid hash state size") + } + b = b[len(magic):] + b, d.v1 = consumeUint64(b) + b, d.v2 = consumeUint64(b) + b, d.v3 = consumeUint64(b) + b, d.v4 = consumeUint64(b) + b, d.total = consumeUint64(b) + copy(d.mem[:], b) + d.n = int(d.total % uint64(len(d.mem))) + return nil +} + +func appendUint64(b []byte, x uint64) []byte { + var a [8]byte + binary.LittleEndian.PutUint64(a[:], x) + return append(b, a[:]...) +} + +func consumeUint64(b []byte) ([]byte, uint64) { + x := u64(b) + return b[8:], x +} + +func u64(b []byte) uint64 { return binary.LittleEndian.Uint64(b) } +func u32(b []byte) uint32 { return binary.LittleEndian.Uint32(b) } + +func round(acc, input uint64) uint64 { + acc += input * prime2 + acc = rol31(acc) + acc *= prime1 + return acc +} + +func mergeRound(acc, val uint64) uint64 { + val = round(0, val) + acc ^= val + acc = acc*prime1 + prime4 + return acc +} + +func rol1(x uint64) uint64 { return bits.RotateLeft64(x, 1) } +func rol7(x uint64) uint64 { return bits.RotateLeft64(x, 7) } +func rol11(x uint64) uint64 { return bits.RotateLeft64(x, 11) } +func rol12(x uint64) uint64 { return bits.RotateLeft64(x, 12) } +func rol18(x uint64) uint64 { return bits.RotateLeft64(x, 18) } +func rol23(x uint64) uint64 { return bits.RotateLeft64(x, 23) } +func rol27(x uint64) uint64 { return bits.RotateLeft64(x, 27) } +func rol31(x uint64) uint64 { return bits.RotateLeft64(x, 31) } diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_amd64.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_amd64.go new file mode 100644 index 0000000..ad14b80 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_amd64.go @@ -0,0 +1,13 @@ +// +build !appengine +// +build gc +// +build !purego + +package xxhash + +// Sum64 computes the 64-bit xxHash digest of b. +// +//go:noescape +func Sum64(b []byte) uint64 + +//go:noescape +func writeBlocks(d *Digest, b []byte) int diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_amd64.s b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_amd64.s new file mode 100644 index 0000000..be8db5b --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_amd64.s @@ -0,0 +1,215 @@ +// +build !appengine +// +build gc +// +build !purego + +#include "textflag.h" + +// Register allocation: +// AX h +// SI pointer to advance through b +// DX n +// BX loop end +// R8 v1, k1 +// R9 v2 +// R10 v3 +// R11 v4 +// R12 tmp +// R13 prime1v +// R14 prime2v +// DI prime4v + +// round reads from and advances the buffer pointer in SI. +// It assumes that R13 has prime1v and R14 has prime2v. +#define round(r) \ + MOVQ (SI), R12 \ + ADDQ $8, SI \ + IMULQ R14, R12 \ + ADDQ R12, r \ + ROLQ $31, r \ + IMULQ R13, r + +// mergeRound applies a merge round on the two registers acc and val. +// It assumes that R13 has prime1v, R14 has prime2v, and DI has prime4v. +#define mergeRound(acc, val) \ + IMULQ R14, val \ + ROLQ $31, val \ + IMULQ R13, val \ + XORQ val, acc \ + IMULQ R13, acc \ + ADDQ DI, acc + +// func Sum64(b []byte) uint64 +TEXT ·Sum64(SB), NOSPLIT, $0-32 + // Load fixed primes. + MOVQ ·prime1v(SB), R13 + MOVQ ·prime2v(SB), R14 + MOVQ ·prime4v(SB), DI + + // Load slice. + MOVQ b_base+0(FP), SI + MOVQ b_len+8(FP), DX + LEAQ (SI)(DX*1), BX + + // The first loop limit will be len(b)-32. + SUBQ $32, BX + + // Check whether we have at least one block. + CMPQ DX, $32 + JLT noBlocks + + // Set up initial state (v1, v2, v3, v4). + MOVQ R13, R8 + ADDQ R14, R8 + MOVQ R14, R9 + XORQ R10, R10 + XORQ R11, R11 + SUBQ R13, R11 + + // Loop until SI > BX. +blockLoop: + round(R8) + round(R9) + round(R10) + round(R11) + + CMPQ SI, BX + JLE blockLoop + + MOVQ R8, AX + ROLQ $1, AX + MOVQ R9, R12 + ROLQ $7, R12 + ADDQ R12, AX + MOVQ R10, R12 + ROLQ $12, R12 + ADDQ R12, AX + MOVQ R11, R12 + ROLQ $18, R12 + ADDQ R12, AX + + mergeRound(AX, R8) + mergeRound(AX, R9) + mergeRound(AX, R10) + mergeRound(AX, R11) + + JMP afterBlocks + +noBlocks: + MOVQ ·prime5v(SB), AX + +afterBlocks: + ADDQ DX, AX + + // Right now BX has len(b)-32, and we want to loop until SI > len(b)-8. + ADDQ $24, BX + + CMPQ SI, BX + JG fourByte + +wordLoop: + // Calculate k1. + MOVQ (SI), R8 + ADDQ $8, SI + IMULQ R14, R8 + ROLQ $31, R8 + IMULQ R13, R8 + + XORQ R8, AX + ROLQ $27, AX + IMULQ R13, AX + ADDQ DI, AX + + CMPQ SI, BX + JLE wordLoop + +fourByte: + ADDQ $4, BX + CMPQ SI, BX + JG singles + + MOVL (SI), R8 + ADDQ $4, SI + IMULQ R13, R8 + XORQ R8, AX + + ROLQ $23, AX + IMULQ R14, AX + ADDQ ·prime3v(SB), AX + +singles: + ADDQ $4, BX + CMPQ SI, BX + JGE finalize + +singlesLoop: + MOVBQZX (SI), R12 + ADDQ $1, SI + IMULQ ·prime5v(SB), R12 + XORQ R12, AX + + ROLQ $11, AX + IMULQ R13, AX + + CMPQ SI, BX + JL singlesLoop + +finalize: + MOVQ AX, R12 + SHRQ $33, R12 + XORQ R12, AX + IMULQ R14, AX + MOVQ AX, R12 + SHRQ $29, R12 + XORQ R12, AX + IMULQ ·prime3v(SB), AX + MOVQ AX, R12 + SHRQ $32, R12 + XORQ R12, AX + + MOVQ AX, ret+24(FP) + RET + +// writeBlocks uses the same registers as above except that it uses AX to store +// the d pointer. + +// func writeBlocks(d *Digest, b []byte) int +TEXT ·writeBlocks(SB), NOSPLIT, $0-40 + // Load fixed primes needed for round. + MOVQ ·prime1v(SB), R13 + MOVQ ·prime2v(SB), R14 + + // Load slice. + MOVQ b_base+8(FP), SI + MOVQ b_len+16(FP), DX + LEAQ (SI)(DX*1), BX + SUBQ $32, BX + + // Load vN from d. + MOVQ d+0(FP), AX + MOVQ 0(AX), R8 // v1 + MOVQ 8(AX), R9 // v2 + MOVQ 16(AX), R10 // v3 + MOVQ 24(AX), R11 // v4 + + // We don't need to check the loop condition here; this function is + // always called with at least one block of data to process. +blockLoop: + round(R8) + round(R9) + round(R10) + round(R11) + + CMPQ SI, BX + JLE blockLoop + + // Copy vN back to d. + MOVQ R8, 0(AX) + MOVQ R9, 8(AX) + MOVQ R10, 16(AX) + MOVQ R11, 24(AX) + + // The number of bytes written is SI minus the old base pointer. + SUBQ b_base+8(FP), SI + MOVQ SI, ret+32(FP) + + RET diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_other.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_other.go new file mode 100644 index 0000000..4a5a821 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_other.go @@ -0,0 +1,76 @@ +// +build !amd64 appengine !gc purego + +package xxhash + +// Sum64 computes the 64-bit xxHash digest of b. +func Sum64(b []byte) uint64 { + // A simpler version would be + // d := New() + // d.Write(b) + // return d.Sum64() + // but this is faster, particularly for small inputs. + + n := len(b) + var h uint64 + + if n >= 32 { + v1 := prime1v + prime2 + v2 := prime2 + v3 := uint64(0) + v4 := -prime1v + for len(b) >= 32 { + v1 = round(v1, u64(b[0:8:len(b)])) + v2 = round(v2, u64(b[8:16:len(b)])) + v3 = round(v3, u64(b[16:24:len(b)])) + v4 = round(v4, u64(b[24:32:len(b)])) + b = b[32:len(b):len(b)] + } + h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4) + h = mergeRound(h, v1) + h = mergeRound(h, v2) + h = mergeRound(h, v3) + h = mergeRound(h, v4) + } else { + h = prime5 + } + + h += uint64(n) + + i, end := 0, len(b) + for ; i+8 <= end; i += 8 { + k1 := round(0, u64(b[i:i+8:len(b)])) + h ^= k1 + h = rol27(h)*prime1 + prime4 + } + if i+4 <= end { + h ^= uint64(u32(b[i:i+4:len(b)])) * prime1 + h = rol23(h)*prime2 + prime3 + i += 4 + } + for ; i < end; i++ { + h ^= uint64(b[i]) * prime5 + h = rol11(h) * prime1 + } + + h ^= h >> 33 + h *= prime2 + h ^= h >> 29 + h *= prime3 + h ^= h >> 32 + + return h +} + +func writeBlocks(d *Digest, b []byte) int { + v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4 + n := len(b) + for len(b) >= 32 { + v1 = round(v1, u64(b[0:8:len(b)])) + v2 = round(v2, u64(b[8:16:len(b)])) + v3 = round(v3, u64(b[16:24:len(b)])) + v4 = round(v4, u64(b[24:32:len(b)])) + b = b[32:len(b):len(b)] + } + d.v1, d.v2, d.v3, d.v4 = v1, v2, v3, v4 + return n - len(b) +} diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_safe.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_safe.go new file mode 100644 index 0000000..fc9bea7 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_safe.go @@ -0,0 +1,15 @@ +// +build appengine + +// This file contains the safe implementations of otherwise unsafe-using code. + +package xxhash + +// Sum64String computes the 64-bit xxHash digest of s. +func Sum64String(s string) uint64 { + return Sum64([]byte(s)) +} + +// WriteString adds more data to d. It always returns len(s), nil. +func (d *Digest) WriteString(s string) (n int, err error) { + return d.Write([]byte(s)) +} diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_test.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_test.go new file mode 100644 index 0000000..6330f19 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_test.go @@ -0,0 +1,166 @@ +package xxhash + +import ( + "bytes" + "encoding/binary" + "fmt" + "strings" + "testing" +) + +func TestAll(t *testing.T) { + for _, tt := range []struct { + name string + input string + want uint64 + }{ + {"empty", "", 0xef46db3751d8e999}, + {"a", "a", 0xd24ec4f1a98c6e5b}, + {"as", "as", 0x1c330fb2d66be179}, + {"asd", "asd", 0x631c37ce72a97393}, + {"asdf", "asdf", 0x415872f599cea71e}, + { + "len=63", + // Exactly 63 characters, which exercises all code paths. + "Call me Ishmael. Some years ago--never mind how long precisely-", + 0x02a2e85470d6fd96, + }, + } { + lastChunkSize := len(tt.input) + if lastChunkSize == 0 { + lastChunkSize = 1 + } + for chunkSize := 1; chunkSize <= lastChunkSize; chunkSize++ { + name := fmt.Sprintf("%s,chunkSize=%d", tt.name, chunkSize) + t.Run(name, func(t *testing.T) { + testDigest(t, tt.input, chunkSize, tt.want) + }) + } + t.Run(tt.name, func(t *testing.T) { testSum(t, tt.input, tt.want) }) + } +} + +func testDigest(t *testing.T, input string, chunkSize int, want uint64) { + d := New() + ds := New() // uses WriteString + for i := 0; i < len(input); i += chunkSize { + chunk := input[i:] + if len(chunk) > chunkSize { + chunk = chunk[:chunkSize] + } + n, err := d.Write([]byte(chunk)) + if err != nil || n != len(chunk) { + t.Fatalf("Digest.Write: got (%d, %v); want (%d, nil)", n, err, len(chunk)) + } + n, err = ds.WriteString(chunk) + if err != nil || n != len(chunk) { + t.Fatalf("Digest.WriteString: got (%d, %v); want (%d, nil)", n, err, len(chunk)) + } + } + if got := d.Sum64(); got != want { + t.Fatalf("Digest.Sum64: got 0x%x; want 0x%x", got, want) + } + if got := ds.Sum64(); got != want { + t.Fatalf("Digest.Sum64 (WriteString): got 0x%x; want 0x%x", got, want) + } + var b [8]byte + binary.BigEndian.PutUint64(b[:], want) + if got := d.Sum(nil); !bytes.Equal(got, b[:]) { + t.Fatalf("Sum: got %v; want %v", got, b[:]) + } +} + +func testSum(t *testing.T, input string, want uint64) { + if got := Sum64([]byte(input)); got != want { + t.Fatalf("Sum64: got 0x%x; want 0x%x", got, want) + } + if got := Sum64String(input); got != want { + t.Fatalf("Sum64String: got 0x%x; want 0x%x", got, want) + } +} + +func TestReset(t *testing.T) { + parts := []string{"The quic", "k br", "o", "wn fox jumps", " ov", "er the lazy ", "dog."} + d := New() + for _, part := range parts { + d.Write([]byte(part)) + } + h0 := d.Sum64() + + d.Reset() + d.Write([]byte(strings.Join(parts, ""))) + h1 := d.Sum64() + + if h0 != h1 { + t.Errorf("0x%x != 0x%x", h0, h1) + } +} + +func TestBinaryMarshaling(t *testing.T) { + d := New() + d.WriteString("abc") + b, err := d.MarshalBinary() + if err != nil { + t.Fatal(err) + } + d = New() + d.WriteString("junk") + if err := d.UnmarshalBinary(b); err != nil { + t.Fatal(err) + } + d.WriteString("def") + if got, want := d.Sum64(), Sum64String("abcdef"); got != want { + t.Fatalf("after MarshalBinary+UnmarshalBinary, got 0x%x; want 0x%x", got, want) + } + + d0 := New() + d1 := New() + for i := 0; i < 64; i++ { + b, err := d0.MarshalBinary() + if err != nil { + t.Fatal(err) + } + d0 = new(Digest) + if err := d0.UnmarshalBinary(b); err != nil { + t.Fatal(err) + } + if got, want := d0.Sum64(), d1.Sum64(); got != want { + t.Fatalf("after %d Writes, unmarshaled Digest gave sum 0x%x; want 0x%x", i, got, want) + } + + d0.Write([]byte{'a'}) + d1.Write([]byte{'a'}) + } +} + +var sink uint64 + +func TestAllocs(t *testing.T) { + const shortStr = "abcdefghijklmnop" + // Sum64([]byte(shortString)) shouldn't allocate because the + // intermediate []byte ought not to escape. + // (See https://github.com/cespare/xxhash/pull/2.) + t.Run("Sum64", func(t *testing.T) { + testAllocs(t, func() { + sink = Sum64([]byte(shortStr)) + }) + }) + // Creating and using a Digest shouldn't allocate because its methods + // shouldn't make it escape. (A previous version of New returned a + // hash.Hash64 which forces an allocation.) + t.Run("Digest", func(t *testing.T) { + b := []byte("asdf") + testAllocs(t, func() { + d := New() + d.Write(b) + sink = d.Sum64() + }) + }) +} + +func testAllocs(t *testing.T, fn func()) { + t.Helper() + if allocs := int(testing.AllocsPerRun(10, fn)); allocs > 0 { + t.Fatalf("got %d allocation(s) (want zero)", allocs) + } +} diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_unsafe.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_unsafe.go new file mode 100644 index 0000000..376e0ca --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_unsafe.go @@ -0,0 +1,57 @@ +// +build !appengine + +// This file encapsulates usage of unsafe. +// xxhash_safe.go contains the safe implementations. + +package xxhash + +import ( + "unsafe" +) + +// In the future it's possible that compiler optimizations will make these +// XxxString functions unnecessary by realizing that calls such as +// Sum64([]byte(s)) don't need to copy s. See https://golang.org/issue/2205. +// If that happens, even if we keep these functions they can be replaced with +// the trivial safe code. + +// NOTE: The usual way of doing an unsafe string-to-[]byte conversion is: +// +// var b []byte +// bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) +// bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data +// bh.Len = len(s) +// bh.Cap = len(s) +// +// Unfortunately, as of Go 1.15.3 the inliner's cost model assigns a high enough +// weight to this sequence of expressions that any function that uses it will +// not be inlined. Instead, the functions below use a different unsafe +// conversion designed to minimize the inliner weight and allow both to be +// inlined. There is also a test (TestInlining) which verifies that these are +// inlined. +// +// See https://github.com/golang/go/issues/42739 for discussion. + +// Sum64String computes the 64-bit xxHash digest of s. +// It may be faster than Sum64([]byte(s)) by avoiding a copy. +func Sum64String(s string) uint64 { + b := *(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)})) + return Sum64(b) +} + +// WriteString adds more data to d. It always returns len(s), nil. +// It may be faster than Write([]byte(s)) by avoiding a copy. +func (d *Digest) WriteString(s string) (n int, err error) { + d.Write(*(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)}))) + // d.Write always returns len(s), nil. + // Ignoring the return output and returning these fixed values buys a + // savings of 6 in the inliner's cost model. + return len(s), nil +} + +// sliceHeader is similar to reflect.SliceHeader, but it assumes that the layout +// of the first two words is the same as the layout of a string. +type sliceHeader struct { + s string + cap int +} diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_unsafe_test.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_unsafe_test.go new file mode 100644 index 0000000..6598267 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhash_unsafe_test.go @@ -0,0 +1,61 @@ +// +build !appengine + +package xxhash + +import ( + "os/exec" + "sort" + "strings" + "testing" +) + +func TestStringAllocs(t *testing.T) { + longStr := strings.Repeat("a", 1000) + t.Run("Sum64String", func(t *testing.T) { + testAllocs(t, func() { + sink = Sum64String(longStr) + }) + }) + t.Run("Digest.WriteString", func(t *testing.T) { + testAllocs(t, func() { + d := New() + d.WriteString(longStr) + sink = d.Sum64() + }) + }) +} + +// This test is inspired by the Go runtime tests in https://golang.org/cl/57410. +// It asserts that certain important functions may be inlined. +func TestInlining(t *testing.T) { + funcs := map[string]struct{}{ + "Sum64String": {}, + "(*Digest).WriteString": {}, + } + + // TODO: it would be better to use the go binary that is running + // 'go test' (if we are running under 'go test'). + cmd := exec.Command("go", "test", "-gcflags=-m", "-run", "xxxx") + out, err := cmd.CombinedOutput() + if err != nil { + t.Log(string(out)) + t.Fatal(err) + } + + for _, line := range strings.Split(string(out), "\n") { + parts := strings.Split(line, ": can inline") + if len(parts) < 2 { + continue + } + delete(funcs, strings.TrimSpace(parts[1])) + } + + var failed []string + for fn := range funcs { + failed = append(failed, fn) + } + sort.Strings(failed) + for _, fn := range failed { + t.Errorf("function %s not inlined", fn) + } +} diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhsum/.gitignore b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhsum/.gitignore new file mode 100644 index 0000000..2c88f1d --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhsum/.gitignore @@ -0,0 +1 @@ +/xxhsum diff --git a/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhsum/xxhsum.go b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhsum/xxhsum.go new file mode 100644 index 0000000..9b1d035 --- /dev/null +++ b/dependencies/pkg/mod/github.com/cespare/xxhash/v2@v2.1.2/xxhsum/xxhsum.go @@ -0,0 +1,50 @@ +package main + +import ( + "fmt" + "io" + "os" + + "github.com/cespare/xxhash/v2" +) + +func main() { + if contains(os.Args[1:], "-h") { + fmt.Fprintf(os.Stderr, `Usage: + %s [filenames] +If no filenames are provided or only - is given, input is read from stdin. +`, os.Args[0]) + os.Exit(1) + } + if len(os.Args) < 2 || len(os.Args) == 2 && os.Args[1] == "-" { + printHash(os.Stdin, "-") + return + } + for _, path := range os.Args[1:] { + f, err := os.Open(path) + if err != nil { + fmt.Fprintln(os.Stderr, err) + continue + } + printHash(f, path) + f.Close() + } +} + +func contains(ss []string, s string) bool { + for _, s1 := range ss { + if s1 == s { + return true + } + } + return false +} + +func printHash(r io.Reader, name string) { + h := xxhash.New() + if _, err := io.Copy(h, r); err != nil { + fmt.Fprintln(os.Stderr, err) + return + } + fmt.Printf("%016x %s\n", h.Sum64(), name) +} diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/.circleci/config.yml b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/.circleci/config.yml new file mode 100644 index 0000000..1ad2fc9 --- /dev/null +++ b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/.circleci/config.yml @@ -0,0 +1,26 @@ +version: 2.1 + +jobs: + build: + working_directory: ~/repo + docker: + - image: circleci/golang:1.15.8 + steps: + - checkout + - restore_cache: + keys: + - go-mod-v4-{{ checksum "go.sum" }} + - run: + name: Install Dependencies + command: go mod download + - save_cache: + key: go-mod-v4-{{ checksum "go.sum" }} + paths: + - "/go/pkg/mod" + - run: go get -u golang.org/x/lint/golint + - run: + name: Run tests + command: make ci-test + - run: + name: Upload coverage report + command: bash <(curl -s https://codecov.io/bash) diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/.gitignore b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/LICENSE b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/LICENSE new file mode 100644 index 0000000..1483dd2 --- /dev/null +++ b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2017-present Yuki Iwanaga + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/Makefile b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/Makefile new file mode 100644 index 0000000..bd42d46 --- /dev/null +++ b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/Makefile @@ -0,0 +1,30 @@ +SHELL := /bin/bash -eu -o pipefail + +GO_TEST_FLAGS := -v + +PACKAGE_DIRS := $(shell go list ./... 2> /dev/null | grep -v /vendor/) +SRC_FILES := $(shell find . -name '*.go' -not -path './vendor/*') + + +# Tasks +#----------------------------------------------- +.PHONY: lint +lint: + @gofmt -e -d -s $(SRC_FILES) | awk '{ e = 1; print $0 } END { if (e) exit(1) }' + @echo $(SRC_FILES) | xargs -n1 golint -set_exit_status + @go vet $(PACKAGE_DIRS) + +.PHONY: test +test: lint + @go test $(GO_TEST_FLAGS) $(PACKAGE_DIRS) + +.PHONY: ci-test +ci-test: lint + @echo > coverage.txt + @for d in $(PACKAGE_DIRS); do \ + go test -coverprofile=profile.out -covermode=atomic -race -v $$d; \ + if [ -f profile.out ]; then \ + cat profile.out >> coverage.txt; \ + rm profile.out; \ + fi; \ + done diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/README.md b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/README.md new file mode 100644 index 0000000..de1ca3d --- /dev/null +++ b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/README.md @@ -0,0 +1,73 @@ +defaults +======== + +[![CircleCI](https://circleci.com/gh/creasty/defaults/tree/master.svg?style=svg)](https://circleci.com/gh/creasty/defaults/tree/master) +[![codecov](https://codecov.io/gh/creasty/defaults/branch/master/graph/badge.svg)](https://codecov.io/gh/creasty/defaults) +[![GitHub release](https://img.shields.io/github/release/creasty/defaults.svg)](https://github.com/creasty/defaults/releases) +[![License](https://img.shields.io/github/license/creasty/defaults.svg)](./LICENSE) + +Initialize structs with default values + +- Supports almost all kind of types + - Scalar types + - `int/8/16/32/64`, `uint/8/16/32/64`, `float32/64` + - `uintptr`, `bool`, `string` + - Complex types + - `map`, `slice`, `struct` + - Aliased types + - `time.Duration` + - e.g., `type Enum string` + - Pointer types + - e.g., `*SampleStruct`, `*int` +- Recursively initializes fields in a struct +- Dynamically sets default values by [`defaults.Setter`](./setter.go) interface +- Preserves non-initial values from being reset with a default value + + +Usage +----- + +```go +type Gender string + +type Sample struct { + Name string `default:"John Smith"` + Age int `default:"27"` + Gender Gender `default:"m"` + + Slice []string `default:"[]"` + SliceByJSON []int `default:"[1, 2, 3]"` // Supports JSON + + Map map[string]int `default:"{}"` + MapByJSON map[string]int `default:"{\"foo\": 123}"` + MapOfStruct map[string]OtherStruct + MapOfPtrStruct map[string]*OtherStruct + MapOfStructWithTag map[string]OtherStruct `default:"{\"Key1\": {\"Foo\":123}}"` + + Struct OtherStruct `default:"{}"` + StructPtr *OtherStruct `default:"{\"Foo\": 123}"` + + NoTag OtherStruct // Recurses into a nested struct by default + OptOut OtherStruct `default:"-"` // Opt-out +} + +type OtherStruct struct { + Hello string `default:"world"` // Tags in a nested struct also work + Foo int `default:"-"` + Random int `default:"-"` +} + +// SetDefaults implements defaults.Setter interface +func (s *OtherStruct) SetDefaults() { + if defaults.CanUpdate(s.Random) { // Check if it's a zero value (recommended) + s.Random = rand.Int() // Set a dynamic value + } +} +``` + +```go +obj := &Sample{} +if err := defaults.Set(obj); err != nil { + panic(err) +} +``` diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/defaults.go b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/defaults.go new file mode 100644 index 0000000..3bb2c22 --- /dev/null +++ b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/defaults.go @@ -0,0 +1,221 @@ +package defaults + +import ( + "encoding/json" + "errors" + "reflect" + "strconv" + "time" +) + +var ( + errInvalidType = errors.New("not a struct pointer") +) + +const ( + fieldName = "default" +) + +// Set initializes members in a struct referenced by a pointer. +// Maps and slices are initialized by `make` and other primitive types are set with default values. +// `ptr` should be a struct pointer +func Set(ptr interface{}) error { + if reflect.TypeOf(ptr).Kind() != reflect.Ptr { + return errInvalidType + } + + v := reflect.ValueOf(ptr).Elem() + t := v.Type() + + if t.Kind() != reflect.Struct { + return errInvalidType + } + + for i := 0; i < t.NumField(); i++ { + if defaultVal := t.Field(i).Tag.Get(fieldName); defaultVal != "-" { + if err := setField(v.Field(i), defaultVal); err != nil { + return err + } + } + } + callSetter(ptr) + return nil +} + +// MustSet function is a wrapper of Set function +// It will call Set and panic if err not equals nil. +func MustSet(ptr interface{}) { + if err := Set(ptr); err != nil { + panic(err) + } +} + +func setField(field reflect.Value, defaultVal string) error { + if !field.CanSet() { + return nil + } + + if !shouldInitializeField(field, defaultVal) { + return nil + } + + isInitial := isInitialValue(field) + if isInitial { + switch field.Kind() { + case reflect.Bool: + if val, err := strconv.ParseBool(defaultVal); err == nil { + field.Set(reflect.ValueOf(val).Convert(field.Type())) + } + case reflect.Int: + if val, err := strconv.ParseInt(defaultVal, 0, strconv.IntSize); err == nil { + field.Set(reflect.ValueOf(int(val)).Convert(field.Type())) + } + case reflect.Int8: + if val, err := strconv.ParseInt(defaultVal, 0, 8); err == nil { + field.Set(reflect.ValueOf(int8(val)).Convert(field.Type())) + } + case reflect.Int16: + if val, err := strconv.ParseInt(defaultVal, 0, 16); err == nil { + field.Set(reflect.ValueOf(int16(val)).Convert(field.Type())) + } + case reflect.Int32: + if val, err := strconv.ParseInt(defaultVal, 0, 32); err == nil { + field.Set(reflect.ValueOf(int32(val)).Convert(field.Type())) + } + case reflect.Int64: + if val, err := time.ParseDuration(defaultVal); err == nil { + field.Set(reflect.ValueOf(val).Convert(field.Type())) + } else if val, err := strconv.ParseInt(defaultVal, 0, 64); err == nil { + field.Set(reflect.ValueOf(val).Convert(field.Type())) + } + case reflect.Uint: + if val, err := strconv.ParseUint(defaultVal, 0, strconv.IntSize); err == nil { + field.Set(reflect.ValueOf(uint(val)).Convert(field.Type())) + } + case reflect.Uint8: + if val, err := strconv.ParseUint(defaultVal, 0, 8); err == nil { + field.Set(reflect.ValueOf(uint8(val)).Convert(field.Type())) + } + case reflect.Uint16: + if val, err := strconv.ParseUint(defaultVal, 0, 16); err == nil { + field.Set(reflect.ValueOf(uint16(val)).Convert(field.Type())) + } + case reflect.Uint32: + if val, err := strconv.ParseUint(defaultVal, 0, 32); err == nil { + field.Set(reflect.ValueOf(uint32(val)).Convert(field.Type())) + } + case reflect.Uint64: + if val, err := strconv.ParseUint(defaultVal, 0, 64); err == nil { + field.Set(reflect.ValueOf(val).Convert(field.Type())) + } + case reflect.Uintptr: + if val, err := strconv.ParseUint(defaultVal, 0, strconv.IntSize); err == nil { + field.Set(reflect.ValueOf(uintptr(val)).Convert(field.Type())) + } + case reflect.Float32: + if val, err := strconv.ParseFloat(defaultVal, 32); err == nil { + field.Set(reflect.ValueOf(float32(val)).Convert(field.Type())) + } + case reflect.Float64: + if val, err := strconv.ParseFloat(defaultVal, 64); err == nil { + field.Set(reflect.ValueOf(val).Convert(field.Type())) + } + case reflect.String: + field.Set(reflect.ValueOf(defaultVal).Convert(field.Type())) + + case reflect.Slice: + ref := reflect.New(field.Type()) + ref.Elem().Set(reflect.MakeSlice(field.Type(), 0, 0)) + if defaultVal != "" && defaultVal != "[]" { + if err := json.Unmarshal([]byte(defaultVal), ref.Interface()); err != nil { + return err + } + } + field.Set(ref.Elem().Convert(field.Type())) + case reflect.Map: + ref := reflect.New(field.Type()) + ref.Elem().Set(reflect.MakeMap(field.Type())) + if defaultVal != "" && defaultVal != "{}" { + if err := json.Unmarshal([]byte(defaultVal), ref.Interface()); err != nil { + return err + } + } + field.Set(ref.Elem().Convert(field.Type())) + case reflect.Struct: + if defaultVal != "" && defaultVal != "{}" { + if err := json.Unmarshal([]byte(defaultVal), field.Addr().Interface()); err != nil { + return err + } + } + case reflect.Ptr: + field.Set(reflect.New(field.Type().Elem())) + } + } + + switch field.Kind() { + case reflect.Ptr: + if isInitial || field.Elem().Kind() == reflect.Struct { + setField(field.Elem(), defaultVal) + callSetter(field.Interface()) + } + case reflect.Struct: + if err := Set(field.Addr().Interface()); err != nil { + return err + } + case reflect.Slice: + for j := 0; j < field.Len(); j++ { + if err := setField(field.Index(j), defaultVal); err != nil { + return err + } + } + case reflect.Map: + for _, e := range field.MapKeys() { + var v = field.MapIndex(e) + + switch v.Kind() { + case reflect.Ptr: + switch v.Elem().Kind() { + case reflect.Struct, reflect.Slice, reflect.Map: + if err := setField(v.Elem(), ""); err != nil { + return err + } + } + case reflect.Struct, reflect.Slice, reflect.Map: + ref := reflect.New(v.Type()) + ref.Elem().Set(v) + if err := setField(ref.Elem(), ""); err != nil { + return err + } + field.SetMapIndex(e, ref.Elem().Convert(v.Type())) + } + } + } + + return nil +} + +func isInitialValue(field reflect.Value) bool { + return reflect.DeepEqual(reflect.Zero(field.Type()).Interface(), field.Interface()) +} + +func shouldInitializeField(field reflect.Value, tag string) bool { + switch field.Kind() { + case reflect.Struct: + return true + case reflect.Ptr: + if !field.IsNil() && field.Elem().Kind() == reflect.Struct { + return true + } + case reflect.Slice: + return field.Len() > 0 || tag != "" + case reflect.Map: + return field.Len() > 0 || tag != "" + } + + return tag != "" +} + +// CanUpdate returns true when the given value is an initial value of its type +func CanUpdate(v interface{}) bool { + return isInitialValue(reflect.ValueOf(v)) +} diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/defaults_test.go b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/defaults_test.go new file mode 100644 index 0000000..5bfba7b --- /dev/null +++ b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/defaults_test.go @@ -0,0 +1,722 @@ +package defaults + +import ( + "reflect" + "testing" + "time" + + "github.com/creasty/defaults/internal/fixture" +) + +type ( + MyInt int + MyInt8 int8 + MyInt16 int16 + MyInt32 int32 + MyInt64 int64 + MyUint uint + MyUint8 uint8 + MyUint16 uint16 + MyUint32 uint32 + MyUint64 uint64 + MyUintptr uintptr + MyFloat32 float32 + MyFloat64 float64 + MyBool bool + MyString string + MyMap map[string]int + MySlice []int +) + +type Sample struct { + Int int `default:"1"` + Int8 int8 `default:"8"` + Int16 int16 `default:"16"` + Int32 int32 `default:"32"` + Int64 int64 `default:"64"` + Uint uint `default:"1"` + Uint8 uint8 `default:"8"` + Uint16 uint16 `default:"16"` + Uint32 uint32 `default:"32"` + Uint64 uint64 `default:"64"` + Uintptr uintptr `default:"1"` + Float32 float32 `default:"1.32"` + Float64 float64 `default:"1.64"` + BoolTrue bool `default:"true"` + BoolFalse bool `default:"false"` + String string `default:"hello"` + Duration time.Duration `default:"10s"` + + IntOct int `default:"0o1"` + Int8Oct int8 `default:"0o10"` + Int16Oct int16 `default:"0o20"` + Int32Oct int32 `default:"0o40"` + Int64Oct int64 `default:"0o100"` + UintOct uint `default:"0o1"` + Uint8Oct uint8 `default:"0o10"` + Uint16Oct uint16 `default:"0o20"` + Uint32Oct uint32 `default:"0o40"` + Uint64Oct uint64 `default:"0o100"` + + IntHex int `default:"0x1"` + Int8Hex int8 `default:"0x8"` + Int16Hex int16 `default:"0x10"` + Int32Hex int32 `default:"0x20"` + Int64Hex int64 `default:"0x40"` + UintHex uint `default:"0x1"` + Uint8Hex uint8 `default:"0x8"` + Uint16Hex uint16 `default:"0x10"` + Uint32Hex uint32 `default:"0x20"` + Uint64Hex uint64 `default:"0x40"` + + IntBin int `default:"0b1"` + Int8Bin int8 `default:"0b1000"` + Int16Bin int16 `default:"0b10000"` + Int32Bin int32 `default:"0b100000"` + Int64Bin int64 `default:"0b1000000"` + UintBin uint `default:"0b1"` + Uint8Bin uint8 `default:"0b1000"` + Uint16Bin uint16 `default:"0b10000"` + Uint32Bin uint32 `default:"0b100000"` + Uint64Bin uint64 `default:"0b1000000"` + + Struct Struct `default:"{}"` + Map map[string]int `default:"{}"` + Slice []string `default:"[]"` + + IntPtr *int `default:"1"` + UintPtr *uint `default:"1"` + Float32Ptr *float32 `default:"1"` + BoolPtr *bool `default:"true"` + StringPtr *string `default:"hello"` + StructPtr *Struct `default:"{}"` + MapPtr *map[string]int `default:"{}"` + SlicePtr *[]string `default:"[]"` + + MyInt MyInt `default:"1"` + MyInt8 MyInt8 `default:"8"` + MyInt16 MyInt16 `default:"16"` + MyInt32 MyInt32 `default:"32"` + MyInt64 MyInt64 `default:"64"` + MyUint MyUint `default:"1"` + MyUint8 MyUint8 `default:"8"` + MyUint16 MyUint16 `default:"16"` + MyUint32 MyUint32 `default:"32"` + MyUint64 MyUint64 `default:"64"` + MyUintptr MyUintptr `default:"1"` + MyFloat32 MyFloat32 `default:"1.32"` + MyFloat64 MyFloat64 `default:"1.64"` + MyBoolTrue MyBool `default:"true"` + MyBoolFalse MyBool `default:"false"` + MyString MyString `default:"hello"` + MyMap MyMap `default:"{}"` + MySlice MySlice `default:"[]"` + + StructWithJSON Struct `default:"{\"Foo\": 123}"` + StructPtrWithJSON *Struct `default:"{\"Foo\": 123}"` + MapWithJSON map[string]int `default:"{\"foo\": 123}"` + + MapOfPtrStruct map[string]*Struct + MapOfStruct map[string]Struct + MapOfStructWithTag map[string]Struct `default:"{\"Struct3\": {\"Foo\":123}}"` + + SliceWithJSON []string `default:"[\"foo\"]"` + + Empty string `default:""` + + NoDefault *string `default:"-"` + NoDefaultStruct Struct `default:"-"` + + MapWithNoTag map[string]int + SliceWithNoTag []string + StructPtrWithNoTag *Struct + StructWithNoTag Struct + DeepSliceOfStructWithNoTag [][][]Struct + + NonInitialString string `default:"foo"` + NonInitialSlice []int `default:"[123]"` + NonInitialStruct Struct `default:"{}"` + NonInitialStructPtr *Struct `default:"{}"` +} + +type Struct struct { + Embedded `default:"{}"` + + Foo int + Bar int + WithDefault string `default:"foo"` +} + +func (s *Struct) SetDefaults() { + s.Bar = 456 +} + +type Embedded struct { + Int int `default:"1"` +} + +func TestMustSet(t *testing.T) { + + t.Run("right way", func(t *testing.T) { + defer func() { + if err := recover(); err != nil { + t.Fatalf("it should not panic error: %v", err) + } + }() + sample := &Sample{ + NonInitialString: "string", + NonInitialSlice: []int{1, 2, 3}, + NonInitialStruct: Struct{Foo: 123}, + NonInitialStructPtr: &Struct{Foo: 123}, + DeepSliceOfStructWithNoTag: [][][]Struct{{{{Foo: 123}}}}, + } + MustSet(sample) + }) + + t.Run("not struct", func(t *testing.T) { + defer func() { + if err := recover(); err != nil { + t.Logf("panic error: %v", err) + } + }() + var a int + MustSet(&a) + }) + + t.Run("not pointer", func(t *testing.T) { + defer func() { + if err := recover(); err != nil { + t.Logf("panic error: %v", err) + } + }() + sample := Sample{ + NonInitialString: "string", + NonInitialSlice: []int{1, 2, 3}, + NonInitialStruct: Struct{Foo: 123}, + NonInitialStructPtr: &Struct{Foo: 123}, + DeepSliceOfStructWithNoTag: [][][]Struct{{{{Foo: 123}}}}, + } + MustSet(sample) + }) + +} + +func TestInit(t *testing.T) { + sample := &Sample{ + NonInitialString: "string", + NonInitialSlice: []int{1, 2, 3}, + NonInitialStruct: Struct{Foo: 123}, + NonInitialStructPtr: &Struct{Foo: 123}, + DeepSliceOfStructWithNoTag: [][][]Struct{{{{Foo: 123}}}}, + MapOfStruct: map[string]Struct{ + "Struct1": {Foo: 1}, + }, + MapOfPtrStruct: map[string]*Struct{ + "Struct1": {Foo: 1}, + "Struct2": {Bar: 5}, + }, + } + + if err := Set(sample); err != nil { + t.Fatalf("it should not return an error: %v", err) + } + + nonPtrVal := 1 + + if err := Set(nonPtrVal); err == nil { + t.Fatalf("it should return an error when used for a non-pointer type") + } + if err := Set(&nonPtrVal); err == nil { + t.Fatalf("it should return an error when used for a non-pointer type") + } + + Set(&fixture.Sample{}) // should not panic + + t.Run("primitive types", func(t *testing.T) { + if sample.Int != 1 { + t.Errorf("it should initialize int") + } + if sample.Int8 != 8 { + t.Errorf("it should initialize int8") + } + if sample.Int16 != 16 { + t.Errorf("it should initialize int16") + } + if sample.Int32 != 32 { + t.Errorf("it should initialize int32") + } + if sample.Int64 != 64 { + t.Errorf("it should initialize int64") + } + if sample.Uint != 1 { + t.Errorf("it should initialize uint") + } + if sample.Uint8 != 8 { + t.Errorf("it should initialize uint8") + } + if sample.Uint16 != 16 { + t.Errorf("it should initialize uint16") + } + if sample.Uint32 != 32 { + t.Errorf("it should initialize uint32") + } + if sample.Uint64 != 64 { + t.Errorf("it should initialize uint64") + } + if sample.Uintptr != 1 { + t.Errorf("it should initialize uintptr") + } + if sample.Float32 != 1.32 { + t.Errorf("it should initialize float32") + } + if sample.Float64 != 1.64 { + t.Errorf("it should initialize float64") + } + if sample.BoolTrue != true { + t.Errorf("it should initialize bool (true)") + } + if sample.BoolFalse != false { + t.Errorf("it should initialize bool (false)") + } + if *sample.BoolPtr != true { + t.Errorf("it should initialize bool (true)") + } + if sample.String != "hello" { + t.Errorf("it should initialize string") + } + + if sample.IntOct != 0o1 { + t.Errorf("it should initialize int with octal literal") + } + if sample.Int8Oct != 0o10 { + t.Errorf("it should initialize int8 with octal literal") + } + if sample.Int16Oct != 0o20 { + t.Errorf("it should initialize int16 with octal literal") + } + if sample.Int32Oct != 0o40 { + t.Errorf("it should initialize int32 with octal literal") + } + if sample.Int64Oct != 0o100 { + t.Errorf("it should initialize int64 with octal literal") + } + if sample.UintOct != 0o1 { + t.Errorf("it should initialize uint with octal literal") + } + if sample.Uint8Oct != 0o10 { + t.Errorf("it should initialize uint8 with octal literal") + } + if sample.Uint16Oct != 0o20 { + t.Errorf("it should initialize uint16 with octal literal") + } + if sample.Uint32Oct != 0o40 { + t.Errorf("it should initialize uint32 with octal literal") + } + if sample.Uint64Oct != 0o100 { + t.Errorf("it should initialize uint64 with octal literal") + } + + if sample.IntHex != 0x1 { + t.Errorf("it should initialize int with hexadecimal literal") + } + if sample.Int8Hex != 0x8 { + t.Errorf("it should initialize int8 with hexadecimal literal") + } + if sample.Int16Hex != 0x10 { + t.Errorf("it should initialize int16 with hexadecimal literal") + } + if sample.Int32Hex != 0x20 { + t.Errorf("it should initialize int32 with hexadecimal literal") + } + if sample.Int64Hex != 0x40 { + t.Errorf("it should initialize int64 with hexadecimal literal") + } + if sample.UintHex != 0x1 { + t.Errorf("it should initialize uint with hexadecimal literal") + } + if sample.Uint8Hex != 0x8 { + t.Errorf("it should initialize uint8 with hexadecimal literal") + } + if sample.Uint16Hex != 0x10 { + t.Errorf("it should initialize uint16 with hexadecimal literal") + } + if sample.Uint32Hex != 0x20 { + t.Errorf("it should initialize uint32 with hexadecimal literal") + } + if sample.Uint64Hex != 0x40 { + t.Errorf("it should initialize uint64 with hexadecimal literal") + } + + if sample.IntBin != 0b1 { + t.Errorf("it should initialize int with binary literal") + } + if sample.Int8Bin != 0b1000 { + t.Errorf("it should initialize int8 with binary literal") + } + if sample.Int16Bin != 0b10000 { + t.Errorf("it should initialize int16 with binary literal") + } + if sample.Int32Bin != 0b100000 { + t.Errorf("it should initialize int32 with binary literal") + } + if sample.Int64Bin != 0b1000000 { + t.Errorf("it should initialize int64 with binary literal") + } + if sample.UintBin != 0b1 { + t.Errorf("it should initialize uint with binary literal") + } + if sample.Uint8Bin != 0b1000 { + t.Errorf("it should initialize uint8 with binary literal") + } + if sample.Uint16Bin != 0b10000 { + t.Errorf("it should initialize uint16 with binary literal") + } + if sample.Uint32Bin != 0b100000 { + t.Errorf("it should initialize uint32 with binary literal") + } + if sample.Uint64Bin != 0b1000000 { + t.Errorf("it should initialize uint64 with binary literal") + } + }) + + t.Run("complex types", func(t *testing.T) { + if sample.StructPtr == nil { + t.Errorf("it should initialize struct pointer") + } + if sample.Map == nil { + t.Errorf("it should initialize map") + } + if sample.Slice == nil { + t.Errorf("it should initialize slice") + } + }) + + t.Run("pointer types", func(t *testing.T) { + if sample.IntPtr == nil || *sample.IntPtr != 1 { + t.Errorf("it should initialize int pointer") + } + if sample.UintPtr == nil || *sample.UintPtr != 1 { + t.Errorf("it should initialize uint pointer") + } + if sample.Float32Ptr == nil || *sample.Float32Ptr != 1 { + t.Errorf("it should initialize float32 pointer") + } + if sample.BoolPtr == nil || *sample.BoolPtr != true { + t.Errorf("it should initialize bool pointer") + } + if sample.StringPtr == nil || *sample.StringPtr != "hello" { + t.Errorf("it should initialize string pointer") + } + if sample.MapPtr == nil { + t.Errorf("it should initialize map ptr") + } + if sample.SlicePtr == nil { + t.Errorf("it should initialize slice ptr") + } + }) + + t.Run("aliased types", func(t *testing.T) { + if sample.MyInt != 1 { + t.Errorf("it should initialize int") + } + if sample.MyInt8 != 8 { + t.Errorf("it should initialize int8") + } + if sample.MyInt16 != 16 { + t.Errorf("it should initialize int16") + } + if sample.MyInt32 != 32 { + t.Errorf("it should initialize int32") + } + if sample.MyInt64 != 64 { + t.Errorf("it should initialize int64") + } + if sample.MyUint != 1 { + t.Errorf("it should initialize uint") + } + if sample.MyUint8 != 8 { + t.Errorf("it should initialize uint8") + } + if sample.MyUint16 != 16 { + t.Errorf("it should initialize uint16") + } + if sample.MyUint32 != 32 { + t.Errorf("it should initialize uint32") + } + if sample.MyUint64 != 64 { + t.Errorf("it should initialize uint64") + } + if sample.MyUintptr != 1 { + t.Errorf("it should initialize uintptr") + } + if sample.MyFloat32 != 1.32 { + t.Errorf("it should initialize float32") + } + if sample.MyFloat64 != 1.64 { + t.Errorf("it should initialize float64") + } + if sample.MyBoolTrue != true { + t.Errorf("it should initialize bool (true)") + } + if sample.MyBoolFalse != false { + t.Errorf("it should initialize bool (false)") + } + if sample.MyString != "hello" { + t.Errorf("it should initialize string") + } + + if sample.MyMap == nil { + t.Errorf("it should initialize map") + } + if sample.MySlice == nil { + t.Errorf("it should initialize slice") + } + }) + + t.Run("nested", func(t *testing.T) { + if sample.Struct.WithDefault != "foo" { + t.Errorf("it should set default on inner field in struct") + } + if sample.StructPtr == nil || sample.StructPtr.WithDefault != "foo" { + t.Errorf("it should set default on inner field in struct pointer") + } + if sample.Struct.Embedded.Int != 1 { + t.Errorf("it should set default on an Embedded struct") + } + }) + + t.Run("complex types with json", func(t *testing.T) { + if sample.StructWithJSON.Foo != 123 { + t.Errorf("it should initialize struct with json") + } + if sample.StructPtrWithJSON == nil || sample.StructPtrWithJSON.Foo != 123 { + t.Errorf("it should initialize struct pointer with json") + } + if sample.MapWithJSON["foo"] != 123 { + t.Errorf("it should initialize map with json") + } + if len(sample.SliceWithJSON) == 0 || sample.SliceWithJSON[0] != "foo" { + t.Errorf("it should initialize slice with json") + } + + t.Run("invalid json", func(t *testing.T) { + if err := Set(&struct { + I []int `default:"[!]"` + }{}); err == nil { + t.Errorf("it should return error") + } + + if err := Set(&struct { + I map[string]int `default:"{1}"` + }{}); err == nil { + t.Errorf("it should return error") + } + + if err := Set(&struct { + S struct { + I []int + } `default:"{!}"` + }{}); err == nil { + t.Errorf("it should return error") + } + + if err := Set(&struct { + S struct { + I []int `default:"[!]"` + } + }{}); err == nil { + t.Errorf("it should return error") + } + }) + }) + + t.Run("Setter interface", func(t *testing.T) { + if sample.Struct.Bar != 456 { + t.Errorf("it should initialize struct") + } + if sample.StructPtr == nil || sample.StructPtr.Bar != 456 { + t.Errorf("it should initialize struct pointer") + } + }) + + t.Run("non-initial value", func(t *testing.T) { + if sample.NonInitialString != "string" { + t.Errorf("it should not override non-initial value") + } + if !reflect.DeepEqual(sample.NonInitialSlice, []int{1, 2, 3}) { + t.Errorf("it should not override non-initial value") + } + if !reflect.DeepEqual(sample.NonInitialStruct, Struct{Embedded: Embedded{Int: 1}, Foo: 123, Bar: 456, WithDefault: "foo"}) { + t.Errorf("it should not override non-initial value but set defaults for fields") + } + if !reflect.DeepEqual(sample.NonInitialStructPtr, &Struct{Embedded: Embedded{Int: 1}, Foo: 123, Bar: 456, WithDefault: "foo"}) { + t.Errorf("it should not override non-initial value but set defaults for fields") + } + }) + + t.Run("no tag", func(t *testing.T) { + if sample.MapWithNoTag != nil { + t.Errorf("it should not initialize pointer type (map)") + } + if sample.SliceWithNoTag != nil { + t.Errorf("it should not initialize pointer type (slice)") + } + if sample.StructPtrWithNoTag != nil { + t.Errorf("it should not initialize pointer type (struct)") + } + if sample.StructWithNoTag.WithDefault != "foo" { + t.Errorf("it should automatically recurse into a struct even without a tag") + } + if !reflect.DeepEqual(sample.DeepSliceOfStructWithNoTag, [][][]Struct{{{{Embedded: Embedded{Int: 1}, Foo: 123, Bar: 456, WithDefault: "foo"}}}}) { + t.Errorf("it should automatically recurse into a slice of structs even without a tag") + } + }) + + t.Run("map of struct", func(t *testing.T) { + if sample.MapOfStruct == nil { + t.Errorf("it should not unset an initiated map") + } + if len(sample.MapOfStruct) != 1 { + t.Errorf("it should not override an initiated map") + } + if sample.MapOfStruct["Struct1"].Foo != 1 { + t.Errorf("it should not override Foo field in Struct1 item") + } + if sample.MapOfStruct["Struct1"].Bar != 456 { + t.Errorf("it should set default for Bar field in Struct1 item") + } + if sample.MapOfStruct["Struct1"].WithDefault != "foo" { + t.Errorf("it should set default for WithDefault field in Struct1 item") + } + }) + + t.Run("map of ptr struct", func(t *testing.T) { + if sample.MapOfPtrStruct == nil { + t.Errorf("it should not unset an initiated map") + } + if len(sample.MapOfPtrStruct) != 2 { + t.Errorf("it should not override an initiated map") + } + if sample.MapOfPtrStruct["Struct1"].Foo != 1 { + t.Errorf("it should not override Foo field in Struct1 item") + } + if sample.MapOfPtrStruct["Struct1"].Bar != 456 { + t.Errorf("it should set default for Bar field in Struct1 item") + } + if sample.MapOfPtrStruct["Struct1"].WithDefault != "foo" { + t.Errorf("it should set default for WithDefault field in Struct1 item") + } + if sample.MapOfPtrStruct["Struct2"].Foo != 0 { + t.Errorf("it should not override Foo field in Struct2 item") + } + if sample.MapOfPtrStruct["Struct2"].Bar != 456 { + t.Errorf("it should using setter to set default for Bar field in a Struct2 item") + } + if sample.MapOfPtrStruct["Struct2"].WithDefault != "foo" { + t.Errorf("it should set default for WithDefault field in Struct2 item") + } + }) + + t.Run("map of struct with tag", func(t *testing.T) { + if sample.MapOfStructWithTag == nil { + t.Errorf("it should set default") + } + if len(sample.MapOfStructWithTag) != 1 { + t.Errorf("it should set default with correct value") + } + if sample.MapOfStructWithTag["Struct3"].Foo != 123 { + t.Errorf("it should set default with correct value (Foo)") + } + if sample.MapOfStructWithTag["Struct1"].Bar != 0 { + t.Errorf("it should set default with correct value (Bar)") + } + if sample.MapOfStructWithTag["Struct1"].WithDefault != "" { + t.Errorf("it should set default with correct value (WithDefault)") + } + }) + + t.Run("opt-out", func(t *testing.T) { + if sample.NoDefault != nil { + t.Errorf("it should not be set") + } + if sample.NoDefaultStruct.WithDefault != "" { + t.Errorf("it should not initialize a struct with default values") + } + }) +} + +func TestCanUpdate(t *testing.T) { + type st struct{ Int int } + + var myStructPtr *st + + pairs := map[interface{}]bool{ + 0: true, + 123: false, + float64(0): true, + float64(123): false, + "": true, + "string": false, + false: true, + true: false, + st{}: true, + st{Int: 123}: false, + myStructPtr: true, + &st{}: false, + } + for input, expect := range pairs { + output := CanUpdate(input) + if output != expect { + t.Errorf("CanUpdate(%v) returns %v, expected %v", input, output, expect) + } + } +} + +type Child struct { + Name string `default:"Tom"` + Age int `default:"20"` +} + +type Parent struct { + Child *Child +} + +func TestPointerStructMember(t *testing.T) { + m := Parent{Child: &Child{Name: "Jim"}} + Set(&m) + if m.Child.Age != 20 { + t.Errorf("20 is expected") + } +} + +type Main struct { + MainInt int `default:"-"` + *Other `default:"{}"` +} + +type Other struct { + OtherInt int `default:"-"` +} + +func (s *Main) SetDefaults() { + if CanUpdate(s.MainInt) { + s.MainInt = 1 + } +} + +func (s *Other) SetDefaults() { + if CanUpdate(s.OtherInt) { + s.OtherInt = 1 + } +} + +func TestDefaultsSetter(t *testing.T) { + main := &Main{} + Set(main) + if main.OtherInt != 1 { + t.Errorf("expected 1 for OtherInt, got %d", main.OtherInt) + } + if main.MainInt != 1 { + t.Errorf("expected 1 for MainInt, got %d", main.MainInt) + } +} diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/go.mod b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/go.mod new file mode 100644 index 0000000..2b71726 --- /dev/null +++ b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/go.mod @@ -0,0 +1,3 @@ +module github.com/creasty/defaults + +go 1.14 diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/go.sum b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/go.sum new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/internal/fixture/test.go b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/internal/fixture/test.go new file mode 100644 index 0000000..94c3d41 --- /dev/null +++ b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/internal/fixture/test.go @@ -0,0 +1,7 @@ +package fixture + +// Sample is a struct that contains 1 exported field and 1 unexported field +type Sample struct { + ExportedFeild int + unexportedFeild int +} diff --git a/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/setter.go b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/setter.go new file mode 100644 index 0000000..1f64aa6 --- /dev/null +++ b/dependencies/pkg/mod/github.com/creasty/defaults@v1.6.0/setter.go @@ -0,0 +1,12 @@ +package defaults + +// Setter is an interface for setting default values +type Setter interface { + SetDefaults() +} + +func callSetter(v interface{}) { + if ds, ok := v.(Setter); ok { + ds.SetDefaults() + } +} diff --git a/dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/LICENSE b/dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/LICENSE new file mode 100644 index 0000000..22080f7 --- /dev/null +++ b/dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017-2020 Damian Gryski + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/rdv.go b/dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/rdv.go new file mode 100644 index 0000000..7a6f820 --- /dev/null +++ b/dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/rdv.go @@ -0,0 +1,79 @@ +package rendezvous + +type Rendezvous struct { + nodes map[string]int + nstr []string + nhash []uint64 + hash Hasher +} + +type Hasher func(s string) uint64 + +func New(nodes []string, hash Hasher) *Rendezvous { + r := &Rendezvous{ + nodes: make(map[string]int, len(nodes)), + nstr: make([]string, len(nodes)), + nhash: make([]uint64, len(nodes)), + hash: hash, + } + + for i, n := range nodes { + r.nodes[n] = i + r.nstr[i] = n + r.nhash[i] = hash(n) + } + + return r +} + +func (r *Rendezvous) Lookup(k string) string { + // short-circuit if we're empty + if len(r.nodes) == 0 { + return "" + } + + khash := r.hash(k) + + var midx int + var mhash = xorshiftMult64(khash ^ r.nhash[0]) + + for i, nhash := range r.nhash[1:] { + if h := xorshiftMult64(khash ^ nhash); h > mhash { + midx = i + 1 + mhash = h + } + } + + return r.nstr[midx] +} + +func (r *Rendezvous) Add(node string) { + r.nodes[node] = len(r.nstr) + r.nstr = append(r.nstr, node) + r.nhash = append(r.nhash, r.hash(node)) +} + +func (r *Rendezvous) Remove(node string) { + // find index of node to remove + nidx := r.nodes[node] + + // remove from the slices + l := len(r.nstr) + r.nstr[nidx] = r.nstr[l] + r.nstr = r.nstr[:l] + + r.nhash[nidx] = r.nhash[l] + r.nhash = r.nhash[:l] + + // update the map + delete(r.nodes, node) + moved := r.nstr[nidx] + r.nodes[moved] = nidx +} + +func xorshiftMult64(x uint64) uint64 { + x ^= x >> 12 // a + x ^= x << 25 // b + x ^= x >> 27 // c + return x * 2685821657736338717 +} diff --git a/dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/rdv_test.go b/dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/rdv_test.go new file mode 100644 index 0000000..f9c5583 --- /dev/null +++ b/dependencies/pkg/mod/github.com/dgryski/go-rendezvous@v0.0.0-20200823014737-9f7001d12a5f/rdv_test.go @@ -0,0 +1,18 @@ +package rendezvous + +import ( + "hash/fnv" + "testing" +) + +func hashString(s string) uint64 { + h := fnv.New64a() + h.Write([]byte(s)) + return h.Sum64() +} + +func TestEmpty(t *testing.T) { + r := New([]string{}, hashString) + r.Lookup("hello") + +} diff --git a/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/.github/dependabot.yml b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/.github/dependabot.yml new file mode 100644 index 0000000..ab2c4e2 --- /dev/null +++ b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" # Location of go.mod + schedule: + interval: "daily" diff --git a/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/.github/workflows/go.yml b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/.github/workflows/go.yml new file mode 100644 index 0000000..7ed538b --- /dev/null +++ b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/.github/workflows/go.yml @@ -0,0 +1,40 @@ +name: build +on: + push: + branches: + - master + - main + pull_request: + +jobs: + test: + name: Test & Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.16 + uses: actions/setup-go@v2 + with: + go-version: ^1.16 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Run go mod tidy + run: | + set -e + go mod tidy + output=$(git status -s) + if [ -z "${output}" ]; then + exit 0 + fi + echo 'We wish to maintain a tidy state for go mod. Please run `go mod tidy` on your branch, commit and push again.' + echo 'Running `go mod tidy` on this CI test yields with the following changes:' + echo "$output" + exit 1 + + - name: Test + run: go test -race ./... + + - name: Build + run: go build ./... diff --git a/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/LICENSE.md b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/LICENSE.md new file mode 100644 index 0000000..25fdaf6 --- /dev/null +++ b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Fatih Arslan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/README.md b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/README.md new file mode 100644 index 0000000..5152bf5 --- /dev/null +++ b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/README.md @@ -0,0 +1,178 @@ +# color [![](https://github.com/fatih/color/workflows/build/badge.svg)](https://github.com/fatih/color/actions) [![PkgGoDev](https://pkg.go.dev/badge/github.com/fatih/color)](https://pkg.go.dev/github.com/fatih/color) + +Color lets you use colorized outputs in terms of [ANSI Escape +Codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) in Go (Golang). It +has support for Windows too! The API can be used in several ways, pick one that +suits you. + +![Color](https://user-images.githubusercontent.com/438920/96832689-03b3e000-13f4-11eb-9803-46f4c4de3406.jpg) + + +## Install + +```bash +go get github.com/fatih/color +``` + +## Examples + +### Standard colors + +```go +// Print with default helper functions +color.Cyan("Prints text in cyan.") + +// A newline will be appended automatically +color.Blue("Prints %s in blue.", "text") + +// These are using the default foreground colors +color.Red("We have red") +color.Magenta("And many others ..") + +``` + +### Mix and reuse colors + +```go +// Create a new color object +c := color.New(color.FgCyan).Add(color.Underline) +c.Println("Prints cyan text with an underline.") + +// Or just add them to New() +d := color.New(color.FgCyan, color.Bold) +d.Printf("This prints bold cyan %s\n", "too!.") + +// Mix up foreground and background colors, create new mixes! +red := color.New(color.FgRed) + +boldRed := red.Add(color.Bold) +boldRed.Println("This will print text in bold red.") + +whiteBackground := red.Add(color.BgWhite) +whiteBackground.Println("Red text with white background.") +``` + +### Use your own output (io.Writer) + +```go +// Use your own io.Writer output +color.New(color.FgBlue).Fprintln(myWriter, "blue color!") + +blue := color.New(color.FgBlue) +blue.Fprint(writer, "This will print text in blue.") +``` + +### Custom print functions (PrintFunc) + +```go +// Create a custom print function for convenience +red := color.New(color.FgRed).PrintfFunc() +red("Warning") +red("Error: %s", err) + +// Mix up multiple attributes +notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() +notice("Don't forget this...") +``` + +### Custom fprint functions (FprintFunc) + +```go +blue := color.New(color.FgBlue).FprintfFunc() +blue(myWriter, "important notice: %s", stars) + +// Mix up with multiple attributes +success := color.New(color.Bold, color.FgGreen).FprintlnFunc() +success(myWriter, "Don't forget this...") +``` + +### Insert into noncolor strings (SprintFunc) + +```go +// Create SprintXxx functions to mix strings with other non-colorized strings: +yellow := color.New(color.FgYellow).SprintFunc() +red := color.New(color.FgRed).SprintFunc() +fmt.Printf("This is a %s and this is %s.\n", yellow("warning"), red("error")) + +info := color.New(color.FgWhite, color.BgGreen).SprintFunc() +fmt.Printf("This %s rocks!\n", info("package")) + +// Use helper functions +fmt.Println("This", color.RedString("warning"), "should be not neglected.") +fmt.Printf("%v %v\n", color.GreenString("Info:"), "an important message.") + +// Windows supported too! Just don't forget to change the output to color.Output +fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) +``` + +### Plug into existing code + +```go +// Use handy standard colors +color.Set(color.FgYellow) + +fmt.Println("Existing text will now be in yellow") +fmt.Printf("This one %s\n", "too") + +color.Unset() // Don't forget to unset + +// You can mix up parameters +color.Set(color.FgMagenta, color.Bold) +defer color.Unset() // Use it in your function + +fmt.Println("All text will now be bold magenta.") +``` + +### Disable/Enable color + +There might be a case where you want to explicitly disable/enable color output. the +`go-isatty` package will automatically disable color output for non-tty output streams +(for example if the output were piped directly to `less`). + +The `color` package also disables color output if the [`NO_COLOR`](https://no-color.org) environment +variable is set (regardless of its value). + +`Color` has support to disable/enable colors programatically both globally and +for single color definitions. For example suppose you have a CLI app and a +`--no-color` bool flag. You can easily disable the color output with: + +```go +var flagNoColor = flag.Bool("no-color", false, "Disable color output") + +if *flagNoColor { + color.NoColor = true // disables colorized output +} +``` + +It also has support for single color definitions (local). You can +disable/enable color output on the fly: + +```go +c := color.New(color.FgCyan) +c.Println("Prints cyan text") + +c.DisableColor() +c.Println("This is printed without any color") + +c.EnableColor() +c.Println("This prints again cyan...") +``` + +## GitHub Actions + +To output color in GitHub Actions (or other CI systems that support ANSI colors), make sure to set `color.NoColor = false` so that it bypasses the check for non-tty output streams. + +## Todo + +* Save/Return previous values +* Evaluate fmt.Formatter interface + + +## Credits + + * [Fatih Arslan](https://github.com/fatih) + * Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable) + +## License + +The MIT License (MIT) - see [`LICENSE.md`](https://github.com/fatih/color/blob/master/LICENSE.md) for more details diff --git a/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/color.go b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/color.go new file mode 100644 index 0000000..98a60f3 --- /dev/null +++ b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/color.go @@ -0,0 +1,618 @@ +package color + +import ( + "fmt" + "io" + "os" + "strconv" + "strings" + "sync" + + "github.com/mattn/go-colorable" + "github.com/mattn/go-isatty" +) + +var ( + // NoColor defines if the output is colorized or not. It's dynamically set to + // false or true based on the stdout's file descriptor referring to a terminal + // or not. It's also set to true if the NO_COLOR environment variable is + // set (regardless of its value). This is a global option and affects all + // colors. For more control over each color block use the methods + // DisableColor() individually. + NoColor = noColorExists() || os.Getenv("TERM") == "dumb" || + (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) + + // Output defines the standard output of the print functions. By default + // os.Stdout is used. + Output = colorable.NewColorableStdout() + + // Error defines a color supporting writer for os.Stderr. + Error = colorable.NewColorableStderr() + + // colorsCache is used to reduce the count of created Color objects and + // allows to reuse already created objects with required Attribute. + colorsCache = make(map[Attribute]*Color) + colorsCacheMu sync.Mutex // protects colorsCache +) + +// noColorExists returns true if the environment variable NO_COLOR exists. +func noColorExists() bool { + _, exists := os.LookupEnv("NO_COLOR") + return exists +} + +// Color defines a custom color object which is defined by SGR parameters. +type Color struct { + params []Attribute + noColor *bool +} + +// Attribute defines a single SGR Code +type Attribute int + +const escape = "\x1b" + +// Base attributes +const ( + Reset Attribute = iota + Bold + Faint + Italic + Underline + BlinkSlow + BlinkRapid + ReverseVideo + Concealed + CrossedOut +) + +// Foreground text colors +const ( + FgBlack Attribute = iota + 30 + FgRed + FgGreen + FgYellow + FgBlue + FgMagenta + FgCyan + FgWhite +) + +// Foreground Hi-Intensity text colors +const ( + FgHiBlack Attribute = iota + 90 + FgHiRed + FgHiGreen + FgHiYellow + FgHiBlue + FgHiMagenta + FgHiCyan + FgHiWhite +) + +// Background text colors +const ( + BgBlack Attribute = iota + 40 + BgRed + BgGreen + BgYellow + BgBlue + BgMagenta + BgCyan + BgWhite +) + +// Background Hi-Intensity text colors +const ( + BgHiBlack Attribute = iota + 100 + BgHiRed + BgHiGreen + BgHiYellow + BgHiBlue + BgHiMagenta + BgHiCyan + BgHiWhite +) + +// New returns a newly created color object. +func New(value ...Attribute) *Color { + c := &Color{ + params: make([]Attribute, 0), + } + + if noColorExists() { + c.noColor = boolPtr(true) + } + + c.Add(value...) + return c +} + +// Set sets the given parameters immediately. It will change the color of +// output with the given SGR parameters until color.Unset() is called. +func Set(p ...Attribute) *Color { + c := New(p...) + c.Set() + return c +} + +// Unset resets all escape attributes and clears the output. Usually should +// be called after Set(). +func Unset() { + if NoColor { + return + } + + fmt.Fprintf(Output, "%s[%dm", escape, Reset) +} + +// Set sets the SGR sequence. +func (c *Color) Set() *Color { + if c.isNoColorSet() { + return c + } + + fmt.Fprintf(Output, c.format()) + return c +} + +func (c *Color) unset() { + if c.isNoColorSet() { + return + } + + Unset() +} + +func (c *Color) setWriter(w io.Writer) *Color { + if c.isNoColorSet() { + return c + } + + fmt.Fprintf(w, c.format()) + return c +} + +func (c *Color) unsetWriter(w io.Writer) { + if c.isNoColorSet() { + return + } + + if NoColor { + return + } + + fmt.Fprintf(w, "%s[%dm", escape, Reset) +} + +// Add is used to chain SGR parameters. Use as many as parameters to combine +// and create custom color objects. Example: Add(color.FgRed, color.Underline). +func (c *Color) Add(value ...Attribute) *Color { + c.params = append(c.params, value...) + return c +} + +func (c *Color) prepend(value Attribute) { + c.params = append(c.params, 0) + copy(c.params[1:], c.params[0:]) + c.params[0] = value +} + +// Fprint formats using the default formats for its operands and writes to w. +// Spaces are added between operands when neither is a string. +// It returns the number of bytes written and any write error encountered. +// On Windows, users should wrap w with colorable.NewColorable() if w is of +// type *os.File. +func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) { + c.setWriter(w) + defer c.unsetWriter(w) + + return fmt.Fprint(w, a...) +} + +// Print formats using the default formats for its operands and writes to +// standard output. Spaces are added between operands when neither is a +// string. It returns the number of bytes written and any write error +// encountered. This is the standard fmt.Print() method wrapped with the given +// color. +func (c *Color) Print(a ...interface{}) (n int, err error) { + c.Set() + defer c.unset() + + return fmt.Fprint(Output, a...) +} + +// Fprintf formats according to a format specifier and writes to w. +// It returns the number of bytes written and any write error encountered. +// On Windows, users should wrap w with colorable.NewColorable() if w is of +// type *os.File. +func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { + c.setWriter(w) + defer c.unsetWriter(w) + + return fmt.Fprintf(w, format, a...) +} + +// Printf formats according to a format specifier and writes to standard output. +// It returns the number of bytes written and any write error encountered. +// This is the standard fmt.Printf() method wrapped with the given color. +func (c *Color) Printf(format string, a ...interface{}) (n int, err error) { + c.Set() + defer c.unset() + + return fmt.Fprintf(Output, format, a...) +} + +// Fprintln formats using the default formats for its operands and writes to w. +// Spaces are always added between operands and a newline is appended. +// On Windows, users should wrap w with colorable.NewColorable() if w is of +// type *os.File. +func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { + c.setWriter(w) + defer c.unsetWriter(w) + + return fmt.Fprintln(w, a...) +} + +// Println formats using the default formats for its operands and writes to +// standard output. Spaces are always added between operands and a newline is +// appended. It returns the number of bytes written and any write error +// encountered. This is the standard fmt.Print() method wrapped with the given +// color. +func (c *Color) Println(a ...interface{}) (n int, err error) { + c.Set() + defer c.unset() + + return fmt.Fprintln(Output, a...) +} + +// Sprint is just like Print, but returns a string instead of printing it. +func (c *Color) Sprint(a ...interface{}) string { + return c.wrap(fmt.Sprint(a...)) +} + +// Sprintln is just like Println, but returns a string instead of printing it. +func (c *Color) Sprintln(a ...interface{}) string { + return c.wrap(fmt.Sprintln(a...)) +} + +// Sprintf is just like Printf, but returns a string instead of printing it. +func (c *Color) Sprintf(format string, a ...interface{}) string { + return c.wrap(fmt.Sprintf(format, a...)) +} + +// FprintFunc returns a new function that prints the passed arguments as +// colorized with color.Fprint(). +func (c *Color) FprintFunc() func(w io.Writer, a ...interface{}) { + return func(w io.Writer, a ...interface{}) { + c.Fprint(w, a...) + } +} + +// PrintFunc returns a new function that prints the passed arguments as +// colorized with color.Print(). +func (c *Color) PrintFunc() func(a ...interface{}) { + return func(a ...interface{}) { + c.Print(a...) + } +} + +// FprintfFunc returns a new function that prints the passed arguments as +// colorized with color.Fprintf(). +func (c *Color) FprintfFunc() func(w io.Writer, format string, a ...interface{}) { + return func(w io.Writer, format string, a ...interface{}) { + c.Fprintf(w, format, a...) + } +} + +// PrintfFunc returns a new function that prints the passed arguments as +// colorized with color.Printf(). +func (c *Color) PrintfFunc() func(format string, a ...interface{}) { + return func(format string, a ...interface{}) { + c.Printf(format, a...) + } +} + +// FprintlnFunc returns a new function that prints the passed arguments as +// colorized with color.Fprintln(). +func (c *Color) FprintlnFunc() func(w io.Writer, a ...interface{}) { + return func(w io.Writer, a ...interface{}) { + c.Fprintln(w, a...) + } +} + +// PrintlnFunc returns a new function that prints the passed arguments as +// colorized with color.Println(). +func (c *Color) PrintlnFunc() func(a ...interface{}) { + return func(a ...interface{}) { + c.Println(a...) + } +} + +// SprintFunc returns a new function that returns colorized strings for the +// given arguments with fmt.Sprint(). Useful to put into or mix into other +// string. Windows users should use this in conjunction with color.Output, example: +// +// put := New(FgYellow).SprintFunc() +// fmt.Fprintf(color.Output, "This is a %s", put("warning")) +func (c *Color) SprintFunc() func(a ...interface{}) string { + return func(a ...interface{}) string { + return c.wrap(fmt.Sprint(a...)) + } +} + +// SprintfFunc returns a new function that returns colorized strings for the +// given arguments with fmt.Sprintf(). Useful to put into or mix into other +// string. Windows users should use this in conjunction with color.Output. +func (c *Color) SprintfFunc() func(format string, a ...interface{}) string { + return func(format string, a ...interface{}) string { + return c.wrap(fmt.Sprintf(format, a...)) + } +} + +// SprintlnFunc returns a new function that returns colorized strings for the +// given arguments with fmt.Sprintln(). Useful to put into or mix into other +// string. Windows users should use this in conjunction with color.Output. +func (c *Color) SprintlnFunc() func(a ...interface{}) string { + return func(a ...interface{}) string { + return c.wrap(fmt.Sprintln(a...)) + } +} + +// sequence returns a formatted SGR sequence to be plugged into a "\x1b[...m" +// an example output might be: "1;36" -> bold cyan +func (c *Color) sequence() string { + format := make([]string, len(c.params)) + for i, v := range c.params { + format[i] = strconv.Itoa(int(v)) + } + + return strings.Join(format, ";") +} + +// wrap wraps the s string with the colors attributes. The string is ready to +// be printed. +func (c *Color) wrap(s string) string { + if c.isNoColorSet() { + return s + } + + return c.format() + s + c.unformat() +} + +func (c *Color) format() string { + return fmt.Sprintf("%s[%sm", escape, c.sequence()) +} + +func (c *Color) unformat() string { + return fmt.Sprintf("%s[%dm", escape, Reset) +} + +// DisableColor disables the color output. Useful to not change any existing +// code and still being able to output. Can be used for flags like +// "--no-color". To enable back use EnableColor() method. +func (c *Color) DisableColor() { + c.noColor = boolPtr(true) +} + +// EnableColor enables the color output. Use it in conjunction with +// DisableColor(). Otherwise this method has no side effects. +func (c *Color) EnableColor() { + c.noColor = boolPtr(false) +} + +func (c *Color) isNoColorSet() bool { + // check first if we have user set action + if c.noColor != nil { + return *c.noColor + } + + // if not return the global option, which is disabled by default + return NoColor +} + +// Equals returns a boolean value indicating whether two colors are equal. +func (c *Color) Equals(c2 *Color) bool { + if len(c.params) != len(c2.params) { + return false + } + + for _, attr := range c.params { + if !c2.attrExists(attr) { + return false + } + } + + return true +} + +func (c *Color) attrExists(a Attribute) bool { + for _, attr := range c.params { + if attr == a { + return true + } + } + + return false +} + +func boolPtr(v bool) *bool { + return &v +} + +func getCachedColor(p Attribute) *Color { + colorsCacheMu.Lock() + defer colorsCacheMu.Unlock() + + c, ok := colorsCache[p] + if !ok { + c = New(p) + colorsCache[p] = c + } + + return c +} + +func colorPrint(format string, p Attribute, a ...interface{}) { + c := getCachedColor(p) + + if !strings.HasSuffix(format, "\n") { + format += "\n" + } + + if len(a) == 0 { + c.Print(format) + } else { + c.Printf(format, a...) + } +} + +func colorString(format string, p Attribute, a ...interface{}) string { + c := getCachedColor(p) + + if len(a) == 0 { + return c.SprintFunc()(format) + } + + return c.SprintfFunc()(format, a...) +} + +// Black is a convenient helper function to print with black foreground. A +// newline is appended to format by default. +func Black(format string, a ...interface{}) { colorPrint(format, FgBlack, a...) } + +// Red is a convenient helper function to print with red foreground. A +// newline is appended to format by default. +func Red(format string, a ...interface{}) { colorPrint(format, FgRed, a...) } + +// Green is a convenient helper function to print with green foreground. A +// newline is appended to format by default. +func Green(format string, a ...interface{}) { colorPrint(format, FgGreen, a...) } + +// Yellow is a convenient helper function to print with yellow foreground. +// A newline is appended to format by default. +func Yellow(format string, a ...interface{}) { colorPrint(format, FgYellow, a...) } + +// Blue is a convenient helper function to print with blue foreground. A +// newline is appended to format by default. +func Blue(format string, a ...interface{}) { colorPrint(format, FgBlue, a...) } + +// Magenta is a convenient helper function to print with magenta foreground. +// A newline is appended to format by default. +func Magenta(format string, a ...interface{}) { colorPrint(format, FgMagenta, a...) } + +// Cyan is a convenient helper function to print with cyan foreground. A +// newline is appended to format by default. +func Cyan(format string, a ...interface{}) { colorPrint(format, FgCyan, a...) } + +// White is a convenient helper function to print with white foreground. A +// newline is appended to format by default. +func White(format string, a ...interface{}) { colorPrint(format, FgWhite, a...) } + +// BlackString is a convenient helper function to return a string with black +// foreground. +func BlackString(format string, a ...interface{}) string { return colorString(format, FgBlack, a...) } + +// RedString is a convenient helper function to return a string with red +// foreground. +func RedString(format string, a ...interface{}) string { return colorString(format, FgRed, a...) } + +// GreenString is a convenient helper function to return a string with green +// foreground. +func GreenString(format string, a ...interface{}) string { return colorString(format, FgGreen, a...) } + +// YellowString is a convenient helper function to return a string with yellow +// foreground. +func YellowString(format string, a ...interface{}) string { return colorString(format, FgYellow, a...) } + +// BlueString is a convenient helper function to return a string with blue +// foreground. +func BlueString(format string, a ...interface{}) string { return colorString(format, FgBlue, a...) } + +// MagentaString is a convenient helper function to return a string with magenta +// foreground. +func MagentaString(format string, a ...interface{}) string { + return colorString(format, FgMagenta, a...) +} + +// CyanString is a convenient helper function to return a string with cyan +// foreground. +func CyanString(format string, a ...interface{}) string { return colorString(format, FgCyan, a...) } + +// WhiteString is a convenient helper function to return a string with white +// foreground. +func WhiteString(format string, a ...interface{}) string { return colorString(format, FgWhite, a...) } + +// HiBlack is a convenient helper function to print with hi-intensity black foreground. A +// newline is appended to format by default. +func HiBlack(format string, a ...interface{}) { colorPrint(format, FgHiBlack, a...) } + +// HiRed is a convenient helper function to print with hi-intensity red foreground. A +// newline is appended to format by default. +func HiRed(format string, a ...interface{}) { colorPrint(format, FgHiRed, a...) } + +// HiGreen is a convenient helper function to print with hi-intensity green foreground. A +// newline is appended to format by default. +func HiGreen(format string, a ...interface{}) { colorPrint(format, FgHiGreen, a...) } + +// HiYellow is a convenient helper function to print with hi-intensity yellow foreground. +// A newline is appended to format by default. +func HiYellow(format string, a ...interface{}) { colorPrint(format, FgHiYellow, a...) } + +// HiBlue is a convenient helper function to print with hi-intensity blue foreground. A +// newline is appended to format by default. +func HiBlue(format string, a ...interface{}) { colorPrint(format, FgHiBlue, a...) } + +// HiMagenta is a convenient helper function to print with hi-intensity magenta foreground. +// A newline is appended to format by default. +func HiMagenta(format string, a ...interface{}) { colorPrint(format, FgHiMagenta, a...) } + +// HiCyan is a convenient helper function to print with hi-intensity cyan foreground. A +// newline is appended to format by default. +func HiCyan(format string, a ...interface{}) { colorPrint(format, FgHiCyan, a...) } + +// HiWhite is a convenient helper function to print with hi-intensity white foreground. A +// newline is appended to format by default. +func HiWhite(format string, a ...interface{}) { colorPrint(format, FgHiWhite, a...) } + +// HiBlackString is a convenient helper function to return a string with hi-intensity black +// foreground. +func HiBlackString(format string, a ...interface{}) string { + return colorString(format, FgHiBlack, a...) +} + +// HiRedString is a convenient helper function to return a string with hi-intensity red +// foreground. +func HiRedString(format string, a ...interface{}) string { return colorString(format, FgHiRed, a...) } + +// HiGreenString is a convenient helper function to return a string with hi-intensity green +// foreground. +func HiGreenString(format string, a ...interface{}) string { + return colorString(format, FgHiGreen, a...) +} + +// HiYellowString is a convenient helper function to return a string with hi-intensity yellow +// foreground. +func HiYellowString(format string, a ...interface{}) string { + return colorString(format, FgHiYellow, a...) +} + +// HiBlueString is a convenient helper function to return a string with hi-intensity blue +// foreground. +func HiBlueString(format string, a ...interface{}) string { return colorString(format, FgHiBlue, a...) } + +// HiMagentaString is a convenient helper function to return a string with hi-intensity magenta +// foreground. +func HiMagentaString(format string, a ...interface{}) string { + return colorString(format, FgHiMagenta, a...) +} + +// HiCyanString is a convenient helper function to return a string with hi-intensity cyan +// foreground. +func HiCyanString(format string, a ...interface{}) string { return colorString(format, FgHiCyan, a...) } + +// HiWhiteString is a convenient helper function to return a string with hi-intensity white +// foreground. +func HiWhiteString(format string, a ...interface{}) string { + return colorString(format, FgHiWhite, a...) +} diff --git a/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/color_test.go b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/color_test.go new file mode 100644 index 0000000..0ee2a7b --- /dev/null +++ b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/color_test.go @@ -0,0 +1,385 @@ +package color + +import ( + "bytes" + "fmt" + "os" + "testing" + + "github.com/mattn/go-colorable" +) + +// Testing colors is kinda different. First we test for given colors and their +// escaped formatted results. Next we create some visual tests to be tested. +// Each visual test includes the color name to be compared. +func TestColor(t *testing.T) { + rb := new(bytes.Buffer) + Output = rb + + NoColor = false + + testColors := []struct { + text string + code Attribute + }{ + {text: "black", code: FgBlack}, + {text: "red", code: FgRed}, + {text: "green", code: FgGreen}, + {text: "yellow", code: FgYellow}, + {text: "blue", code: FgBlue}, + {text: "magent", code: FgMagenta}, + {text: "cyan", code: FgCyan}, + {text: "white", code: FgWhite}, + {text: "hblack", code: FgHiBlack}, + {text: "hred", code: FgHiRed}, + {text: "hgreen", code: FgHiGreen}, + {text: "hyellow", code: FgHiYellow}, + {text: "hblue", code: FgHiBlue}, + {text: "hmagent", code: FgHiMagenta}, + {text: "hcyan", code: FgHiCyan}, + {text: "hwhite", code: FgHiWhite}, + } + + for _, c := range testColors { + New(c.code).Print(c.text) + + line, _ := rb.ReadString('\n') + scannedLine := fmt.Sprintf("%q", line) + colored := fmt.Sprintf("\x1b[%dm%s\x1b[0m", c.code, c.text) + escapedForm := fmt.Sprintf("%q", colored) + + fmt.Printf("%s\t: %s\n", c.text, line) + + if scannedLine != escapedForm { + t.Errorf("Expecting %s, got '%s'\n", escapedForm, scannedLine) + } + } + + for _, c := range testColors { + line := New(c.code).Sprintf("%s", c.text) + scannedLine := fmt.Sprintf("%q", line) + colored := fmt.Sprintf("\x1b[%dm%s\x1b[0m", c.code, c.text) + escapedForm := fmt.Sprintf("%q", colored) + + fmt.Printf("%s\t: %s\n", c.text, line) + + if scannedLine != escapedForm { + t.Errorf("Expecting %s, got '%s'\n", escapedForm, scannedLine) + } + } +} + +func TestColorEquals(t *testing.T) { + fgblack1 := New(FgBlack) + fgblack2 := New(FgBlack) + bgblack := New(BgBlack) + fgbgblack := New(FgBlack, BgBlack) + fgblackbgred := New(FgBlack, BgRed) + fgred := New(FgRed) + bgred := New(BgRed) + + if !fgblack1.Equals(fgblack2) { + t.Error("Two black colors are not equal") + } + + if fgblack1.Equals(bgblack) { + t.Error("Fg and bg black colors are equal") + } + + if fgblack1.Equals(fgbgblack) { + t.Error("Fg black equals fg/bg black color") + } + + if fgblack1.Equals(fgred) { + t.Error("Fg black equals Fg red") + } + + if fgblack1.Equals(bgred) { + t.Error("Fg black equals Bg red") + } + + if fgblack1.Equals(fgblackbgred) { + t.Error("Fg black equals fg black bg red") + } +} + +func TestNoColor(t *testing.T) { + rb := new(bytes.Buffer) + Output = rb + + testColors := []struct { + text string + code Attribute + }{ + {text: "black", code: FgBlack}, + {text: "red", code: FgRed}, + {text: "green", code: FgGreen}, + {text: "yellow", code: FgYellow}, + {text: "blue", code: FgBlue}, + {text: "magent", code: FgMagenta}, + {text: "cyan", code: FgCyan}, + {text: "white", code: FgWhite}, + {text: "hblack", code: FgHiBlack}, + {text: "hred", code: FgHiRed}, + {text: "hgreen", code: FgHiGreen}, + {text: "hyellow", code: FgHiYellow}, + {text: "hblue", code: FgHiBlue}, + {text: "hmagent", code: FgHiMagenta}, + {text: "hcyan", code: FgHiCyan}, + {text: "hwhite", code: FgHiWhite}, + } + + for _, c := range testColors { + p := New(c.code) + p.DisableColor() + p.Print(c.text) + + line, _ := rb.ReadString('\n') + if line != c.text { + t.Errorf("Expecting %s, got '%s'\n", c.text, line) + } + } + + // global check + NoColor = true + t.Cleanup(func() { + NoColor = false + }) + + for _, c := range testColors { + p := New(c.code) + p.Print(c.text) + + line, _ := rb.ReadString('\n') + if line != c.text { + t.Errorf("Expecting %s, got '%s'\n", c.text, line) + } + } +} + +func TestNoColor_Env(t *testing.T) { + rb := new(bytes.Buffer) + Output = rb + + testColors := []struct { + text string + code Attribute + }{ + {text: "black", code: FgBlack}, + {text: "red", code: FgRed}, + {text: "green", code: FgGreen}, + {text: "yellow", code: FgYellow}, + {text: "blue", code: FgBlue}, + {text: "magent", code: FgMagenta}, + {text: "cyan", code: FgCyan}, + {text: "white", code: FgWhite}, + {text: "hblack", code: FgHiBlack}, + {text: "hred", code: FgHiRed}, + {text: "hgreen", code: FgHiGreen}, + {text: "hyellow", code: FgHiYellow}, + {text: "hblue", code: FgHiBlue}, + {text: "hmagent", code: FgHiMagenta}, + {text: "hcyan", code: FgHiCyan}, + {text: "hwhite", code: FgHiWhite}, + } + + os.Setenv("NO_COLOR", "") + t.Cleanup(func() { + os.Unsetenv("NO_COLOR") + }) + + for _, c := range testColors { + p := New(c.code) + p.Print(c.text) + + line, _ := rb.ReadString('\n') + if line != c.text { + t.Errorf("Expecting %s, got '%s'\n", c.text, line) + } + } + +} + +func TestColorVisual(t *testing.T) { + // First Visual Test + Output = colorable.NewColorableStdout() + + New(FgRed).Printf("red\t") + New(BgRed).Print(" ") + New(FgRed, Bold).Println(" red") + + New(FgGreen).Printf("green\t") + New(BgGreen).Print(" ") + New(FgGreen, Bold).Println(" green") + + New(FgYellow).Printf("yellow\t") + New(BgYellow).Print(" ") + New(FgYellow, Bold).Println(" yellow") + + New(FgBlue).Printf("blue\t") + New(BgBlue).Print(" ") + New(FgBlue, Bold).Println(" blue") + + New(FgMagenta).Printf("magenta\t") + New(BgMagenta).Print(" ") + New(FgMagenta, Bold).Println(" magenta") + + New(FgCyan).Printf("cyan\t") + New(BgCyan).Print(" ") + New(FgCyan, Bold).Println(" cyan") + + New(FgWhite).Printf("white\t") + New(BgWhite).Print(" ") + New(FgWhite, Bold).Println(" white") + fmt.Println("") + + // Second Visual test + Black("black") + Red("red") + Green("green") + Yellow("yellow") + Blue("blue") + Magenta("magenta") + Cyan("cyan") + White("white") + HiBlack("hblack") + HiRed("hred") + HiGreen("hgreen") + HiYellow("hyellow") + HiBlue("hblue") + HiMagenta("hmagenta") + HiCyan("hcyan") + HiWhite("hwhite") + + // Third visual test + fmt.Println() + Set(FgBlue) + fmt.Println("is this blue?") + Unset() + + Set(FgMagenta) + fmt.Println("and this magenta?") + Unset() + + // Fourth Visual test + fmt.Println() + blue := New(FgBlue).PrintlnFunc() + blue("blue text with custom print func") + + red := New(FgRed).PrintfFunc() + red("red text with a printf func: %d\n", 123) + + put := New(FgYellow).SprintFunc() + warn := New(FgRed).SprintFunc() + + fmt.Fprintf(Output, "this is a %s and this is %s.\n", put("warning"), warn("error")) + + info := New(FgWhite, BgGreen).SprintFunc() + fmt.Fprintf(Output, "this %s rocks!\n", info("package")) + + notice := New(FgBlue).FprintFunc() + notice(os.Stderr, "just a blue notice to stderr") + + // Fifth Visual Test + fmt.Println() + + fmt.Fprintln(Output, BlackString("black")) + fmt.Fprintln(Output, RedString("red")) + fmt.Fprintln(Output, GreenString("green")) + fmt.Fprintln(Output, YellowString("yellow")) + fmt.Fprintln(Output, BlueString("blue")) + fmt.Fprintln(Output, MagentaString("magenta")) + fmt.Fprintln(Output, CyanString("cyan")) + fmt.Fprintln(Output, WhiteString("white")) + fmt.Fprintln(Output, HiBlackString("hblack")) + fmt.Fprintln(Output, HiRedString("hred")) + fmt.Fprintln(Output, HiGreenString("hgreen")) + fmt.Fprintln(Output, HiYellowString("hyellow")) + fmt.Fprintln(Output, HiBlueString("hblue")) + fmt.Fprintln(Output, HiMagentaString("hmagenta")) + fmt.Fprintln(Output, HiCyanString("hcyan")) + fmt.Fprintln(Output, HiWhiteString("hwhite")) +} + +func TestNoFormat(t *testing.T) { + fmt.Printf("%s %%s = ", BlackString("Black")) + Black("%s") + + fmt.Printf("%s %%s = ", RedString("Red")) + Red("%s") + + fmt.Printf("%s %%s = ", GreenString("Green")) + Green("%s") + + fmt.Printf("%s %%s = ", YellowString("Yellow")) + Yellow("%s") + + fmt.Printf("%s %%s = ", BlueString("Blue")) + Blue("%s") + + fmt.Printf("%s %%s = ", MagentaString("Magenta")) + Magenta("%s") + + fmt.Printf("%s %%s = ", CyanString("Cyan")) + Cyan("%s") + + fmt.Printf("%s %%s = ", WhiteString("White")) + White("%s") + + fmt.Printf("%s %%s = ", HiBlackString("HiBlack")) + HiBlack("%s") + + fmt.Printf("%s %%s = ", HiRedString("HiRed")) + HiRed("%s") + + fmt.Printf("%s %%s = ", HiGreenString("HiGreen")) + HiGreen("%s") + + fmt.Printf("%s %%s = ", HiYellowString("HiYellow")) + HiYellow("%s") + + fmt.Printf("%s %%s = ", HiBlueString("HiBlue")) + HiBlue("%s") + + fmt.Printf("%s %%s = ", HiMagentaString("HiMagenta")) + HiMagenta("%s") + + fmt.Printf("%s %%s = ", HiCyanString("HiCyan")) + HiCyan("%s") + + fmt.Printf("%s %%s = ", HiWhiteString("HiWhite")) + HiWhite("%s") +} + +func TestNoFormatString(t *testing.T) { + tests := []struct { + f func(string, ...interface{}) string + format string + args []interface{} + want string + }{ + {BlackString, "%s", nil, "\x1b[30m%s\x1b[0m"}, + {RedString, "%s", nil, "\x1b[31m%s\x1b[0m"}, + {GreenString, "%s", nil, "\x1b[32m%s\x1b[0m"}, + {YellowString, "%s", nil, "\x1b[33m%s\x1b[0m"}, + {BlueString, "%s", nil, "\x1b[34m%s\x1b[0m"}, + {MagentaString, "%s", nil, "\x1b[35m%s\x1b[0m"}, + {CyanString, "%s", nil, "\x1b[36m%s\x1b[0m"}, + {WhiteString, "%s", nil, "\x1b[37m%s\x1b[0m"}, + {HiBlackString, "%s", nil, "\x1b[90m%s\x1b[0m"}, + {HiRedString, "%s", nil, "\x1b[91m%s\x1b[0m"}, + {HiGreenString, "%s", nil, "\x1b[92m%s\x1b[0m"}, + {HiYellowString, "%s", nil, "\x1b[93m%s\x1b[0m"}, + {HiBlueString, "%s", nil, "\x1b[94m%s\x1b[0m"}, + {HiMagentaString, "%s", nil, "\x1b[95m%s\x1b[0m"}, + {HiCyanString, "%s", nil, "\x1b[96m%s\x1b[0m"}, + {HiWhiteString, "%s", nil, "\x1b[97m%s\x1b[0m"}, + } + + for i, test := range tests { + s := fmt.Sprintf("%s", test.f(test.format, test.args...)) + if s != test.want { + t.Errorf("[%d] want: %q, got: %q", i, test.want, s) + } + } +} diff --git a/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/doc.go b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/doc.go new file mode 100644 index 0000000..04541de --- /dev/null +++ b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/doc.go @@ -0,0 +1,135 @@ +/* +Package color is an ANSI color package to output colorized or SGR defined +output to the standard output. The API can be used in several way, pick one +that suits you. + +Use simple and default helper functions with predefined foreground colors: + + color.Cyan("Prints text in cyan.") + + // a newline will be appended automatically + color.Blue("Prints %s in blue.", "text") + + // More default foreground colors.. + color.Red("We have red") + color.Yellow("Yellow color too!") + color.Magenta("And many others ..") + + // Hi-intensity colors + color.HiGreen("Bright green color.") + color.HiBlack("Bright black means gray..") + color.HiWhite("Shiny white color!") + +However there are times where custom color mixes are required. Below are some +examples to create custom color objects and use the print functions of each +separate color object. + + // Create a new color object + c := color.New(color.FgCyan).Add(color.Underline) + c.Println("Prints cyan text with an underline.") + + // Or just add them to New() + d := color.New(color.FgCyan, color.Bold) + d.Printf("This prints bold cyan %s\n", "too!.") + + + // Mix up foreground and background colors, create new mixes! + red := color.New(color.FgRed) + + boldRed := red.Add(color.Bold) + boldRed.Println("This will print text in bold red.") + + whiteBackground := red.Add(color.BgWhite) + whiteBackground.Println("Red text with White background.") + + // Use your own io.Writer output + color.New(color.FgBlue).Fprintln(myWriter, "blue color!") + + blue := color.New(color.FgBlue) + blue.Fprint(myWriter, "This will print text in blue.") + +You can create PrintXxx functions to simplify even more: + + // Create a custom print function for convenient + red := color.New(color.FgRed).PrintfFunc() + red("warning") + red("error: %s", err) + + // Mix up multiple attributes + notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() + notice("don't forget this...") + +You can also FprintXxx functions to pass your own io.Writer: + + blue := color.New(FgBlue).FprintfFunc() + blue(myWriter, "important notice: %s", stars) + + // Mix up with multiple attributes + success := color.New(color.Bold, color.FgGreen).FprintlnFunc() + success(myWriter, don't forget this...") + + +Or create SprintXxx functions to mix strings with other non-colorized strings: + + yellow := New(FgYellow).SprintFunc() + red := New(FgRed).SprintFunc() + + fmt.Printf("this is a %s and this is %s.\n", yellow("warning"), red("error")) + + info := New(FgWhite, BgGreen).SprintFunc() + fmt.Printf("this %s rocks!\n", info("package")) + +Windows support is enabled by default. All Print functions work as intended. +However only for color.SprintXXX functions, user should use fmt.FprintXXX and +set the output to color.Output: + + fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) + + info := New(FgWhite, BgGreen).SprintFunc() + fmt.Fprintf(color.Output, "this %s rocks!\n", info("package")) + +Using with existing code is possible. Just use the Set() method to set the +standard output to the given parameters. That way a rewrite of an existing +code is not required. + + // Use handy standard colors. + color.Set(color.FgYellow) + + fmt.Println("Existing text will be now in Yellow") + fmt.Printf("This one %s\n", "too") + + color.Unset() // don't forget to unset + + // You can mix up parameters + color.Set(color.FgMagenta, color.Bold) + defer color.Unset() // use it in your function + + fmt.Println("All text will be now bold magenta.") + +There might be a case where you want to disable color output (for example to +pipe the standard output of your app to somewhere else). `Color` has support to +disable colors both globally and for single color definition. For example +suppose you have a CLI app and a `--no-color` bool flag. You can easily disable +the color output with: + + var flagNoColor = flag.Bool("no-color", false, "Disable color output") + + if *flagNoColor { + color.NoColor = true // disables colorized output + } + +You can also disable the color by setting the NO_COLOR environment variable to any value. + +It also has support for single color definitions (local). You can +disable/enable color output on the fly: + + c := color.New(color.FgCyan) + c.Println("Prints cyan text") + + c.DisableColor() + c.Println("This is printed without any color") + + c.EnableColor() + c.Println("This prints again cyan...") +*/ +package color diff --git a/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/go.mod b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/go.mod new file mode 100644 index 0000000..c9b3cd5 --- /dev/null +++ b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/go.mod @@ -0,0 +1,8 @@ +module github.com/fatih/color + +go 1.13 + +require ( + github.com/mattn/go-colorable v0.1.9 + github.com/mattn/go-isatty v0.0.14 +) diff --git a/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/go.sum b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/go.sum new file mode 100644 index 0000000..cbbcfb6 --- /dev/null +++ b/dependencies/pkg/mod/github.com/fatih/color@v1.13.0/go.sum @@ -0,0 +1,9 @@ +github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +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= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/FUNDING.yml b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/FUNDING.yml new file mode 100644 index 0000000..707670d --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: ['https://uptrace.dev/sponsor'] diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/ISSUE_TEMPLATE/bug_report.md b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..3f934f8 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,49 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' +--- + +Issue tracker is used for reporting bugs and discussing new features. Please use +[stackoverflow](https://stackoverflow.com) for supporting issues. + + + +## Expected Behavior + + + +## Current Behavior + + + +## Possible Solution + + + +## Steps to Reproduce + + + + +1. +2. +3. +4. + +## Context (Environment) + + + + + + +## Detailed Description + + + +## Possible Implementation + + diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/ISSUE_TEMPLATE/config.yml b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..e86d7a6 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Discussions + url: https://github.com/go-redis/redis/discussions + about: Ask a question via GitHub Discussions diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/dependabot.yml b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/dependabot.yml new file mode 100644 index 0000000..77b7be5 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: +- package-ecosystem: gomod + directory: / + schedule: + interval: weekly +- package-ecosystem: github-actions + directory: / + schedule: + interval: weekly diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/build.yml b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/build.yml new file mode 100644 index 0000000..a574e2e --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Go + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + name: build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go-version: [1.16.x, 1.17.x] + + services: + redis: + image: redis + options: >- + --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 + ports: + - 6379:6379 + + steps: + - name: Set up ${{ matrix.go-version }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Test + run: make test diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/commitlint.yml b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/commitlint.yml new file mode 100644 index 0000000..5fcfeae --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/commitlint.yml @@ -0,0 +1,11 @@ +name: Lint Commit Messages +on: [pull_request] + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v4 diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/golangci-lint.yml b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..28c16c5 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/golangci-lint.yml @@ -0,0 +1,19 @@ +name: golangci-lint + +on: + push: + tags: + - v* + branches: + - master + - main + pull_request: + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/release.yml b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/release.yml new file mode 100644 index 0000000..685693a --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: Releases + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ncipollo/release-action@v1 + with: + body: + Please refer to + [CHANGELOG.md](https://github.com/go-redis/redis/blob/master/CHANGELOG.md) for details diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.gitignore b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.gitignore new file mode 100644 index 0000000..b975a7b --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.gitignore @@ -0,0 +1,3 @@ +*.rdb +testdata/*/ +.idea/ diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.golangci.yml b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.golangci.yml new file mode 100644 index 0000000..de51455 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.golangci.yml @@ -0,0 +1,4 @@ +run: + concurrency: 8 + deadline: 5m + tests: false diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.prettierrc.yml b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.prettierrc.yml new file mode 100644 index 0000000..8b7f044 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/.prettierrc.yml @@ -0,0 +1,4 @@ +semi: false +singleQuote: true +proseWrap: always +printWidth: 100 diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/CHANGELOG.md b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/CHANGELOG.md new file mode 100644 index 0000000..195e519 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/CHANGELOG.md @@ -0,0 +1,177 @@ +## [8.11.5](https://github.com/go-redis/redis/compare/v8.11.4...v8.11.5) (2022-03-17) + + +### Bug Fixes + +* add missing Expire methods to Cmdable ([17e3b43](https://github.com/go-redis/redis/commit/17e3b43879d516437ada71cf9c0deac6a382ed9a)) +* add whitespace for avoid unlikely colisions ([7f7c181](https://github.com/go-redis/redis/commit/7f7c1817617cfec909efb13d14ad22ef05a6ad4c)) +* example/otel compile error ([#2028](https://github.com/go-redis/redis/issues/2028)) ([187c07c](https://github.com/go-redis/redis/commit/187c07c41bf68dc3ab280bc3a925e960bbef6475)) +* **extra/redisotel:** set span.kind attribute to client ([065b200](https://github.com/go-redis/redis/commit/065b200070b41e6e949710b4f9e01b50ccc60ab2)) +* format ([96f53a0](https://github.com/go-redis/redis/commit/96f53a0159a28affa94beec1543a62234e7f8b32)) +* invalid type assert in stringArg ([de6c131](https://github.com/go-redis/redis/commit/de6c131865b8263400c8491777b295035f2408e4)) +* rename Golang to Go ([#2030](https://github.com/go-redis/redis/issues/2030)) ([b82a2d9](https://github.com/go-redis/redis/commit/b82a2d9d4d2de7b7cbe8fcd4895be62dbcacacbc)) +* set timeout for WAIT command. Fixes [#1963](https://github.com/go-redis/redis/issues/1963) ([333fee1](https://github.com/go-redis/redis/commit/333fee1a8fd98a2fbff1ab187c1b03246a7eb01f)) +* update some argument counts in pre-allocs ([f6974eb](https://github.com/go-redis/redis/commit/f6974ebb5c40a8adf90d2cacab6dc297f4eba4c2)) + + +### Features + +* Add redis v7's NX, XX, GT, LT expire variants ([e19bbb2](https://github.com/go-redis/redis/commit/e19bbb26e2e395c6e077b48d80d79e99f729a8b8)) +* add support for acl sentinel auth in universal client ([ab0ccc4](https://github.com/go-redis/redis/commit/ab0ccc47413f9b2a6eabc852fed5005a3ee1af6e)) +* add support for COPY command ([#2016](https://github.com/go-redis/redis/issues/2016)) ([730afbc](https://github.com/go-redis/redis/commit/730afbcffb93760e8a36cc06cfe55ab102b693a7)) +* add support for passing extra attributes added to spans ([39faaa1](https://github.com/go-redis/redis/commit/39faaa171523834ba527c9789710c4fde87f5a2e)) +* add support for time.Duration write and scan ([2f1b74e](https://github.com/go-redis/redis/commit/2f1b74e20cdd7719b2aecf0768d3e3ae7c3e781b)) +* **redisotel:** ability to override TracerProvider ([#1998](https://github.com/go-redis/redis/issues/1998)) ([bf8d4aa](https://github.com/go-redis/redis/commit/bf8d4aa60c00366cda2e98c3ddddc8cf68507417)) +* set net.peer.name and net.peer.port in otel example ([69bf454](https://github.com/go-redis/redis/commit/69bf454f706204211cd34835f76b2e8192d3766d)) + + + +## [8.11.4](https://github.com/go-redis/redis/compare/v8.11.3...v8.11.4) (2021-10-04) + + +### Features + +* add acl auth support for sentinels ([f66582f](https://github.com/go-redis/redis/commit/f66582f44f3dc3a4705a5260f982043fde4aa634)) +* add Cmd.{String,Int,Float,Bool}Slice helpers and an example ([5d3d293](https://github.com/go-redis/redis/commit/5d3d293cc9c60b90871e2420602001463708ce24)) +* add SetVal method for each command ([168981d](https://github.com/go-redis/redis/commit/168981da2d84ee9e07d15d3e74d738c162e264c4)) + + + +## v8.11 + +- Remove OpenTelemetry metrics. +- Supports more redis commands and options. + +## v8.10 + +- Removed extra OpenTelemetry spans from go-redis core. Now go-redis instrumentation only adds a + single span with a Redis command (instead of 4 spans). There are multiple reasons behind this + decision: + + - Traces become smaller and less noisy. + - It may be costly to process those 3 extra spans for each query. + - go-redis no longer depends on OpenTelemetry. + + Eventually we hope to replace the information that we no longer collect with OpenTelemetry + Metrics. + +## v8.9 + +- Changed `PubSub.Channel` to only rely on `Ping` result. You can now use `WithChannelSize`, + `WithChannelHealthCheckInterval`, and `WithChannelSendTimeout` to override default settings. + +## v8.8 + +- To make updating easier, extra modules now have the same version as go-redis does. That means that + you need to update your imports: + +``` +github.com/go-redis/redis/extra/redisotel -> github.com/go-redis/redis/extra/redisotel/v8 +github.com/go-redis/redis/extra/rediscensus -> github.com/go-redis/redis/extra/rediscensus/v8 +``` + +## v8.5 + +- [knadh](https://github.com/knadh) contributed long-awaited ability to scan Redis Hash into a + struct: + +```go +err := rdb.HGetAll(ctx, "hash").Scan(&data) + +err := rdb.MGet(ctx, "key1", "key2").Scan(&data) +``` + +- Please check [redismock](https://github.com/go-redis/redismock) by + [monkey92t](https://github.com/monkey92t) if you are looking for mocking Redis Client. + +## v8 + +- All commands require `context.Context` as a first argument, e.g. `rdb.Ping(ctx)`. If you are not + using `context.Context` yet, the simplest option is to define global package variable + `var ctx = context.TODO()` and use it when `ctx` is required. + +- Full support for `context.Context` canceling. + +- Added `redis.NewFailoverClusterClient` that supports routing read-only commands to a slave node. + +- Added `redisext.OpenTemetryHook` that adds + [Redis OpenTelemetry instrumentation](https://redis.uptrace.dev/tracing/). + +- Redis slow log support. + +- Ring uses Rendezvous Hashing by default which provides better distribution. You need to move + existing keys to a new location or keys will be inaccessible / lost. To use old hashing scheme: + +```go +import "github.com/golang/groupcache/consistenthash" + +ring := redis.NewRing(&redis.RingOptions{ + NewConsistentHash: func() { + return consistenthash.New(100, crc32.ChecksumIEEE) + }, +}) +``` + +- `ClusterOptions.MaxRedirects` default value is changed from 8 to 3. +- `Options.MaxRetries` default value is changed from 0 to 3. + +- `Cluster.ForEachNode` is renamed to `ForEachShard` for consistency with `Ring`. + +## v7.3 + +- New option `Options.Username` which causes client to use `AuthACL`. Be aware if your connection + URL contains username. + +## v7.2 + +- Existing `HMSet` is renamed to `HSet` and old deprecated `HMSet` is restored for Redis 3 users. + +## v7.1 + +- Existing `Cmd.String` is renamed to `Cmd.Text`. New `Cmd.String` implements `fmt.Stringer` + interface. + +## v7 + +- _Important_. Tx.Pipeline now returns a non-transactional pipeline. Use Tx.TxPipeline for a + transactional pipeline. +- WrapProcess is replaced with more convenient AddHook that has access to context.Context. +- WithContext now can not be used to create a shallow copy of the client. +- New methods ProcessContext, DoContext, and ExecContext. +- Client respects Context.Deadline when setting net.Conn deadline. +- Client listens on Context.Done while waiting for a connection from the pool and returns an error + when context context is cancelled. +- Add PubSub.ChannelWithSubscriptions that sends `*Subscription` in addition to `*Message` to allow + detecting reconnections. +- `time.Time` is now marshalled in RFC3339 format. `rdb.Get("foo").Time()` helper is added to parse + the time. +- `SetLimiter` is removed and added `Options.Limiter` instead. +- `HMSet` is deprecated as of Redis v4. + +## v6.15 + +- Cluster and Ring pipelines process commands for each node in its own goroutine. + +## 6.14 + +- Added Options.MinIdleConns. +- Added Options.MaxConnAge. +- PoolStats.FreeConns is renamed to PoolStats.IdleConns. +- Add Client.Do to simplify creating custom commands. +- Add Cmd.String, Cmd.Int, Cmd.Int64, Cmd.Uint64, Cmd.Float64, and Cmd.Bool helpers. +- Lower memory usage. + +## v6.13 + +- Ring got new options called `HashReplicas` and `Hash`. It is recommended to set + `HashReplicas = 1000` for better keys distribution between shards. +- Cluster client was optimized to use much less memory when reloading cluster state. +- PubSub.ReceiveMessage is re-worked to not use ReceiveTimeout so it does not lose data when timeout + occurres. In most cases it is recommended to use PubSub.Channel instead. +- Dialer.KeepAlive is set to 5 minutes by default. + +## v6.12 + +- ClusterClient got new option called `ClusterSlots` which allows to build cluster of normal Redis + Servers that don't have cluster mode enabled. See + https://godoc.org/github.com/go-redis/redis#example-NewClusterClient--ManualSetup diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/LICENSE b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/LICENSE new file mode 100644 index 0000000..298bed9 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013 The github.com/go-redis/redis Authors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/Makefile b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/Makefile new file mode 100644 index 0000000..a4cfe05 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/Makefile @@ -0,0 +1,35 @@ +PACKAGE_DIRS := $(shell find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; | sort) + +test: testdeps + go test ./... + go test ./... -short -race + go test ./... -run=NONE -bench=. -benchmem + env GOOS=linux GOARCH=386 go test ./... + go vet + +testdeps: testdata/redis/src/redis-server + +bench: testdeps + go test ./... -test.run=NONE -test.bench=. -test.benchmem + +.PHONY: all test testdeps bench + +testdata/redis: + mkdir -p $@ + wget -qO- https://download.redis.io/releases/redis-6.2.5.tar.gz | tar xvz --strip-components=1 -C $@ + +testdata/redis/src/redis-server: testdata/redis + cd $< && make all + +fmt: + gofmt -w -s ./ + goimports -w -local github.com/go-redis/redis ./ + +go_mod_tidy: + go get -u && go mod tidy + set -e; for dir in $(PACKAGE_DIRS); do \ + echo "go mod tidy in $${dir}"; \ + (cd "$${dir}" && \ + go get -u && \ + go mod tidy); \ + done diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/README.md b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/README.md new file mode 100644 index 0000000..f3b6a01 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/README.md @@ -0,0 +1,175 @@ +# Redis client for Go + +![build workflow](https://github.com/go-redis/redis/actions/workflows/build.yml/badge.svg) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/go-redis/redis/v8)](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc) +[![Documentation](https://img.shields.io/badge/redis-documentation-informational)](https://redis.uptrace.dev/) + +go-redis is brought to you by :star: [**uptrace/uptrace**](https://github.com/uptrace/uptrace). +Uptrace is an open source and blazingly fast **distributed tracing** backend powered by +OpenTelemetry and ClickHouse. Give it a star as well! + +## Resources + +- [Discussions](https://github.com/go-redis/redis/discussions) +- [Documentation](https://redis.uptrace.dev) +- [Reference](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc) +- [Examples](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#pkg-examples) +- [RealWorld example app](https://github.com/uptrace/go-treemux-realworld-example-app) + +Other projects you may like: + +- [Bun](https://bun.uptrace.dev) - fast and simple SQL client for PostgreSQL, MySQL, and SQLite. +- [BunRouter](https://bunrouter.uptrace.dev/) - fast and flexible HTTP router for Go. + +## Ecosystem + +- [Redis Mock](https://github.com/go-redis/redismock) +- [Distributed Locks](https://github.com/bsm/redislock) +- [Redis Cache](https://github.com/go-redis/cache) +- [Rate limiting](https://github.com/go-redis/redis_rate) + +## Features + +- Redis 3 commands except QUIT, MONITOR, and SYNC. +- Automatic connection pooling with + [circuit breaker](https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern) support. +- [Pub/Sub](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#PubSub). +- [Transactions](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-Client-TxPipeline). +- [Pipeline](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-Client.Pipeline) and + [TxPipeline](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-Client.TxPipeline). +- [Scripting](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#Script). +- [Timeouts](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#Options). +- [Redis Sentinel](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#NewFailoverClient). +- [Redis Cluster](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#NewClusterClient). +- [Cluster of Redis Servers](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-NewClusterClient-ManualSetup) + without using cluster mode and Redis Sentinel. +- [Ring](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#NewRing). +- [Instrumentation](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#example-package-Instrumentation). + +## Installation + +go-redis supports 2 last Go versions and requires a Go version with +[modules](https://github.com/golang/go/wiki/Modules) support. So make sure to initialize a Go +module: + +```shell +go mod init github.com/my/repo +``` + +And then install go-redis/v8 (note _v8_ in the import; omitting it is a popular mistake): + +```shell +go get github.com/go-redis/redis/v8 +``` + +## Quickstart + +```go +import ( + "context" + "github.com/go-redis/redis/v8" + "fmt" +) + +var ctx = context.Background() + +func ExampleClient() { + rdb := redis.NewClient(&redis.Options{ + Addr: "localhost:6379", + Password: "", // no password set + DB: 0, // use default DB + }) + + err := rdb.Set(ctx, "key", "value", 0).Err() + if err != nil { + panic(err) + } + + val, err := rdb.Get(ctx, "key").Result() + if err != nil { + panic(err) + } + fmt.Println("key", val) + + val2, err := rdb.Get(ctx, "key2").Result() + if err == redis.Nil { + fmt.Println("key2 does not exist") + } else if err != nil { + panic(err) + } else { + fmt.Println("key2", val2) + } + // Output: key value + // key2 does not exist +} +``` + +## Look and feel + +Some corner cases: + +```go +// SET key value EX 10 NX +set, err := rdb.SetNX(ctx, "key", "value", 10*time.Second).Result() + +// SET key value keepttl NX +set, err := rdb.SetNX(ctx, "key", "value", redis.KeepTTL).Result() + +// SORT list LIMIT 0 2 ASC +vals, err := rdb.Sort(ctx, "list", &redis.Sort{Offset: 0, Count: 2, Order: "ASC"}).Result() + +// ZRANGEBYSCORE zset -inf +inf WITHSCORES LIMIT 0 2 +vals, err := rdb.ZRangeByScoreWithScores(ctx, "zset", &redis.ZRangeBy{ + Min: "-inf", + Max: "+inf", + Offset: 0, + Count: 2, +}).Result() + +// ZINTERSTORE out 2 zset1 zset2 WEIGHTS 2 3 AGGREGATE SUM +vals, err := rdb.ZInterStore(ctx, "out", &redis.ZStore{ + Keys: []string{"zset1", "zset2"}, + Weights: []int64{2, 3} +}).Result() + +// EVAL "return {KEYS[1],ARGV[1]}" 1 "key" "hello" +vals, err := rdb.Eval(ctx, "return {KEYS[1],ARGV[1]}", []string{"key"}, "hello").Result() + +// custom command +res, err := rdb.Do(ctx, "set", "key", "value").Result() +``` + +## Run the test + +go-redis will start a redis-server and run the test cases. + +The paths of redis-server bin file and redis config file are defined in `main_test.go`: + +``` +var ( + redisServerBin, _ = filepath.Abs(filepath.Join("testdata", "redis", "src", "redis-server")) + redisServerConf, _ = filepath.Abs(filepath.Join("testdata", "redis", "redis.conf")) +) +``` + +For local testing, you can change the variables to refer to your local files, or create a soft link +to the corresponding folder for redis-server and copy the config file to `testdata/redis/`: + +``` +ln -s /usr/bin/redis-server ./go-redis/testdata/redis/src +cp ./go-redis/testdata/redis.conf ./go-redis/testdata/redis/ +``` + +Lastly, run: + +``` +go test +``` + +## Contributors + +Thanks to all the people who already contributed! + + + + diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/RELEASING.md b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/RELEASING.md new file mode 100644 index 0000000..1115db4 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/RELEASING.md @@ -0,0 +1,15 @@ +# Releasing + +1. Run `release.sh` script which updates versions in go.mod files and pushes a new branch to GitHub: + +```shell +TAG=v1.0.0 ./scripts/release.sh +``` + +2. Open a pull request and wait for the build to finish. + +3. Merge the pull request and run `tag.sh` to create tags for packages: + +```shell +TAG=v1.0.0 ./scripts/tag.sh +``` diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/bench_decode_test.go b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/bench_decode_test.go new file mode 100644 index 0000000..8382806 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/bench_decode_test.go @@ -0,0 +1,309 @@ +package redis + +import ( + "context" + "fmt" + "io" + "net" + "testing" + "time" + + "github.com/go-redis/redis/v8/internal/proto" +) + +var ctx = context.TODO() + +type ClientStub struct { + Cmdable + resp []byte +} + +func NewClientStub(resp []byte) *ClientStub { + stub := &ClientStub{ + resp: resp, + } + stub.Cmdable = NewClient(&Options{ + PoolSize: 128, + Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) { + return stub.stubConn(), nil + }, + }) + return stub +} + +func NewClusterClientStub(resp []byte) *ClientStub { + stub := &ClientStub{ + resp: resp, + } + + client := NewClusterClient(&ClusterOptions{ + PoolSize: 128, + Addrs: []string{"127.0.0.1:6379"}, + Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) { + return stub.stubConn(), nil + }, + ClusterSlots: func(_ context.Context) ([]ClusterSlot, error) { + return []ClusterSlot{ + { + Start: 0, + End: 16383, + Nodes: []ClusterNode{{Addr: "127.0.0.1:6379"}}, + }, + }, nil + }, + }) + + // init command. + tmpClient := NewClient(&Options{Addr: ":6379"}) + cmdsInfo, err := tmpClient.Command(ctx).Result() + _ = tmpClient.Close() + client.cmdsInfoCache = newCmdsInfoCache(func(_ context.Context) (map[string]*CommandInfo, error) { + return cmdsInfo, err + }) + + stub.Cmdable = client + return stub +} + +func (c *ClientStub) stubConn() *ConnStub { + return &ConnStub{ + resp: c.resp, + } +} + +type ConnStub struct { + resp []byte + pos int +} + +func (c *ConnStub) Read(b []byte) (n int, err error) { + if len(c.resp) == 0 { + return 0, io.EOF + } + + if c.pos >= len(c.resp) { + c.pos = 0 + } + n = copy(b, c.resp[c.pos:]) + c.pos += n + return n, nil +} + +func (c *ConnStub) Write(b []byte) (n int, err error) { return len(b), nil } +func (c *ConnStub) Close() error { return nil } +func (c *ConnStub) LocalAddr() net.Addr { return nil } +func (c *ConnStub) RemoteAddr() net.Addr { return nil } +func (c *ConnStub) SetDeadline(_ time.Time) error { return nil } +func (c *ConnStub) SetReadDeadline(_ time.Time) error { return nil } +func (c *ConnStub) SetWriteDeadline(_ time.Time) error { return nil } + +type ClientStubFunc func([]byte) *ClientStub + +func BenchmarkDecode(b *testing.B) { + type Benchmark struct { + name string + stub ClientStubFunc + } + + benchmarks := []Benchmark{ + {"single", NewClientStub}, + {"cluster", NewClusterClientStub}, + } + + for _, bench := range benchmarks { + b.Run(fmt.Sprintf("RespError-%s", bench.name), func(b *testing.B) { + respError(b, bench.stub) + }) + b.Run(fmt.Sprintf("RespStatus-%s", bench.name), func(b *testing.B) { + respStatus(b, bench.stub) + }) + b.Run(fmt.Sprintf("RespInt-%s", bench.name), func(b *testing.B) { + respInt(b, bench.stub) + }) + b.Run(fmt.Sprintf("RespString-%s", bench.name), func(b *testing.B) { + respString(b, bench.stub) + }) + b.Run(fmt.Sprintf("RespArray-%s", bench.name), func(b *testing.B) { + respArray(b, bench.stub) + }) + b.Run(fmt.Sprintf("RespPipeline-%s", bench.name), func(b *testing.B) { + respPipeline(b, bench.stub) + }) + b.Run(fmt.Sprintf("RespTxPipeline-%s", bench.name), func(b *testing.B) { + respTxPipeline(b, bench.stub) + }) + + // goroutine + b.Run(fmt.Sprintf("DynamicGoroutine-%s-pool=5", bench.name), func(b *testing.B) { + dynamicGoroutine(b, bench.stub, 5) + }) + b.Run(fmt.Sprintf("DynamicGoroutine-%s-pool=20", bench.name), func(b *testing.B) { + dynamicGoroutine(b, bench.stub, 20) + }) + b.Run(fmt.Sprintf("DynamicGoroutine-%s-pool=50", bench.name), func(b *testing.B) { + dynamicGoroutine(b, bench.stub, 50) + }) + b.Run(fmt.Sprintf("DynamicGoroutine-%s-pool=100", bench.name), func(b *testing.B) { + dynamicGoroutine(b, bench.stub, 100) + }) + + b.Run(fmt.Sprintf("StaticGoroutine-%s-pool=5", bench.name), func(b *testing.B) { + staticGoroutine(b, bench.stub, 5) + }) + b.Run(fmt.Sprintf("StaticGoroutine-%s-pool=20", bench.name), func(b *testing.B) { + staticGoroutine(b, bench.stub, 20) + }) + b.Run(fmt.Sprintf("StaticGoroutine-%s-pool=50", bench.name), func(b *testing.B) { + staticGoroutine(b, bench.stub, 50) + }) + b.Run(fmt.Sprintf("StaticGoroutine-%s-pool=100", bench.name), func(b *testing.B) { + staticGoroutine(b, bench.stub, 100) + }) + } +} + +func respError(b *testing.B, stub ClientStubFunc) { + rdb := stub([]byte("-ERR test error\r\n")) + respErr := proto.RedisError("ERR test error") + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if err := rdb.Get(ctx, "key").Err(); err != respErr { + b.Fatalf("response error, got %q, want %q", err, respErr) + } + } +} + +func respStatus(b *testing.B, stub ClientStubFunc) { + rdb := stub([]byte("+OK\r\n")) + var val string + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if val = rdb.Set(ctx, "key", "value", 0).Val(); val != "OK" { + b.Fatalf("response error, got %q, want OK", val) + } + } +} + +func respInt(b *testing.B, stub ClientStubFunc) { + rdb := stub([]byte(":10\r\n")) + var val int64 + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if val = rdb.Incr(ctx, "key").Val(); val != 10 { + b.Fatalf("response error, got %q, want 10", val) + } + } +} + +func respString(b *testing.B, stub ClientStubFunc) { + rdb := stub([]byte("$5\r\nhello\r\n")) + var val string + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if val = rdb.Get(ctx, "key").Val(); val != "hello" { + b.Fatalf("response error, got %q, want hello", val) + } + } +} + +func respArray(b *testing.B, stub ClientStubFunc) { + rdb := stub([]byte("*3\r\n$5\r\nhello\r\n:10\r\n+OK\r\n")) + var val []interface{} + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if val = rdb.MGet(ctx, "key").Val(); len(val) != 3 { + b.Fatalf("response error, got len(%d), want len(3)", len(val)) + } + } +} + +func respPipeline(b *testing.B, stub ClientStubFunc) { + rdb := stub([]byte("+OK\r\n$5\r\nhello\r\n:1\r\n")) + var pipe Pipeliner + + b.ResetTimer() + for i := 0; i < b.N; i++ { + pipe = rdb.Pipeline() + set := pipe.Set(ctx, "key", "value", 0) + get := pipe.Get(ctx, "key") + del := pipe.Del(ctx, "key") + _, err := pipe.Exec(ctx) + if err != nil { + b.Fatalf("response error, got %q, want nil", err) + } + if set.Val() != "OK" || get.Val() != "hello" || del.Val() != 1 { + b.Fatal("response error") + } + } +} + +func respTxPipeline(b *testing.B, stub ClientStubFunc) { + rdb := stub([]byte("+OK\r\n+QUEUED\r\n+QUEUED\r\n+QUEUED\r\n*3\r\n+OK\r\n$5\r\nhello\r\n:1\r\n")) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + var set *StatusCmd + var get *StringCmd + var del *IntCmd + _, err := rdb.TxPipelined(ctx, func(pipe Pipeliner) error { + set = pipe.Set(ctx, "key", "value", 0) + get = pipe.Get(ctx, "key") + del = pipe.Del(ctx, "key") + return nil + }) + if err != nil { + b.Fatalf("response error, got %q, want nil", err) + } + if set.Val() != "OK" || get.Val() != "hello" || del.Val() != 1 { + b.Fatal("response error") + } + } +} + +func dynamicGoroutine(b *testing.B, stub ClientStubFunc, concurrency int) { + rdb := stub([]byte("$5\r\nhello\r\n")) + c := make(chan struct{}, concurrency) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + c <- struct{}{} + go func() { + if val := rdb.Get(ctx, "key").Val(); val != "hello" { + panic(fmt.Sprintf("response error, got %q, want hello", val)) + } + <-c + }() + } + // Here no longer wait for all goroutines to complete, it will not affect the test results. + close(c) +} + +func staticGoroutine(b *testing.B, stub ClientStubFunc, concurrency int) { + rdb := stub([]byte("$5\r\nhello\r\n")) + c := make(chan struct{}, concurrency) + + b.ResetTimer() + + for i := 0; i < concurrency; i++ { + go func() { + for { + _, ok := <-c + if !ok { + return + } + if val := rdb.Get(ctx, "key").Val(); val != "hello" { + panic(fmt.Sprintf("response error, got %q, want hello", val)) + } + } + }() + } + for i := 0; i < b.N; i++ { + c <- struct{}{} + } + close(c) +} diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/bench_test.go b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/bench_test.go new file mode 100644 index 0000000..ba81ce8 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/bench_test.go @@ -0,0 +1,412 @@ +package redis_test + +import ( + "bytes" + "context" + "fmt" + "strconv" + "strings" + "sync" + "testing" + "time" + + "github.com/go-redis/redis/v8" +) + +func benchmarkRedisClient(ctx context.Context, poolSize int) *redis.Client { + client := redis.NewClient(&redis.Options{ + Addr: ":6379", + DialTimeout: time.Second, + ReadTimeout: time.Second, + WriteTimeout: time.Second, + PoolSize: poolSize, + }) + if err := client.FlushDB(ctx).Err(); err != nil { + panic(err) + } + return client +} + +func BenchmarkRedisPing(b *testing.B) { + ctx := context.Background() + rdb := benchmarkRedisClient(ctx, 10) + defer rdb.Close() + + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + if err := rdb.Ping(ctx).Err(); err != nil { + b.Fatal(err) + } + } + }) +} + +func BenchmarkSetGoroutines(b *testing.B) { + ctx := context.Background() + rdb := benchmarkRedisClient(ctx, 10) + defer rdb.Close() + + for i := 0; i < b.N; i++ { + var wg sync.WaitGroup + + for i := 0; i < 1000; i++ { + wg.Add(1) + go func() { + defer wg.Done() + + err := rdb.Set(ctx, "hello", "world", 0).Err() + if err != nil { + panic(err) + } + }() + } + + wg.Wait() + } +} + +func BenchmarkRedisGetNil(b *testing.B) { + ctx := context.Background() + client := benchmarkRedisClient(ctx, 10) + defer client.Close() + + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + if err := client.Get(ctx, "key").Err(); err != redis.Nil { + b.Fatal(err) + } + } + }) +} + +type setStringBenchmark struct { + poolSize int + valueSize int +} + +func (bm setStringBenchmark) String() string { + return fmt.Sprintf("pool=%d value=%d", bm.poolSize, bm.valueSize) +} + +func BenchmarkRedisSetString(b *testing.B) { + benchmarks := []setStringBenchmark{ + {10, 64}, + {10, 1024}, + {10, 64 * 1024}, + {10, 1024 * 1024}, + {10, 10 * 1024 * 1024}, + + {100, 64}, + {100, 1024}, + {100, 64 * 1024}, + {100, 1024 * 1024}, + {100, 10 * 1024 * 1024}, + } + for _, bm := range benchmarks { + b.Run(bm.String(), func(b *testing.B) { + ctx := context.Background() + client := benchmarkRedisClient(ctx, bm.poolSize) + defer client.Close() + + value := strings.Repeat("1", bm.valueSize) + + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + err := client.Set(ctx, "key", value, 0).Err() + if err != nil { + b.Fatal(err) + } + } + }) + }) + } +} + +func BenchmarkRedisSetGetBytes(b *testing.B) { + ctx := context.Background() + client := benchmarkRedisClient(ctx, 10) + defer client.Close() + + value := bytes.Repeat([]byte{'1'}, 10000) + + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + if err := client.Set(ctx, "key", value, 0).Err(); err != nil { + b.Fatal(err) + } + + got, err := client.Get(ctx, "key").Bytes() + if err != nil { + b.Fatal(err) + } + if !bytes.Equal(got, value) { + b.Fatalf("got != value") + } + } + }) +} + +func BenchmarkRedisMGet(b *testing.B) { + ctx := context.Background() + client := benchmarkRedisClient(ctx, 10) + defer client.Close() + + if err := client.MSet(ctx, "key1", "hello1", "key2", "hello2").Err(); err != nil { + b.Fatal(err) + } + + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + if err := client.MGet(ctx, "key1", "key2").Err(); err != nil { + b.Fatal(err) + } + } + }) +} + +func BenchmarkSetExpire(b *testing.B) { + ctx := context.Background() + client := benchmarkRedisClient(ctx, 10) + defer client.Close() + + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + if err := client.Set(ctx, "key", "hello", 0).Err(); err != nil { + b.Fatal(err) + } + if err := client.Expire(ctx, "key", time.Second).Err(); err != nil { + b.Fatal(err) + } + } + }) +} + +func BenchmarkPipeline(b *testing.B) { + ctx := context.Background() + client := benchmarkRedisClient(ctx, 10) + defer client.Close() + + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + _, err := client.Pipelined(ctx, func(pipe redis.Pipeliner) error { + pipe.Set(ctx, "key", "hello", 0) + pipe.Expire(ctx, "key", time.Second) + return nil + }) + if err != nil { + b.Fatal(err) + } + } + }) +} + +func BenchmarkZAdd(b *testing.B) { + ctx := context.Background() + client := benchmarkRedisClient(ctx, 10) + defer client.Close() + + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + err := client.ZAdd(ctx, "key", &redis.Z{ + Score: float64(1), + Member: "hello", + }).Err() + if err != nil { + b.Fatal(err) + } + } + }) +} + +func BenchmarkXRead(b *testing.B) { + ctx := context.Background() + client := benchmarkRedisClient(ctx, 10) + defer client.Close() + + args := redis.XAddArgs{ + Stream: "1", + ID: "*", + Values: map[string]string{"uno": "dos"}, + } + + lenStreams := 16 + streams := make([]string, 0, lenStreams) + for i := 0; i < lenStreams; i++ { + streams = append(streams, strconv.Itoa(i)) + } + for i := 0; i < lenStreams; i++ { + streams = append(streams, "0") + } + + b.ReportAllocs() + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + client.XAdd(ctx, &args) + + err := client.XRead(ctx, &redis.XReadArgs{ + Streams: streams, + Count: 1, + Block: time.Second, + }).Err() + if err != nil { + b.Fatal(err) + } + } + }) +} + +var clientSink *redis.Client + +func BenchmarkWithContext(b *testing.B) { + ctx := context.Background() + rdb := benchmarkRedisClient(ctx, 10) + defer rdb.Close() + + b.ResetTimer() + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + clientSink = rdb.WithContext(ctx) + } +} + +var ringSink *redis.Ring + +func BenchmarkRingWithContext(b *testing.B) { + ctx := context.Background() + rdb := redis.NewRing(&redis.RingOptions{}) + defer rdb.Close() + + b.ResetTimer() + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + ringSink = rdb.WithContext(ctx) + } +} + +//------------------------------------------------------------------------------ + +func newClusterScenario() *clusterScenario { + return &clusterScenario{ + ports: []string{"8220", "8221", "8222", "8223", "8224", "8225"}, + nodeIDs: make([]string, 6), + processes: make(map[string]*redisProcess, 6), + clients: make(map[string]*redis.Client, 6), + } +} + +func BenchmarkClusterPing(b *testing.B) { + if testing.Short() { + b.Skip("skipping in short mode") + } + + ctx := context.Background() + cluster := newClusterScenario() + if err := startCluster(ctx, cluster); err != nil { + b.Fatal(err) + } + defer cluster.Close() + + client := cluster.newClusterClient(ctx, redisClusterOptions()) + defer client.Close() + + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + err := client.Ping(ctx).Err() + if err != nil { + b.Fatal(err) + } + } + }) +} + +func BenchmarkClusterDoInt(b *testing.B) { + if testing.Short() { + b.Skip("skipping in short mode") + } + + ctx := context.Background() + cluster := newClusterScenario() + if err := startCluster(ctx, cluster); err != nil { + b.Fatal(err) + } + defer cluster.Close() + + client := cluster.newClusterClient(ctx, redisClusterOptions()) + defer client.Close() + + b.ResetTimer() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + err := client.Do(ctx, "SET", 10, 10).Err() + if err != nil { + b.Fatal(err) + } + } + }) +} + +func BenchmarkClusterSetString(b *testing.B) { + if testing.Short() { + b.Skip("skipping in short mode") + } + + ctx := context.Background() + cluster := newClusterScenario() + if err := startCluster(ctx, cluster); err != nil { + b.Fatal(err) + } + defer cluster.Close() + + client := cluster.newClusterClient(ctx, redisClusterOptions()) + defer client.Close() + + value := string(bytes.Repeat([]byte{'1'}, 10000)) + + b.ResetTimer() + + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + err := client.Set(ctx, "key", value, 0).Err() + if err != nil { + b.Fatal(err) + } + } + }) +} + +var clusterSink *redis.ClusterClient + +func BenchmarkClusterWithContext(b *testing.B) { + ctx := context.Background() + rdb := redis.NewClusterClient(&redis.ClusterOptions{}) + defer rdb.Close() + + b.ResetTimer() + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + clusterSink = rdb.WithContext(ctx) + } +} diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster.go b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster.go new file mode 100644 index 0000000..a54f2f3 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster.go @@ -0,0 +1,1750 @@ +package redis + +import ( + "context" + "crypto/tls" + "fmt" + "math" + "net" + "runtime" + "sort" + "sync" + "sync/atomic" + "time" + + "github.com/go-redis/redis/v8/internal" + "github.com/go-redis/redis/v8/internal/hashtag" + "github.com/go-redis/redis/v8/internal/pool" + "github.com/go-redis/redis/v8/internal/proto" + "github.com/go-redis/redis/v8/internal/rand" +) + +var errClusterNoNodes = fmt.Errorf("redis: cluster has no nodes") + +// ClusterOptions are used to configure a cluster client and should be +// passed to NewClusterClient. +type ClusterOptions struct { + // A seed list of host:port addresses of cluster nodes. + Addrs []string + + // NewClient creates a cluster node client with provided name and options. + NewClient func(opt *Options) *Client + + // The maximum number of retries before giving up. Command is retried + // on network errors and MOVED/ASK redirects. + // Default is 3 retries. + MaxRedirects int + + // Enables read-only commands on slave nodes. + ReadOnly bool + // Allows routing read-only commands to the closest master or slave node. + // It automatically enables ReadOnly. + RouteByLatency bool + // Allows routing read-only commands to the random master or slave node. + // It automatically enables ReadOnly. + RouteRandomly bool + + // Optional function that returns cluster slots information. + // It is useful to manually create cluster of standalone Redis servers + // and load-balance read/write operations between master and slaves. + // It can use service like ZooKeeper to maintain configuration information + // and Cluster.ReloadState to manually trigger state reloading. + ClusterSlots func(context.Context) ([]ClusterSlot, error) + + // Following options are copied from Options struct. + + Dialer func(ctx context.Context, network, addr string) (net.Conn, error) + + OnConnect func(ctx context.Context, cn *Conn) error + + Username string + Password string + + MaxRetries int + MinRetryBackoff time.Duration + MaxRetryBackoff time.Duration + + DialTimeout time.Duration + ReadTimeout time.Duration + WriteTimeout time.Duration + + // PoolFIFO uses FIFO mode for each node connection pool GET/PUT (default LIFO). + PoolFIFO bool + + // PoolSize applies per cluster node and not for the whole cluster. + PoolSize int + MinIdleConns int + MaxConnAge time.Duration + PoolTimeout time.Duration + IdleTimeout time.Duration + IdleCheckFrequency time.Duration + + TLSConfig *tls.Config +} + +func (opt *ClusterOptions) init() { + if opt.MaxRedirects == -1 { + opt.MaxRedirects = 0 + } else if opt.MaxRedirects == 0 { + opt.MaxRedirects = 3 + } + + if opt.RouteByLatency || opt.RouteRandomly { + opt.ReadOnly = true + } + + if opt.PoolSize == 0 { + opt.PoolSize = 5 * runtime.GOMAXPROCS(0) + } + + switch opt.ReadTimeout { + case -1: + opt.ReadTimeout = 0 + case 0: + opt.ReadTimeout = 3 * time.Second + } + switch opt.WriteTimeout { + case -1: + opt.WriteTimeout = 0 + case 0: + opt.WriteTimeout = opt.ReadTimeout + } + + if opt.MaxRetries == 0 { + opt.MaxRetries = -1 + } + switch opt.MinRetryBackoff { + case -1: + opt.MinRetryBackoff = 0 + case 0: + opt.MinRetryBackoff = 8 * time.Millisecond + } + switch opt.MaxRetryBackoff { + case -1: + opt.MaxRetryBackoff = 0 + case 0: + opt.MaxRetryBackoff = 512 * time.Millisecond + } + + if opt.NewClient == nil { + opt.NewClient = NewClient + } +} + +func (opt *ClusterOptions) clientOptions() *Options { + const disableIdleCheck = -1 + + return &Options{ + Dialer: opt.Dialer, + OnConnect: opt.OnConnect, + + Username: opt.Username, + Password: opt.Password, + + MaxRetries: opt.MaxRetries, + MinRetryBackoff: opt.MinRetryBackoff, + MaxRetryBackoff: opt.MaxRetryBackoff, + + DialTimeout: opt.DialTimeout, + ReadTimeout: opt.ReadTimeout, + WriteTimeout: opt.WriteTimeout, + + PoolFIFO: opt.PoolFIFO, + PoolSize: opt.PoolSize, + MinIdleConns: opt.MinIdleConns, + MaxConnAge: opt.MaxConnAge, + PoolTimeout: opt.PoolTimeout, + IdleTimeout: opt.IdleTimeout, + IdleCheckFrequency: disableIdleCheck, + + TLSConfig: opt.TLSConfig, + // If ClusterSlots is populated, then we probably have an artificial + // cluster whose nodes are not in clustering mode (otherwise there isn't + // much use for ClusterSlots config). This means we cannot execute the + // READONLY command against that node -- setting readOnly to false in such + // situations in the options below will prevent that from happening. + readOnly: opt.ReadOnly && opt.ClusterSlots == nil, + } +} + +//------------------------------------------------------------------------------ + +type clusterNode struct { + Client *Client + + latency uint32 // atomic + generation uint32 // atomic + failing uint32 // atomic +} + +func newClusterNode(clOpt *ClusterOptions, addr string) *clusterNode { + opt := clOpt.clientOptions() + opt.Addr = addr + node := clusterNode{ + Client: clOpt.NewClient(opt), + } + + node.latency = math.MaxUint32 + if clOpt.RouteByLatency { + go node.updateLatency() + } + + return &node +} + +func (n *clusterNode) String() string { + return n.Client.String() +} + +func (n *clusterNode) Close() error { + return n.Client.Close() +} + +func (n *clusterNode) updateLatency() { + const numProbe = 10 + var dur uint64 + + for i := 0; i < numProbe; i++ { + time.Sleep(time.Duration(10+rand.Intn(10)) * time.Millisecond) + + start := time.Now() + n.Client.Ping(context.TODO()) + dur += uint64(time.Since(start) / time.Microsecond) + } + + latency := float64(dur) / float64(numProbe) + atomic.StoreUint32(&n.latency, uint32(latency+0.5)) +} + +func (n *clusterNode) Latency() time.Duration { + latency := atomic.LoadUint32(&n.latency) + return time.Duration(latency) * time.Microsecond +} + +func (n *clusterNode) MarkAsFailing() { + atomic.StoreUint32(&n.failing, uint32(time.Now().Unix())) +} + +func (n *clusterNode) Failing() bool { + const timeout = 15 // 15 seconds + + failing := atomic.LoadUint32(&n.failing) + if failing == 0 { + return false + } + if time.Now().Unix()-int64(failing) < timeout { + return true + } + atomic.StoreUint32(&n.failing, 0) + return false +} + +func (n *clusterNode) Generation() uint32 { + return atomic.LoadUint32(&n.generation) +} + +func (n *clusterNode) SetGeneration(gen uint32) { + for { + v := atomic.LoadUint32(&n.generation) + if gen < v || atomic.CompareAndSwapUint32(&n.generation, v, gen) { + break + } + } +} + +//------------------------------------------------------------------------------ + +type clusterNodes struct { + opt *ClusterOptions + + mu sync.RWMutex + addrs []string + nodes map[string]*clusterNode + activeAddrs []string + closed bool + + _generation uint32 // atomic +} + +func newClusterNodes(opt *ClusterOptions) *clusterNodes { + return &clusterNodes{ + opt: opt, + + addrs: opt.Addrs, + nodes: make(map[string]*clusterNode), + } +} + +func (c *clusterNodes) Close() error { + c.mu.Lock() + defer c.mu.Unlock() + + if c.closed { + return nil + } + c.closed = true + + var firstErr error + for _, node := range c.nodes { + if err := node.Client.Close(); err != nil && firstErr == nil { + firstErr = err + } + } + + c.nodes = nil + c.activeAddrs = nil + + return firstErr +} + +func (c *clusterNodes) Addrs() ([]string, error) { + var addrs []string + + c.mu.RLock() + closed := c.closed //nolint:ifshort + if !closed { + if len(c.activeAddrs) > 0 { + addrs = c.activeAddrs + } else { + addrs = c.addrs + } + } + c.mu.RUnlock() + + if closed { + return nil, pool.ErrClosed + } + if len(addrs) == 0 { + return nil, errClusterNoNodes + } + return addrs, nil +} + +func (c *clusterNodes) NextGeneration() uint32 { + return atomic.AddUint32(&c._generation, 1) +} + +// GC removes unused nodes. +func (c *clusterNodes) GC(generation uint32) { + //nolint:prealloc + var collected []*clusterNode + + c.mu.Lock() + + c.activeAddrs = c.activeAddrs[:0] + for addr, node := range c.nodes { + if node.Generation() >= generation { + c.activeAddrs = append(c.activeAddrs, addr) + if c.opt.RouteByLatency { + go node.updateLatency() + } + continue + } + + delete(c.nodes, addr) + collected = append(collected, node) + } + + c.mu.Unlock() + + for _, node := range collected { + _ = node.Client.Close() + } +} + +func (c *clusterNodes) GetOrCreate(addr string) (*clusterNode, error) { + node, err := c.get(addr) + if err != nil { + return nil, err + } + if node != nil { + return node, nil + } + + c.mu.Lock() + defer c.mu.Unlock() + + if c.closed { + return nil, pool.ErrClosed + } + + node, ok := c.nodes[addr] + if ok { + return node, nil + } + + node = newClusterNode(c.opt, addr) + + c.addrs = appendIfNotExists(c.addrs, addr) + c.nodes[addr] = node + + return node, nil +} + +func (c *clusterNodes) get(addr string) (*clusterNode, error) { + var node *clusterNode + var err error + c.mu.RLock() + if c.closed { + err = pool.ErrClosed + } else { + node = c.nodes[addr] + } + c.mu.RUnlock() + return node, err +} + +func (c *clusterNodes) All() ([]*clusterNode, error) { + c.mu.RLock() + defer c.mu.RUnlock() + + if c.closed { + return nil, pool.ErrClosed + } + + cp := make([]*clusterNode, 0, len(c.nodes)) + for _, node := range c.nodes { + cp = append(cp, node) + } + return cp, nil +} + +func (c *clusterNodes) Random() (*clusterNode, error) { + addrs, err := c.Addrs() + if err != nil { + return nil, err + } + + n := rand.Intn(len(addrs)) + return c.GetOrCreate(addrs[n]) +} + +//------------------------------------------------------------------------------ + +type clusterSlot struct { + start, end int + nodes []*clusterNode +} + +type clusterSlotSlice []*clusterSlot + +func (p clusterSlotSlice) Len() int { + return len(p) +} + +func (p clusterSlotSlice) Less(i, j int) bool { + return p[i].start < p[j].start +} + +func (p clusterSlotSlice) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +type clusterState struct { + nodes *clusterNodes + Masters []*clusterNode + Slaves []*clusterNode + + slots []*clusterSlot + + generation uint32 + createdAt time.Time +} + +func newClusterState( + nodes *clusterNodes, slots []ClusterSlot, origin string, +) (*clusterState, error) { + c := clusterState{ + nodes: nodes, + + slots: make([]*clusterSlot, 0, len(slots)), + + generation: nodes.NextGeneration(), + createdAt: time.Now(), + } + + originHost, _, _ := net.SplitHostPort(origin) + isLoopbackOrigin := isLoopback(originHost) + + for _, slot := range slots { + var nodes []*clusterNode + for i, slotNode := range slot.Nodes { + addr := slotNode.Addr + if !isLoopbackOrigin { + addr = replaceLoopbackHost(addr, originHost) + } + + node, err := c.nodes.GetOrCreate(addr) + if err != nil { + return nil, err + } + + node.SetGeneration(c.generation) + nodes = append(nodes, node) + + if i == 0 { + c.Masters = appendUniqueNode(c.Masters, node) + } else { + c.Slaves = appendUniqueNode(c.Slaves, node) + } + } + + c.slots = append(c.slots, &clusterSlot{ + start: slot.Start, + end: slot.End, + nodes: nodes, + }) + } + + sort.Sort(clusterSlotSlice(c.slots)) + + time.AfterFunc(time.Minute, func() { + nodes.GC(c.generation) + }) + + return &c, nil +} + +func replaceLoopbackHost(nodeAddr, originHost string) string { + nodeHost, nodePort, err := net.SplitHostPort(nodeAddr) + if err != nil { + return nodeAddr + } + + nodeIP := net.ParseIP(nodeHost) + if nodeIP == nil { + return nodeAddr + } + + if !nodeIP.IsLoopback() { + return nodeAddr + } + + // Use origin host which is not loopback and node port. + return net.JoinHostPort(originHost, nodePort) +} + +func isLoopback(host string) bool { + ip := net.ParseIP(host) + if ip == nil { + return true + } + return ip.IsLoopback() +} + +func (c *clusterState) slotMasterNode(slot int) (*clusterNode, error) { + nodes := c.slotNodes(slot) + if len(nodes) > 0 { + return nodes[0], nil + } + return c.nodes.Random() +} + +func (c *clusterState) slotSlaveNode(slot int) (*clusterNode, error) { + nodes := c.slotNodes(slot) + switch len(nodes) { + case 0: + return c.nodes.Random() + case 1: + return nodes[0], nil + case 2: + if slave := nodes[1]; !slave.Failing() { + return slave, nil + } + return nodes[0], nil + default: + var slave *clusterNode + for i := 0; i < 10; i++ { + n := rand.Intn(len(nodes)-1) + 1 + slave = nodes[n] + if !slave.Failing() { + return slave, nil + } + } + + // All slaves are loading - use master. + return nodes[0], nil + } +} + +func (c *clusterState) slotClosestNode(slot int) (*clusterNode, error) { + nodes := c.slotNodes(slot) + if len(nodes) == 0 { + return c.nodes.Random() + } + + var node *clusterNode + for _, n := range nodes { + if n.Failing() { + continue + } + if node == nil || n.Latency() < node.Latency() { + node = n + } + } + if node != nil { + return node, nil + } + + // If all nodes are failing - return random node + return c.nodes.Random() +} + +func (c *clusterState) slotRandomNode(slot int) (*clusterNode, error) { + nodes := c.slotNodes(slot) + if len(nodes) == 0 { + return c.nodes.Random() + } + if len(nodes) == 1 { + return nodes[0], nil + } + randomNodes := rand.Perm(len(nodes)) + for _, idx := range randomNodes { + if node := nodes[idx]; !node.Failing() { + return node, nil + } + } + return nodes[randomNodes[0]], nil +} + +func (c *clusterState) slotNodes(slot int) []*clusterNode { + i := sort.Search(len(c.slots), func(i int) bool { + return c.slots[i].end >= slot + }) + if i >= len(c.slots) { + return nil + } + x := c.slots[i] + if slot >= x.start && slot <= x.end { + return x.nodes + } + return nil +} + +//------------------------------------------------------------------------------ + +type clusterStateHolder struct { + load func(ctx context.Context) (*clusterState, error) + + state atomic.Value + reloading uint32 // atomic +} + +func newClusterStateHolder(fn func(ctx context.Context) (*clusterState, error)) *clusterStateHolder { + return &clusterStateHolder{ + load: fn, + } +} + +func (c *clusterStateHolder) Reload(ctx context.Context) (*clusterState, error) { + state, err := c.load(ctx) + if err != nil { + return nil, err + } + c.state.Store(state) + return state, nil +} + +func (c *clusterStateHolder) LazyReload() { + if !atomic.CompareAndSwapUint32(&c.reloading, 0, 1) { + return + } + go func() { + defer atomic.StoreUint32(&c.reloading, 0) + + _, err := c.Reload(context.Background()) + if err != nil { + return + } + time.Sleep(200 * time.Millisecond) + }() +} + +func (c *clusterStateHolder) Get(ctx context.Context) (*clusterState, error) { + v := c.state.Load() + if v == nil { + return c.Reload(ctx) + } + + state := v.(*clusterState) + if time.Since(state.createdAt) > 10*time.Second { + c.LazyReload() + } + return state, nil +} + +func (c *clusterStateHolder) ReloadOrGet(ctx context.Context) (*clusterState, error) { + state, err := c.Reload(ctx) + if err == nil { + return state, nil + } + return c.Get(ctx) +} + +//------------------------------------------------------------------------------ + +type clusterClient struct { + opt *ClusterOptions + nodes *clusterNodes + state *clusterStateHolder //nolint:structcheck + cmdsInfoCache *cmdsInfoCache //nolint:structcheck +} + +// ClusterClient is a Redis Cluster client representing a pool of zero +// or more underlying connections. It's safe for concurrent use by +// multiple goroutines. +type ClusterClient struct { + *clusterClient + cmdable + hooks + ctx context.Context +} + +// NewClusterClient returns a Redis Cluster client as described in +// http://redis.io/topics/cluster-spec. +func NewClusterClient(opt *ClusterOptions) *ClusterClient { + opt.init() + + c := &ClusterClient{ + clusterClient: &clusterClient{ + opt: opt, + nodes: newClusterNodes(opt), + }, + ctx: context.Background(), + } + c.state = newClusterStateHolder(c.loadState) + c.cmdsInfoCache = newCmdsInfoCache(c.cmdsInfo) + c.cmdable = c.Process + + if opt.IdleCheckFrequency > 0 { + go c.reaper(opt.IdleCheckFrequency) + } + + return c +} + +func (c *ClusterClient) Context() context.Context { + return c.ctx +} + +func (c *ClusterClient) WithContext(ctx context.Context) *ClusterClient { + if ctx == nil { + panic("nil context") + } + clone := *c + clone.cmdable = clone.Process + clone.hooks.lock() + clone.ctx = ctx + return &clone +} + +// Options returns read-only Options that were used to create the client. +func (c *ClusterClient) Options() *ClusterOptions { + return c.opt +} + +// ReloadState reloads cluster state. If available it calls ClusterSlots func +// to get cluster slots information. +func (c *ClusterClient) ReloadState(ctx context.Context) { + c.state.LazyReload() +} + +// Close closes the cluster client, releasing any open resources. +// +// It is rare to Close a ClusterClient, as the ClusterClient is meant +// to be long-lived and shared between many goroutines. +func (c *ClusterClient) Close() error { + return c.nodes.Close() +} + +// Do creates a Cmd from the args and processes the cmd. +func (c *ClusterClient) Do(ctx context.Context, args ...interface{}) *Cmd { + cmd := NewCmd(ctx, args...) + _ = c.Process(ctx, cmd) + return cmd +} + +func (c *ClusterClient) Process(ctx context.Context, cmd Cmder) error { + return c.hooks.process(ctx, cmd, c.process) +} + +func (c *ClusterClient) process(ctx context.Context, cmd Cmder) error { + cmdInfo := c.cmdInfo(cmd.Name()) + slot := c.cmdSlot(cmd) + + var node *clusterNode + var ask bool + var lastErr error + for attempt := 0; attempt <= c.opt.MaxRedirects; attempt++ { + if attempt > 0 { + if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil { + return err + } + } + + if node == nil { + var err error + node, err = c.cmdNode(ctx, cmdInfo, slot) + if err != nil { + return err + } + } + + if ask { + pipe := node.Client.Pipeline() + _ = pipe.Process(ctx, NewCmd(ctx, "asking")) + _ = pipe.Process(ctx, cmd) + _, lastErr = pipe.Exec(ctx) + _ = pipe.Close() + ask = false + } else { + lastErr = node.Client.Process(ctx, cmd) + } + + // If there is no error - we are done. + if lastErr == nil { + return nil + } + if isReadOnly := isReadOnlyError(lastErr); isReadOnly || lastErr == pool.ErrClosed { + if isReadOnly { + c.state.LazyReload() + } + node = nil + continue + } + + // If slave is loading - pick another node. + if c.opt.ReadOnly && isLoadingError(lastErr) { + node.MarkAsFailing() + node = nil + continue + } + + var moved bool + var addr string + moved, ask, addr = isMovedError(lastErr) + if moved || ask { + c.state.LazyReload() + + var err error + node, err = c.nodes.GetOrCreate(addr) + if err != nil { + return err + } + continue + } + + if shouldRetry(lastErr, cmd.readTimeout() == nil) { + // First retry the same node. + if attempt == 0 { + continue + } + + // Second try another node. + node.MarkAsFailing() + node = nil + continue + } + + return lastErr + } + return lastErr +} + +// ForEachMaster concurrently calls the fn on each master node in the cluster. +// It returns the first error if any. +func (c *ClusterClient) ForEachMaster( + ctx context.Context, + fn func(ctx context.Context, client *Client) error, +) error { + state, err := c.state.ReloadOrGet(ctx) + if err != nil { + return err + } + + var wg sync.WaitGroup + errCh := make(chan error, 1) + + for _, master := range state.Masters { + wg.Add(1) + go func(node *clusterNode) { + defer wg.Done() + err := fn(ctx, node.Client) + if err != nil { + select { + case errCh <- err: + default: + } + } + }(master) + } + + wg.Wait() + + select { + case err := <-errCh: + return err + default: + return nil + } +} + +// ForEachSlave concurrently calls the fn on each slave node in the cluster. +// It returns the first error if any. +func (c *ClusterClient) ForEachSlave( + ctx context.Context, + fn func(ctx context.Context, client *Client) error, +) error { + state, err := c.state.ReloadOrGet(ctx) + if err != nil { + return err + } + + var wg sync.WaitGroup + errCh := make(chan error, 1) + + for _, slave := range state.Slaves { + wg.Add(1) + go func(node *clusterNode) { + defer wg.Done() + err := fn(ctx, node.Client) + if err != nil { + select { + case errCh <- err: + default: + } + } + }(slave) + } + + wg.Wait() + + select { + case err := <-errCh: + return err + default: + return nil + } +} + +// ForEachShard concurrently calls the fn on each known node in the cluster. +// It returns the first error if any. +func (c *ClusterClient) ForEachShard( + ctx context.Context, + fn func(ctx context.Context, client *Client) error, +) error { + state, err := c.state.ReloadOrGet(ctx) + if err != nil { + return err + } + + var wg sync.WaitGroup + errCh := make(chan error, 1) + + worker := func(node *clusterNode) { + defer wg.Done() + err := fn(ctx, node.Client) + if err != nil { + select { + case errCh <- err: + default: + } + } + } + + for _, node := range state.Masters { + wg.Add(1) + go worker(node) + } + for _, node := range state.Slaves { + wg.Add(1) + go worker(node) + } + + wg.Wait() + + select { + case err := <-errCh: + return err + default: + return nil + } +} + +// PoolStats returns accumulated connection pool stats. +func (c *ClusterClient) PoolStats() *PoolStats { + var acc PoolStats + + state, _ := c.state.Get(context.TODO()) + if state == nil { + return &acc + } + + for _, node := range state.Masters { + s := node.Client.connPool.Stats() + acc.Hits += s.Hits + acc.Misses += s.Misses + acc.Timeouts += s.Timeouts + + acc.TotalConns += s.TotalConns + acc.IdleConns += s.IdleConns + acc.StaleConns += s.StaleConns + } + + for _, node := range state.Slaves { + s := node.Client.connPool.Stats() + acc.Hits += s.Hits + acc.Misses += s.Misses + acc.Timeouts += s.Timeouts + + acc.TotalConns += s.TotalConns + acc.IdleConns += s.IdleConns + acc.StaleConns += s.StaleConns + } + + return &acc +} + +func (c *ClusterClient) loadState(ctx context.Context) (*clusterState, error) { + if c.opt.ClusterSlots != nil { + slots, err := c.opt.ClusterSlots(ctx) + if err != nil { + return nil, err + } + return newClusterState(c.nodes, slots, "") + } + + addrs, err := c.nodes.Addrs() + if err != nil { + return nil, err + } + + var firstErr error + + for _, idx := range rand.Perm(len(addrs)) { + addr := addrs[idx] + + node, err := c.nodes.GetOrCreate(addr) + if err != nil { + if firstErr == nil { + firstErr = err + } + continue + } + + slots, err := node.Client.ClusterSlots(ctx).Result() + if err != nil { + if firstErr == nil { + firstErr = err + } + continue + } + + return newClusterState(c.nodes, slots, node.Client.opt.Addr) + } + + /* + * No node is connectable. It's possible that all nodes' IP has changed. + * Clear activeAddrs to let client be able to re-connect using the initial + * setting of the addresses (e.g. [redis-cluster-0:6379, redis-cluster-1:6379]), + * which might have chance to resolve domain name and get updated IP address. + */ + c.nodes.mu.Lock() + c.nodes.activeAddrs = nil + c.nodes.mu.Unlock() + + return nil, firstErr +} + +// reaper closes idle connections to the cluster. +func (c *ClusterClient) reaper(idleCheckFrequency time.Duration) { + ticker := time.NewTicker(idleCheckFrequency) + defer ticker.Stop() + + for range ticker.C { + nodes, err := c.nodes.All() + if err != nil { + break + } + + for _, node := range nodes { + _, err := node.Client.connPool.(*pool.ConnPool).ReapStaleConns() + if err != nil { + internal.Logger.Printf(c.Context(), "ReapStaleConns failed: %s", err) + } + } + } +} + +func (c *ClusterClient) Pipeline() Pipeliner { + pipe := Pipeline{ + ctx: c.ctx, + exec: c.processPipeline, + } + pipe.init() + return &pipe +} + +func (c *ClusterClient) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) { + return c.Pipeline().Pipelined(ctx, fn) +} + +func (c *ClusterClient) processPipeline(ctx context.Context, cmds []Cmder) error { + return c.hooks.processPipeline(ctx, cmds, c._processPipeline) +} + +func (c *ClusterClient) _processPipeline(ctx context.Context, cmds []Cmder) error { + cmdsMap := newCmdsMap() + err := c.mapCmdsByNode(ctx, cmdsMap, cmds) + if err != nil { + setCmdsErr(cmds, err) + return err + } + + for attempt := 0; attempt <= c.opt.MaxRedirects; attempt++ { + if attempt > 0 { + if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil { + setCmdsErr(cmds, err) + return err + } + } + + failedCmds := newCmdsMap() + var wg sync.WaitGroup + + for node, cmds := range cmdsMap.m { + wg.Add(1) + go func(node *clusterNode, cmds []Cmder) { + defer wg.Done() + + err := c._processPipelineNode(ctx, node, cmds, failedCmds) + if err == nil { + return + } + if attempt < c.opt.MaxRedirects { + if err := c.mapCmdsByNode(ctx, failedCmds, cmds); err != nil { + setCmdsErr(cmds, err) + } + } else { + setCmdsErr(cmds, err) + } + }(node, cmds) + } + + wg.Wait() + if len(failedCmds.m) == 0 { + break + } + cmdsMap = failedCmds + } + + return cmdsFirstErr(cmds) +} + +func (c *ClusterClient) mapCmdsByNode(ctx context.Context, cmdsMap *cmdsMap, cmds []Cmder) error { + state, err := c.state.Get(ctx) + if err != nil { + return err + } + + if c.opt.ReadOnly && c.cmdsAreReadOnly(cmds) { + for _, cmd := range cmds { + slot := c.cmdSlot(cmd) + node, err := c.slotReadOnlyNode(state, slot) + if err != nil { + return err + } + cmdsMap.Add(node, cmd) + } + return nil + } + + for _, cmd := range cmds { + slot := c.cmdSlot(cmd) + node, err := state.slotMasterNode(slot) + if err != nil { + return err + } + cmdsMap.Add(node, cmd) + } + return nil +} + +func (c *ClusterClient) cmdsAreReadOnly(cmds []Cmder) bool { + for _, cmd := range cmds { + cmdInfo := c.cmdInfo(cmd.Name()) + if cmdInfo == nil || !cmdInfo.ReadOnly { + return false + } + } + return true +} + +func (c *ClusterClient) _processPipelineNode( + ctx context.Context, node *clusterNode, cmds []Cmder, failedCmds *cmdsMap, +) error { + return node.Client.hooks.processPipeline(ctx, cmds, func(ctx context.Context, cmds []Cmder) error { + return node.Client.withConn(ctx, func(ctx context.Context, cn *pool.Conn) error { + err := cn.WithWriter(ctx, c.opt.WriteTimeout, func(wr *proto.Writer) error { + return writeCmds(wr, cmds) + }) + if err != nil { + return err + } + + return cn.WithReader(ctx, c.opt.ReadTimeout, func(rd *proto.Reader) error { + return c.pipelineReadCmds(ctx, node, rd, cmds, failedCmds) + }) + }) + }) +} + +func (c *ClusterClient) pipelineReadCmds( + ctx context.Context, + node *clusterNode, + rd *proto.Reader, + cmds []Cmder, + failedCmds *cmdsMap, +) error { + for _, cmd := range cmds { + err := cmd.readReply(rd) + cmd.SetErr(err) + + if err == nil { + continue + } + + if c.checkMovedErr(ctx, cmd, err, failedCmds) { + continue + } + + if c.opt.ReadOnly && isLoadingError(err) { + node.MarkAsFailing() + return err + } + if isRedisError(err) { + continue + } + return err + } + return nil +} + +func (c *ClusterClient) checkMovedErr( + ctx context.Context, cmd Cmder, err error, failedCmds *cmdsMap, +) bool { + moved, ask, addr := isMovedError(err) + if !moved && !ask { + return false + } + + node, err := c.nodes.GetOrCreate(addr) + if err != nil { + return false + } + + if moved { + c.state.LazyReload() + failedCmds.Add(node, cmd) + return true + } + + if ask { + failedCmds.Add(node, NewCmd(ctx, "asking"), cmd) + return true + } + + panic("not reached") +} + +// TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC. +func (c *ClusterClient) TxPipeline() Pipeliner { + pipe := Pipeline{ + ctx: c.ctx, + exec: c.processTxPipeline, + } + pipe.init() + return &pipe +} + +func (c *ClusterClient) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) { + return c.TxPipeline().Pipelined(ctx, fn) +} + +func (c *ClusterClient) processTxPipeline(ctx context.Context, cmds []Cmder) error { + return c.hooks.processTxPipeline(ctx, cmds, c._processTxPipeline) +} + +func (c *ClusterClient) _processTxPipeline(ctx context.Context, cmds []Cmder) error { + // Trim multi .. exec. + cmds = cmds[1 : len(cmds)-1] + + state, err := c.state.Get(ctx) + if err != nil { + setCmdsErr(cmds, err) + return err + } + + cmdsMap := c.mapCmdsBySlot(cmds) + for slot, cmds := range cmdsMap { + node, err := state.slotMasterNode(slot) + if err != nil { + setCmdsErr(cmds, err) + continue + } + + cmdsMap := map[*clusterNode][]Cmder{node: cmds} + for attempt := 0; attempt <= c.opt.MaxRedirects; attempt++ { + if attempt > 0 { + if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil { + setCmdsErr(cmds, err) + return err + } + } + + failedCmds := newCmdsMap() + var wg sync.WaitGroup + + for node, cmds := range cmdsMap { + wg.Add(1) + go func(node *clusterNode, cmds []Cmder) { + defer wg.Done() + + err := c._processTxPipelineNode(ctx, node, cmds, failedCmds) + if err == nil { + return + } + + if attempt < c.opt.MaxRedirects { + if err := c.mapCmdsByNode(ctx, failedCmds, cmds); err != nil { + setCmdsErr(cmds, err) + } + } else { + setCmdsErr(cmds, err) + } + }(node, cmds) + } + + wg.Wait() + if len(failedCmds.m) == 0 { + break + } + cmdsMap = failedCmds.m + } + } + + return cmdsFirstErr(cmds) +} + +func (c *ClusterClient) mapCmdsBySlot(cmds []Cmder) map[int][]Cmder { + cmdsMap := make(map[int][]Cmder) + for _, cmd := range cmds { + slot := c.cmdSlot(cmd) + cmdsMap[slot] = append(cmdsMap[slot], cmd) + } + return cmdsMap +} + +func (c *ClusterClient) _processTxPipelineNode( + ctx context.Context, node *clusterNode, cmds []Cmder, failedCmds *cmdsMap, +) error { + return node.Client.hooks.processTxPipeline(ctx, cmds, func(ctx context.Context, cmds []Cmder) error { + return node.Client.withConn(ctx, func(ctx context.Context, cn *pool.Conn) error { + err := cn.WithWriter(ctx, c.opt.WriteTimeout, func(wr *proto.Writer) error { + return writeCmds(wr, cmds) + }) + if err != nil { + return err + } + + return cn.WithReader(ctx, c.opt.ReadTimeout, func(rd *proto.Reader) error { + statusCmd := cmds[0].(*StatusCmd) + // Trim multi and exec. + cmds = cmds[1 : len(cmds)-1] + + err := c.txPipelineReadQueued(ctx, rd, statusCmd, cmds, failedCmds) + if err != nil { + moved, ask, addr := isMovedError(err) + if moved || ask { + return c.cmdsMoved(ctx, cmds, moved, ask, addr, failedCmds) + } + return err + } + + return pipelineReadCmds(rd, cmds) + }) + }) + }) +} + +func (c *ClusterClient) txPipelineReadQueued( + ctx context.Context, + rd *proto.Reader, + statusCmd *StatusCmd, + cmds []Cmder, + failedCmds *cmdsMap, +) error { + // Parse queued replies. + if err := statusCmd.readReply(rd); err != nil { + return err + } + + for _, cmd := range cmds { + err := statusCmd.readReply(rd) + if err == nil || c.checkMovedErr(ctx, cmd, err, failedCmds) || isRedisError(err) { + continue + } + return err + } + + // Parse number of replies. + line, err := rd.ReadLine() + if err != nil { + if err == Nil { + err = TxFailedErr + } + return err + } + + switch line[0] { + case proto.ErrorReply: + return proto.ParseErrorReply(line) + case proto.ArrayReply: + // ok + default: + return fmt.Errorf("redis: expected '*', but got line %q", line) + } + + return nil +} + +func (c *ClusterClient) cmdsMoved( + ctx context.Context, cmds []Cmder, + moved, ask bool, + addr string, + failedCmds *cmdsMap, +) error { + node, err := c.nodes.GetOrCreate(addr) + if err != nil { + return err + } + + if moved { + c.state.LazyReload() + for _, cmd := range cmds { + failedCmds.Add(node, cmd) + } + return nil + } + + if ask { + for _, cmd := range cmds { + failedCmds.Add(node, NewCmd(ctx, "asking"), cmd) + } + return nil + } + + return nil +} + +func (c *ClusterClient) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error { + if len(keys) == 0 { + return fmt.Errorf("redis: Watch requires at least one key") + } + + slot := hashtag.Slot(keys[0]) + for _, key := range keys[1:] { + if hashtag.Slot(key) != slot { + err := fmt.Errorf("redis: Watch requires all keys to be in the same slot") + return err + } + } + + node, err := c.slotMasterNode(ctx, slot) + if err != nil { + return err + } + + for attempt := 0; attempt <= c.opt.MaxRedirects; attempt++ { + if attempt > 0 { + if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil { + return err + } + } + + err = node.Client.Watch(ctx, fn, keys...) + if err == nil { + break + } + + moved, ask, addr := isMovedError(err) + if moved || ask { + node, err = c.nodes.GetOrCreate(addr) + if err != nil { + return err + } + continue + } + + if isReadOnly := isReadOnlyError(err); isReadOnly || err == pool.ErrClosed { + if isReadOnly { + c.state.LazyReload() + } + node, err = c.slotMasterNode(ctx, slot) + if err != nil { + return err + } + continue + } + + if shouldRetry(err, true) { + continue + } + + return err + } + + return err +} + +func (c *ClusterClient) pubSub() *PubSub { + var node *clusterNode + pubsub := &PubSub{ + opt: c.opt.clientOptions(), + + newConn: func(ctx context.Context, channels []string) (*pool.Conn, error) { + if node != nil { + panic("node != nil") + } + + var err error + if len(channels) > 0 { + slot := hashtag.Slot(channels[0]) + node, err = c.slotMasterNode(ctx, slot) + } else { + node, err = c.nodes.Random() + } + if err != nil { + return nil, err + } + + cn, err := node.Client.newConn(context.TODO()) + if err != nil { + node = nil + + return nil, err + } + + return cn, nil + }, + closeConn: func(cn *pool.Conn) error { + err := node.Client.connPool.CloseConn(cn) + node = nil + return err + }, + } + pubsub.init() + + return pubsub +} + +// Subscribe subscribes the client to the specified channels. +// Channels can be omitted to create empty subscription. +func (c *ClusterClient) Subscribe(ctx context.Context, channels ...string) *PubSub { + pubsub := c.pubSub() + if len(channels) > 0 { + _ = pubsub.Subscribe(ctx, channels...) + } + return pubsub +} + +// PSubscribe subscribes the client to the given patterns. +// Patterns can be omitted to create empty subscription. +func (c *ClusterClient) PSubscribe(ctx context.Context, channels ...string) *PubSub { + pubsub := c.pubSub() + if len(channels) > 0 { + _ = pubsub.PSubscribe(ctx, channels...) + } + return pubsub +} + +func (c *ClusterClient) retryBackoff(attempt int) time.Duration { + return internal.RetryBackoff(attempt, c.opt.MinRetryBackoff, c.opt.MaxRetryBackoff) +} + +func (c *ClusterClient) cmdsInfo(ctx context.Context) (map[string]*CommandInfo, error) { + // Try 3 random nodes. + const nodeLimit = 3 + + addrs, err := c.nodes.Addrs() + if err != nil { + return nil, err + } + + var firstErr error + + perm := rand.Perm(len(addrs)) + if len(perm) > nodeLimit { + perm = perm[:nodeLimit] + } + + for _, idx := range perm { + addr := addrs[idx] + + node, err := c.nodes.GetOrCreate(addr) + if err != nil { + if firstErr == nil { + firstErr = err + } + continue + } + + info, err := node.Client.Command(ctx).Result() + if err == nil { + return info, nil + } + if firstErr == nil { + firstErr = err + } + } + + if firstErr == nil { + panic("not reached") + } + return nil, firstErr +} + +func (c *ClusterClient) cmdInfo(name string) *CommandInfo { + cmdsInfo, err := c.cmdsInfoCache.Get(c.ctx) + if err != nil { + return nil + } + + info := cmdsInfo[name] + if info == nil { + internal.Logger.Printf(c.Context(), "info for cmd=%s not found", name) + } + return info +} + +func (c *ClusterClient) cmdSlot(cmd Cmder) int { + args := cmd.Args() + if args[0] == "cluster" && args[1] == "getkeysinslot" { + return args[2].(int) + } + + cmdInfo := c.cmdInfo(cmd.Name()) + return cmdSlot(cmd, cmdFirstKeyPos(cmd, cmdInfo)) +} + +func cmdSlot(cmd Cmder, pos int) int { + if pos == 0 { + return hashtag.RandomSlot() + } + firstKey := cmd.stringArg(pos) + return hashtag.Slot(firstKey) +} + +func (c *ClusterClient) cmdNode( + ctx context.Context, + cmdInfo *CommandInfo, + slot int, +) (*clusterNode, error) { + state, err := c.state.Get(ctx) + if err != nil { + return nil, err + } + + if c.opt.ReadOnly && cmdInfo != nil && cmdInfo.ReadOnly { + return c.slotReadOnlyNode(state, slot) + } + return state.slotMasterNode(slot) +} + +func (c *clusterClient) slotReadOnlyNode(state *clusterState, slot int) (*clusterNode, error) { + if c.opt.RouteByLatency { + return state.slotClosestNode(slot) + } + if c.opt.RouteRandomly { + return state.slotRandomNode(slot) + } + return state.slotSlaveNode(slot) +} + +func (c *ClusterClient) slotMasterNode(ctx context.Context, slot int) (*clusterNode, error) { + state, err := c.state.Get(ctx) + if err != nil { + return nil, err + } + return state.slotMasterNode(slot) +} + +// SlaveForKey gets a client for a replica node to run any command on it. +// This is especially useful if we want to run a particular lua script which has +// only read only commands on the replica. +// This is because other redis commands generally have a flag that points that +// they are read only and automatically run on the replica nodes +// if ClusterOptions.ReadOnly flag is set to true. +func (c *ClusterClient) SlaveForKey(ctx context.Context, key string) (*Client, error) { + state, err := c.state.Get(ctx) + if err != nil { + return nil, err + } + slot := hashtag.Slot(key) + node, err := c.slotReadOnlyNode(state, slot) + if err != nil { + return nil, err + } + return node.Client, err +} + +// MasterForKey return a client to the master node for a particular key. +func (c *ClusterClient) MasterForKey(ctx context.Context, key string) (*Client, error) { + slot := hashtag.Slot(key) + node, err := c.slotMasterNode(ctx, slot) + if err != nil { + return nil, err + } + return node.Client, err +} + +func appendUniqueNode(nodes []*clusterNode, node *clusterNode) []*clusterNode { + for _, n := range nodes { + if n == node { + return nodes + } + } + return append(nodes, node) +} + +func appendIfNotExists(ss []string, es ...string) []string { +loop: + for _, e := range es { + for _, s := range ss { + if s == e { + continue loop + } + } + ss = append(ss, e) + } + return ss +} + +//------------------------------------------------------------------------------ + +type cmdsMap struct { + mu sync.Mutex + m map[*clusterNode][]Cmder +} + +func newCmdsMap() *cmdsMap { + return &cmdsMap{ + m: make(map[*clusterNode][]Cmder), + } +} + +func (m *cmdsMap) Add(node *clusterNode, cmds ...Cmder) { + m.mu.Lock() + m.m[node] = append(m.m[node], cmds...) + m.mu.Unlock() +} diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster_commands.go b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster_commands.go new file mode 100644 index 0000000..085bce8 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster_commands.go @@ -0,0 +1,109 @@ +package redis + +import ( + "context" + "sync" + "sync/atomic" +) + +func (c *ClusterClient) DBSize(ctx context.Context) *IntCmd { + cmd := NewIntCmd(ctx, "dbsize") + _ = c.hooks.process(ctx, cmd, func(ctx context.Context, _ Cmder) error { + var size int64 + err := c.ForEachMaster(ctx, func(ctx context.Context, master *Client) error { + n, err := master.DBSize(ctx).Result() + if err != nil { + return err + } + atomic.AddInt64(&size, n) + return nil + }) + if err != nil { + cmd.SetErr(err) + } else { + cmd.val = size + } + return nil + }) + return cmd +} + +func (c *ClusterClient) ScriptLoad(ctx context.Context, script string) *StringCmd { + cmd := NewStringCmd(ctx, "script", "load", script) + _ = c.hooks.process(ctx, cmd, func(ctx context.Context, _ Cmder) error { + mu := &sync.Mutex{} + err := c.ForEachShard(ctx, func(ctx context.Context, shard *Client) error { + val, err := shard.ScriptLoad(ctx, script).Result() + if err != nil { + return err + } + + mu.Lock() + if cmd.Val() == "" { + cmd.val = val + } + mu.Unlock() + + return nil + }) + if err != nil { + cmd.SetErr(err) + } + return nil + }) + return cmd +} + +func (c *ClusterClient) ScriptFlush(ctx context.Context) *StatusCmd { + cmd := NewStatusCmd(ctx, "script", "flush") + _ = c.hooks.process(ctx, cmd, func(ctx context.Context, _ Cmder) error { + err := c.ForEachShard(ctx, func(ctx context.Context, shard *Client) error { + return shard.ScriptFlush(ctx).Err() + }) + if err != nil { + cmd.SetErr(err) + } + return nil + }) + return cmd +} + +func (c *ClusterClient) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd { + args := make([]interface{}, 2+len(hashes)) + args[0] = "script" + args[1] = "exists" + for i, hash := range hashes { + args[2+i] = hash + } + cmd := NewBoolSliceCmd(ctx, args...) + + result := make([]bool, len(hashes)) + for i := range result { + result[i] = true + } + + _ = c.hooks.process(ctx, cmd, func(ctx context.Context, _ Cmder) error { + mu := &sync.Mutex{} + err := c.ForEachShard(ctx, func(ctx context.Context, shard *Client) error { + val, err := shard.ScriptExists(ctx, hashes...).Result() + if err != nil { + return err + } + + mu.Lock() + for i, v := range val { + result[i] = result[i] && v + } + mu.Unlock() + + return nil + }) + if err != nil { + cmd.SetErr(err) + } else { + cmd.val = result + } + return nil + }) + return cmd +} diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster_test.go b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster_test.go new file mode 100644 index 0000000..6ee7364 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/cluster_test.go @@ -0,0 +1,1283 @@ +package redis_test + +import ( + "context" + "fmt" + "net" + "strconv" + "strings" + "sync" + "time" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + "github.com/go-redis/redis/v8" + "github.com/go-redis/redis/v8/internal/hashtag" +) + +type clusterScenario struct { + ports []string + nodeIDs []string + processes map[string]*redisProcess + clients map[string]*redis.Client +} + +func (s *clusterScenario) masters() []*redis.Client { + result := make([]*redis.Client, 3) + for pos, port := range s.ports[:3] { + result[pos] = s.clients[port] + } + return result +} + +func (s *clusterScenario) slaves() []*redis.Client { + result := make([]*redis.Client, 3) + for pos, port := range s.ports[3:] { + result[pos] = s.clients[port] + } + return result +} + +func (s *clusterScenario) addrs() []string { + addrs := make([]string, len(s.ports)) + for i, port := range s.ports { + addrs[i] = net.JoinHostPort("127.0.0.1", port) + } + return addrs +} + +func (s *clusterScenario) newClusterClientUnstable(opt *redis.ClusterOptions) *redis.ClusterClient { + opt.Addrs = s.addrs() + return redis.NewClusterClient(opt) +} + +func (s *clusterScenario) newClusterClient( + ctx context.Context, opt *redis.ClusterOptions, +) *redis.ClusterClient { + client := s.newClusterClientUnstable(opt) + + err := eventually(func() error { + if opt.ClusterSlots != nil { + return nil + } + + state, err := client.LoadState(ctx) + if err != nil { + return err + } + + if !state.IsConsistent(ctx) { + return fmt.Errorf("cluster state is not consistent") + } + + return nil + }, 30*time.Second) + if err != nil { + panic(err) + } + + return client +} + +func (s *clusterScenario) Close() error { + for _, port := range s.ports { + processes[port].Close() + delete(processes, port) + } + return nil +} + +func startCluster(ctx context.Context, scenario *clusterScenario) error { + // Start processes and collect node ids + for pos, port := range scenario.ports { + process, err := startRedis(port, "--cluster-enabled", "yes") + if err != nil { + return err + } + + client := redis.NewClient(&redis.Options{ + Addr: ":" + port, + }) + + info, err := client.ClusterNodes(ctx).Result() + if err != nil { + return err + } + + scenario.processes[port] = process + scenario.clients[port] = client + scenario.nodeIDs[pos] = info[:40] + } + + // Meet cluster nodes. + for _, client := range scenario.clients { + err := client.ClusterMeet(ctx, "127.0.0.1", scenario.ports[0]).Err() + if err != nil { + return err + } + } + + // Bootstrap masters. + slots := []int{0, 5000, 10000, 16384} + for pos, master := range scenario.masters() { + err := master.ClusterAddSlotsRange(ctx, slots[pos], slots[pos+1]-1).Err() + if err != nil { + return err + } + } + + // Bootstrap slaves. + for idx, slave := range scenario.slaves() { + masterID := scenario.nodeIDs[idx] + + // Wait until master is available + err := eventually(func() error { + s := slave.ClusterNodes(ctx).Val() + wanted := masterID + if !strings.Contains(s, wanted) { + return fmt.Errorf("%q does not contain %q", s, wanted) + } + return nil + }, 10*time.Second) + if err != nil { + return err + } + + err = slave.ClusterReplicate(ctx, masterID).Err() + if err != nil { + return err + } + } + + // Wait until all nodes have consistent info. + wanted := []redis.ClusterSlot{{ + Start: 0, + End: 4999, + Nodes: []redis.ClusterNode{{ + ID: "", + Addr: "127.0.0.1:8220", + }, { + ID: "", + Addr: "127.0.0.1:8223", + }}, + }, { + Start: 5000, + End: 9999, + Nodes: []redis.ClusterNode{{ + ID: "", + Addr: "127.0.0.1:8221", + }, { + ID: "", + Addr: "127.0.0.1:8224", + }}, + }, { + Start: 10000, + End: 16383, + Nodes: []redis.ClusterNode{{ + ID: "", + Addr: "127.0.0.1:8222", + }, { + ID: "", + Addr: "127.0.0.1:8225", + }}, + }} + for _, client := range scenario.clients { + err := eventually(func() error { + res, err := client.ClusterSlots(ctx).Result() + if err != nil { + return err + } + return assertSlotsEqual(res, wanted) + }, 30*time.Second) + if err != nil { + return err + } + } + + return nil +} + +func assertSlotsEqual(slots, wanted []redis.ClusterSlot) error { +outerLoop: + for _, s2 := range wanted { + for _, s1 := range slots { + if slotEqual(s1, s2) { + continue outerLoop + } + } + return fmt.Errorf("%v not found in %v", s2, slots) + } + return nil +} + +func slotEqual(s1, s2 redis.ClusterSlot) bool { + if s1.Start != s2.Start { + return false + } + if s1.End != s2.End { + return false + } + if len(s1.Nodes) != len(s2.Nodes) { + return false + } + for i, n1 := range s1.Nodes { + if n1.Addr != s2.Nodes[i].Addr { + return false + } + } + return true +} + +//------------------------------------------------------------------------------ + +var _ = Describe("ClusterClient", func() { + var failover bool + var opt *redis.ClusterOptions + var client *redis.ClusterClient + + assertClusterClient := func() { + It("supports WithContext", func() { + ctx, cancel := context.WithCancel(ctx) + cancel() + + err := client.Ping(ctx).Err() + Expect(err).To(MatchError("context canceled")) + }) + + It("should GET/SET/DEL", func() { + err := client.Get(ctx, "A").Err() + Expect(err).To(Equal(redis.Nil)) + + err = client.Set(ctx, "A", "VALUE", 0).Err() + Expect(err).NotTo(HaveOccurred()) + + Eventually(func() string { + return client.Get(ctx, "A").Val() + }, 30*time.Second).Should(Equal("VALUE")) + + cnt, err := client.Del(ctx, "A").Result() + Expect(err).NotTo(HaveOccurred()) + Expect(cnt).To(Equal(int64(1))) + }) + + It("GET follows redirects", func() { + err := client.Set(ctx, "A", "VALUE", 0).Err() + Expect(err).NotTo(HaveOccurred()) + + if !failover { + Eventually(func() int64 { + nodes, err := client.Nodes(ctx, "A") + if err != nil { + return 0 + } + return nodes[1].Client.DBSize(ctx).Val() + }, 30*time.Second).Should(Equal(int64(1))) + + Eventually(func() error { + return client.SwapNodes(ctx, "A") + }, 30*time.Second).ShouldNot(HaveOccurred()) + } + + v, err := client.Get(ctx, "A").Result() + Expect(err).NotTo(HaveOccurred()) + Expect(v).To(Equal("VALUE")) + }) + + It("SET follows redirects", func() { + if !failover { + Eventually(func() error { + return client.SwapNodes(ctx, "A") + }, 30*time.Second).ShouldNot(HaveOccurred()) + } + + err := client.Set(ctx, "A", "VALUE", 0).Err() + Expect(err).NotTo(HaveOccurred()) + + v, err := client.Get(ctx, "A").Result() + Expect(err).NotTo(HaveOccurred()) + Expect(v).To(Equal("VALUE")) + }) + + It("distributes keys", func() { + for i := 0; i < 100; i++ { + err := client.Set(ctx, fmt.Sprintf("key%d", i), "value", 0).Err() + Expect(err).NotTo(HaveOccurred()) + } + + client.ForEachMaster(ctx, func(ctx context.Context, master *redis.Client) error { + defer GinkgoRecover() + Eventually(func() string { + return master.Info(ctx, "keyspace").Val() + }, 30*time.Second).Should(Or( + ContainSubstring("keys=31"), + ContainSubstring("keys=29"), + ContainSubstring("keys=40"), + )) + return nil + }) + }) + + It("distributes keys when using EVAL", func() { + script := redis.NewScript(` + local r = redis.call('SET', KEYS[1], ARGV[1]) + return r + `) + + var key string + for i := 0; i < 100; i++ { + key = fmt.Sprintf("key%d", i) + err := script.Run(ctx, client, []string{key}, "value").Err() + Expect(err).NotTo(HaveOccurred()) + } + + client.ForEachMaster(ctx, func(ctx context.Context, master *redis.Client) error { + defer GinkgoRecover() + Eventually(func() string { + return master.Info(ctx, "keyspace").Val() + }, 30*time.Second).Should(Or( + ContainSubstring("keys=31"), + ContainSubstring("keys=29"), + ContainSubstring("keys=40"), + )) + return nil + }) + }) + + It("distributes scripts when using Script Load", func() { + client.ScriptFlush(ctx) + + script := redis.NewScript(`return 'Unique script'`) + + script.Load(ctx, client) + + client.ForEachShard(ctx, func(ctx context.Context, shard *redis.Client) error { + defer GinkgoRecover() + + val, _ := script.Exists(ctx, shard).Result() + Expect(val[0]).To(Equal(true)) + return nil + }) + }) + + It("checks all shards when using Script Exists", func() { + client.ScriptFlush(ctx) + + script := redis.NewScript(`return 'First script'`) + lostScriptSrc := `return 'Lost script'` + lostScript := redis.NewScript(lostScriptSrc) + + script.Load(ctx, client) + client.Do(ctx, "script", "load", lostScriptSrc) + + val, _ := client.ScriptExists(ctx, script.Hash(), lostScript.Hash()).Result() + + Expect(val).To(Equal([]bool{true, false})) + }) + + It("flushes scripts from all shards when using ScriptFlush", func() { + script := redis.NewScript(`return 'Unnecessary script'`) + script.Load(ctx, client) + + val, _ := client.ScriptExists(ctx, script.Hash()).Result() + Expect(val).To(Equal([]bool{true})) + + client.ScriptFlush(ctx) + + val, _ = client.ScriptExists(ctx, script.Hash()).Result() + Expect(val).To(Equal([]bool{false})) + }) + + It("supports Watch", func() { + var incr func(string) error + + // Transactionally increments key using GET and SET commands. + incr = func(key string) error { + err := client.Watch(ctx, func(tx *redis.Tx) error { + n, err := tx.Get(ctx, key).Int64() + if err != nil && err != redis.Nil { + return err + } + + _, err = tx.TxPipelined(ctx, func(pipe redis.Pipeliner) error { + pipe.Set(ctx, key, strconv.FormatInt(n+1, 10), 0) + return nil + }) + return err + }, key) + if err == redis.TxFailedErr { + return incr(key) + } + return err + } + + var wg sync.WaitGroup + for i := 0; i < 100; i++ { + wg.Add(1) + go func() { + defer GinkgoRecover() + defer wg.Done() + + err := incr("key") + Expect(err).NotTo(HaveOccurred()) + }() + } + wg.Wait() + + Eventually(func() string { + return client.Get(ctx, "key").Val() + }, 30*time.Second).Should(Equal("100")) + }) + + Describe("pipelining", func() { + var pipe *redis.Pipeline + + assertPipeline := func() { + keys := []string{"A", "B", "C", "D", "E", "F", "G"} + + It("follows redirects", func() { + if !failover { + for _, key := range keys { + Eventually(func() error { + return client.SwapNodes(ctx, key) + }, 30*time.Second).ShouldNot(HaveOccurred()) + } + } + + for i, key := range keys { + pipe.Set(ctx, key, key+"_value", 0) + pipe.Expire(ctx, key, time.Duration(i+1)*time.Hour) + } + cmds, err := pipe.Exec(ctx) + Expect(err).NotTo(HaveOccurred()) + Expect(cmds).To(HaveLen(14)) + + _ = client.ForEachShard(ctx, func(ctx context.Context, node *redis.Client) error { + defer GinkgoRecover() + Eventually(func() int64 { + return node.DBSize(ctx).Val() + }, 30*time.Second).ShouldNot(BeZero()) + return nil + }) + + if !failover { + for _, key := range keys { + Eventually(func() error { + return client.SwapNodes(ctx, key) + }, 30*time.Second).ShouldNot(HaveOccurred()) + } + } + + for _, key := range keys { + pipe.Get(ctx, key) + pipe.TTL(ctx, key) + } + cmds, err = pipe.Exec(ctx) + Expect(err).NotTo(HaveOccurred()) + Expect(cmds).To(HaveLen(14)) + + for i, key := range keys { + get := cmds[i*2].(*redis.StringCmd) + Expect(get.Val()).To(Equal(key + "_value")) + + ttl := cmds[(i*2)+1].(*redis.DurationCmd) + dur := time.Duration(i+1) * time.Hour + Expect(ttl.Val()).To(BeNumerically("~", dur, 30*time.Second)) + } + }) + + It("works with missing keys", func() { + pipe.Set(ctx, "A", "A_value", 0) + pipe.Set(ctx, "C", "C_value", 0) + _, err := pipe.Exec(ctx) + Expect(err).NotTo(HaveOccurred()) + + a := pipe.Get(ctx, "A") + b := pipe.Get(ctx, "B") + c := pipe.Get(ctx, "C") + cmds, err := pipe.Exec(ctx) + Expect(err).To(Equal(redis.Nil)) + Expect(cmds).To(HaveLen(3)) + + Expect(a.Err()).NotTo(HaveOccurred()) + Expect(a.Val()).To(Equal("A_value")) + + Expect(b.Err()).To(Equal(redis.Nil)) + Expect(b.Val()).To(Equal("")) + + Expect(c.Err()).NotTo(HaveOccurred()) + Expect(c.Val()).To(Equal("C_value")) + }) + } + + Describe("with Pipeline", func() { + BeforeEach(func() { + pipe = client.Pipeline().(*redis.Pipeline) + }) + + AfterEach(func() { + Expect(pipe.Close()).NotTo(HaveOccurred()) + }) + + assertPipeline() + }) + + Describe("with TxPipeline", func() { + BeforeEach(func() { + pipe = client.TxPipeline().(*redis.Pipeline) + }) + + AfterEach(func() { + Expect(pipe.Close()).NotTo(HaveOccurred()) + }) + + assertPipeline() + }) + }) + + It("supports PubSub", func() { + pubsub := client.Subscribe(ctx, "mychannel") + defer pubsub.Close() + + Eventually(func() error { + _, err := client.Publish(ctx, "mychannel", "hello").Result() + if err != nil { + return err + } + + msg, err := pubsub.ReceiveTimeout(ctx, time.Second) + if err != nil { + return err + } + + _, ok := msg.(*redis.Message) + if !ok { + return fmt.Errorf("got %T, wanted *redis.Message", msg) + } + + return nil + }, 30*time.Second).ShouldNot(HaveOccurred()) + }) + + It("supports PubSub.Ping without channels", func() { + pubsub := client.Subscribe(ctx) + defer pubsub.Close() + + err := pubsub.Ping(ctx) + Expect(err).NotTo(HaveOccurred()) + }) + } + + Describe("ClusterClient", func() { + BeforeEach(func() { + opt = redisClusterOptions() + client = cluster.newClusterClient(ctx, opt) + + err := client.ForEachMaster(ctx, func(ctx context.Context, master *redis.Client) error { + return master.FlushDB(ctx).Err() + }) + Expect(err).NotTo(HaveOccurred()) + }) + + AfterEach(func() { + _ = client.ForEachMaster(ctx, func(ctx context.Context, master *redis.Client) error { + return master.FlushDB(ctx).Err() + }) + Expect(client.Close()).NotTo(HaveOccurred()) + }) + + It("returns pool stats", func() { + stats := client.PoolStats() + Expect(stats).To(BeAssignableToTypeOf(&redis.PoolStats{})) + }) + + It("returns an error when there are no attempts left", func() { + opt := redisClusterOptions() + opt.MaxRedirects = -1 + client := cluster.newClusterClient(ctx, opt) + + Eventually(func() error { + return client.SwapNodes(ctx, "A") + }, 30*time.Second).ShouldNot(HaveOccurred()) + + err := client.Get(ctx, "A").Err() + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("MOVED")) + + Expect(client.Close()).NotTo(HaveOccurred()) + }) + + It("calls fn for every master node", func() { + for i := 0; i < 10; i++ { + Expect(client.Set(ctx, strconv.Itoa(i), "", 0).Err()).NotTo(HaveOccurred()) + } + + err := client.ForEachMaster(ctx, func(ctx context.Context, master *redis.Client) error { + return master.FlushDB(ctx).Err() + }) + Expect(err).NotTo(HaveOccurred()) + + size, err := client.DBSize(ctx).Result() + Expect(err).NotTo(HaveOccurred()) + Expect(size).To(Equal(int64(0))) + }) + + It("should CLUSTER SLOTS", func() { + res, err := client.ClusterSlots(ctx).Result() + Expect(err).NotTo(HaveOccurred()) + Expect(res).To(HaveLen(3)) + + wanted := []redis.ClusterSlot{{ + Start: 0, + End: 4999, + Nodes: []redis.ClusterNode{{ + ID: "", + Addr: "127.0.0.1:8220", + }, { + ID: "", + Addr: "127.0.0.1:8223", + }}, + }, { + Start: 5000, + End: 9999, + Nodes: []redis.ClusterNode{{ + ID: "", + Addr: "127.0.0.1:8221", + }, { + ID: "", + Addr: "127.0.0.1:8224", + }}, + }, { + Start: 10000, + End: 16383, + Nodes: []redis.ClusterNode{{ + ID: "", + Addr: "127.0.0.1:8222", + }, { + ID: "", + Addr: "127.0.0.1:8225", + }}, + }} + Expect(assertSlotsEqual(res, wanted)).NotTo(HaveOccurred()) + }) + + It("should CLUSTER NODES", func() { + res, err := client.ClusterNodes(ctx).Result() + Expect(err).NotTo(HaveOccurred()) + Expect(len(res)).To(BeNumerically(">", 400)) + }) + + It("should CLUSTER INFO", func() { + res, err := client.ClusterInfo(ctx).Result() + Expect(err).NotTo(HaveOccurred()) + Expect(res).To(ContainSubstring("cluster_known_nodes:6")) + }) + + It("should CLUSTER KEYSLOT", func() { + hashSlot, err := client.ClusterKeySlot(ctx, "somekey").Result() + Expect(err).NotTo(HaveOccurred()) + Expect(hashSlot).To(Equal(int64(hashtag.Slot("somekey")))) + }) + + It("should CLUSTER GETKEYSINSLOT", func() { + keys, err := client.ClusterGetKeysInSlot(ctx, hashtag.Slot("somekey"), 1).Result() + Expect(err).NotTo(HaveOccurred()) + Expect(len(keys)).To(Equal(0)) + }) + + It("should CLUSTER COUNT-FAILURE-REPORTS", func() { + n, err := client.ClusterCountFailureReports(ctx, cluster.nodeIDs[0]).Result() + Expect(err).NotTo(HaveOccurred()) + Expect(n).To(Equal(int64(0))) + }) + + It("should CLUSTER COUNTKEYSINSLOT", func() { + n, err := client.ClusterCountKeysInSlot(ctx, 10).Result() + Expect(err).NotTo(HaveOccurred()) + Expect(n).To(Equal(int64(0))) + }) + + It("should CLUSTER SAVECONFIG", func() { + res, err := client.ClusterSaveConfig(ctx).Result() + Expect(err).NotTo(HaveOccurred()) + Expect(res).To(Equal("OK")) + }) + + It("should CLUSTER SLAVES", func() { + nodesList, err := client.ClusterSlaves(ctx, cluster.nodeIDs[0]).Result() + Expect(err).NotTo(HaveOccurred()) + Expect(nodesList).Should(ContainElement(ContainSubstring("slave"))) + Expect(nodesList).Should(HaveLen(1)) + }) + + It("should RANDOMKEY", func() { + const nkeys = 100 + + for i := 0; i < nkeys; i++ { + err := client.Set(ctx, fmt.Sprintf("key%d", i), "value", 0).Err() + Expect(err).NotTo(HaveOccurred()) + } + + var keys []string + addKey := func(key string) { + for _, k := range keys { + if k == key { + return + } + } + keys = append(keys, key) + } + + for i := 0; i < nkeys*10; i++ { + key := client.RandomKey(ctx).Val() + addKey(key) + } + + Expect(len(keys)).To(BeNumerically("~", nkeys, nkeys/10)) + }) + + It("supports Process hook", func() { + err := client.Ping(ctx).Err() + Expect(err).NotTo(HaveOccurred()) + + err = client.ForEachShard(ctx, func(ctx context.Context, node *redis.Client) error { + return node.Ping(ctx).Err() + }) + Expect(err).NotTo(HaveOccurred()) + + var stack []string + + clusterHook := &hook{ + beforeProcess: func(ctx context.Context, cmd redis.Cmder) (context.Context, error) { + Expect(cmd.String()).To(Equal("ping: ")) + stack = append(stack, "cluster.BeforeProcess") + return ctx, nil + }, + afterProcess: func(ctx context.Context, cmd redis.Cmder) error { + Expect(cmd.String()).To(Equal("ping: PONG")) + stack = append(stack, "cluster.AfterProcess") + return nil + }, + } + client.AddHook(clusterHook) + + nodeHook := &hook{ + beforeProcess: func(ctx context.Context, cmd redis.Cmder) (context.Context, error) { + Expect(cmd.String()).To(Equal("ping: ")) + stack = append(stack, "shard.BeforeProcess") + return ctx, nil + }, + afterProcess: func(ctx context.Context, cmd redis.Cmder) error { + Expect(cmd.String()).To(Equal("ping: PONG")) + stack = append(stack, "shard.AfterProcess") + return nil + }, + } + + _ = client.ForEachShard(ctx, func(ctx context.Context, node *redis.Client) error { + node.AddHook(nodeHook) + return nil + }) + + err = client.Ping(ctx).Err() + Expect(err).NotTo(HaveOccurred()) + Expect(stack).To(Equal([]string{ + "cluster.BeforeProcess", + "shard.BeforeProcess", + "shard.AfterProcess", + "cluster.AfterProcess", + })) + + clusterHook.beforeProcess = nil + clusterHook.afterProcess = nil + nodeHook.beforeProcess = nil + nodeHook.afterProcess = nil + }) + + It("supports Pipeline hook", func() { + err := client.Ping(ctx).Err() + Expect(err).NotTo(HaveOccurred()) + + err = client.ForEachShard(ctx, func(ctx context.Context, node *redis.Client) error { + return node.Ping(ctx).Err() + }) + Expect(err).NotTo(HaveOccurred()) + + var stack []string + + client.AddHook(&hook{ + beforeProcessPipeline: func(ctx context.Context, cmds []redis.Cmder) (context.Context, error) { + Expect(cmds).To(HaveLen(1)) + Expect(cmds[0].String()).To(Equal("ping: ")) + stack = append(stack, "cluster.BeforeProcessPipeline") + return ctx, nil + }, + afterProcessPipeline: func(ctx context.Context, cmds []redis.Cmder) error { + Expect(cmds).To(HaveLen(1)) + Expect(cmds[0].String()).To(Equal("ping: PONG")) + stack = append(stack, "cluster.AfterProcessPipeline") + return nil + }, + }) + + _ = client.ForEachShard(ctx, func(ctx context.Context, node *redis.Client) error { + node.AddHook(&hook{ + beforeProcessPipeline: func(ctx context.Context, cmds []redis.Cmder) (context.Context, error) { + Expect(cmds).To(HaveLen(1)) + Expect(cmds[0].String()).To(Equal("ping: ")) + stack = append(stack, "shard.BeforeProcessPipeline") + return ctx, nil + }, + afterProcessPipeline: func(ctx context.Context, cmds []redis.Cmder) error { + Expect(cmds).To(HaveLen(1)) + Expect(cmds[0].String()).To(Equal("ping: PONG")) + stack = append(stack, "shard.AfterProcessPipeline") + return nil + }, + }) + return nil + }) + + _, err = client.Pipelined(ctx, func(pipe redis.Pipeliner) error { + pipe.Ping(ctx) + return nil + }) + Expect(err).NotTo(HaveOccurred()) + Expect(stack).To(Equal([]string{ + "cluster.BeforeProcessPipeline", + "shard.BeforeProcessPipeline", + "shard.AfterProcessPipeline", + "cluster.AfterProcessPipeline", + })) + }) + + It("supports TxPipeline hook", func() { + err := client.Ping(ctx).Err() + Expect(err).NotTo(HaveOccurred()) + + err = client.ForEachShard(ctx, func(ctx context.Context, node *redis.Client) error { + return node.Ping(ctx).Err() + }) + Expect(err).NotTo(HaveOccurred()) + + var stack []string + + client.AddHook(&hook{ + beforeProcessPipeline: func(ctx context.Context, cmds []redis.Cmder) (context.Context, error) { + Expect(cmds).To(HaveLen(3)) + Expect(cmds[1].String()).To(Equal("ping: ")) + stack = append(stack, "cluster.BeforeProcessPipeline") + return ctx, nil + }, + afterProcessPipeline: func(ctx context.Context, cmds []redis.Cmder) error { + Expect(cmds).To(HaveLen(3)) + Expect(cmds[1].String()).To(Equal("ping: PONG")) + stack = append(stack, "cluster.AfterProcessPipeline") + return nil + }, + }) + + _ = client.ForEachShard(ctx, func(ctx context.Context, node *redis.Client) error { + node.AddHook(&hook{ + beforeProcessPipeline: func(ctx context.Context, cmds []redis.Cmder) (context.Context, error) { + Expect(cmds).To(HaveLen(3)) + Expect(cmds[1].String()).To(Equal("ping: ")) + stack = append(stack, "shard.BeforeProcessPipeline") + return ctx, nil + }, + afterProcessPipeline: func(ctx context.Context, cmds []redis.Cmder) error { + Expect(cmds).To(HaveLen(3)) + Expect(cmds[1].String()).To(Equal("ping: PONG")) + stack = append(stack, "shard.AfterProcessPipeline") + return nil + }, + }) + return nil + }) + + _, err = client.TxPipelined(ctx, func(pipe redis.Pipeliner) error { + pipe.Ping(ctx) + return nil + }) + Expect(err).NotTo(HaveOccurred()) + Expect(stack).To(Equal([]string{ + "cluster.BeforeProcessPipeline", + "shard.BeforeProcessPipeline", + "shard.AfterProcessPipeline", + "cluster.AfterProcessPipeline", + })) + }) + + It("should return correct replica for key", func() { + client, err := client.SlaveForKey(ctx, "test") + Expect(err).ToNot(HaveOccurred()) + info := client.Info(ctx, "server") + Expect(info.Val()).Should(ContainSubstring("tcp_port:8224")) + }) + + It("should return correct master for key", func() { + client, err := client.MasterForKey(ctx, "test") + Expect(err).ToNot(HaveOccurred()) + info := client.Info(ctx, "server") + Expect(info.Val()).Should(ContainSubstring("tcp_port:8221")) + }) + + assertClusterClient() + }) + + Describe("ClusterClient with RouteByLatency", func() { + BeforeEach(func() { + opt = redisClusterOptions() + opt.RouteByLatency = true + client = cluster.newClusterClient(ctx, opt) + + err := client.ForEachMaster(ctx, func(ctx context.Context, master *redis.Client) error { + return master.FlushDB(ctx).Err() + }) + Expect(err).NotTo(HaveOccurred()) + + err = client.ForEachSlave(ctx, func(ctx context.Context, slave *redis.Client) error { + Eventually(func() int64 { + return client.DBSize(ctx).Val() + }, 30*time.Second).Should(Equal(int64(0))) + return nil + }) + Expect(err).NotTo(HaveOccurred()) + }) + + AfterEach(func() { + err := client.ForEachSlave(ctx, func(ctx context.Context, slave *redis.Client) error { + return slave.ReadWrite(ctx).Err() + }) + Expect(err).NotTo(HaveOccurred()) + + err = client.Close() + Expect(err).NotTo(HaveOccurred()) + }) + + assertClusterClient() + }) + + Describe("ClusterClient with ClusterSlots", func() { + BeforeEach(func() { + failover = true + + opt = redisClusterOptions() + opt.ClusterSlots = func(ctx context.Context) ([]redis.ClusterSlot, error) { + slots := []redis.ClusterSlot{{ + Start: 0, + End: 4999, + Nodes: []redis.ClusterNode{{ + Addr: ":" + ringShard1Port, + }}, + }, { + Start: 5000, + End: 9999, + Nodes: []redis.ClusterNode{{ + Addr: ":" + ringShard2Port, + }}, + }, { + Start: 10000, + End: 16383, + Nodes: []redis.ClusterNode{{ + Addr: ":" + ringShard3Port, + }}, + }} + return slots, nil + } + client = cluster.newClusterClient(ctx, opt) + + err := client.ForEachMaster(ctx, func(ctx context.Context, master *redis.Client) error { + return master.FlushDB(ctx).Err() + }) + Expect(err).NotTo(HaveOccurred()) + + err = client.ForEachSlave(ctx, func(ctx context.Context, slave *redis.Client) error { + Eventually(func() int64 { + return client.DBSize(ctx).Val() + }, 30*time.Second).Should(Equal(int64(0))) + return nil + }) + Expect(err).NotTo(HaveOccurred()) + }) + + AfterEach(func() { + failover = false + + err := client.Close() + Expect(err).NotTo(HaveOccurred()) + }) + + assertClusterClient() + }) + + Describe("ClusterClient with RouteRandomly and ClusterSlots", func() { + BeforeEach(func() { + failover = true + + opt = redisClusterOptions() + opt.RouteRandomly = true + opt.ClusterSlots = func(ctx context.Context) ([]redis.ClusterSlot, error) { + slots := []redis.ClusterSlot{{ + Start: 0, + End: 4999, + Nodes: []redis.ClusterNode{{ + Addr: ":" + ringShard1Port, + }}, + }, { + Start: 5000, + End: 9999, + Nodes: []redis.ClusterNode{{ + Addr: ":" + ringShard2Port, + }}, + }, { + Start: 10000, + End: 16383, + Nodes: []redis.ClusterNode{{ + Addr: ":" + ringShard3Port, + }}, + }} + return slots, nil + } + client = cluster.newClusterClient(ctx, opt) + + err := client.ForEachMaster(ctx, func(ctx context.Context, master *redis.Client) error { + return master.FlushDB(ctx).Err() + }) + Expect(err).NotTo(HaveOccurred()) + + err = client.ForEachSlave(ctx, func(ctx context.Context, slave *redis.Client) error { + Eventually(func() int64 { + return client.DBSize(ctx).Val() + }, 30*time.Second).Should(Equal(int64(0))) + return nil + }) + Expect(err).NotTo(HaveOccurred()) + }) + + AfterEach(func() { + failover = false + + err := client.Close() + Expect(err).NotTo(HaveOccurred()) + }) + + assertClusterClient() + }) + + Describe("ClusterClient with ClusterSlots with multiple nodes per slot", func() { + BeforeEach(func() { + failover = true + + opt = redisClusterOptions() + opt.ReadOnly = true + opt.ClusterSlots = func(ctx context.Context) ([]redis.ClusterSlot, error) { + slots := []redis.ClusterSlot{{ + Start: 0, + End: 4999, + Nodes: []redis.ClusterNode{{ + Addr: ":8220", + }, { + Addr: ":8223", + }}, + }, { + Start: 5000, + End: 9999, + Nodes: []redis.ClusterNode{{ + Addr: ":8221", + }, { + Addr: ":8224", + }}, + }, { + Start: 10000, + End: 16383, + Nodes: []redis.ClusterNode{{ + Addr: ":8222", + }, { + Addr: ":8225", + }}, + }} + return slots, nil + } + client = cluster.newClusterClient(ctx, opt) + + err := client.ForEachMaster(ctx, func(ctx context.Context, master *redis.Client) error { + return master.FlushDB(ctx).Err() + }) + Expect(err).NotTo(HaveOccurred()) + + err = client.ForEachSlave(ctx, func(ctx context.Context, slave *redis.Client) error { + Eventually(func() int64 { + return client.DBSize(ctx).Val() + }, 30*time.Second).Should(Equal(int64(0))) + return nil + }) + Expect(err).NotTo(HaveOccurred()) + }) + + AfterEach(func() { + failover = false + + err := client.Close() + Expect(err).NotTo(HaveOccurred()) + }) + + assertClusterClient() + }) +}) + +var _ = Describe("ClusterClient without nodes", func() { + var client *redis.ClusterClient + + BeforeEach(func() { + client = redis.NewClusterClient(&redis.ClusterOptions{}) + }) + + AfterEach(func() { + Expect(client.Close()).NotTo(HaveOccurred()) + }) + + It("Ping returns an error", func() { + err := client.Ping(ctx).Err() + Expect(err).To(MatchError("redis: cluster has no nodes")) + }) + + It("pipeline returns an error", func() { + _, err := client.Pipelined(ctx, func(pipe redis.Pipeliner) error { + pipe.Ping(ctx) + return nil + }) + Expect(err).To(MatchError("redis: cluster has no nodes")) + }) +}) + +var _ = Describe("ClusterClient without valid nodes", func() { + var client *redis.ClusterClient + + BeforeEach(func() { + client = redis.NewClusterClient(&redis.ClusterOptions{ + Addrs: []string{redisAddr}, + }) + }) + + AfterEach(func() { + Expect(client.Close()).NotTo(HaveOccurred()) + }) + + It("returns an error", func() { + err := client.Ping(ctx).Err() + Expect(err).To(MatchError("ERR This instance has cluster support disabled")) + }) + + It("pipeline returns an error", func() { + _, err := client.Pipelined(ctx, func(pipe redis.Pipeliner) error { + pipe.Ping(ctx) + return nil + }) + Expect(err).To(MatchError("ERR This instance has cluster support disabled")) + }) +}) + +var _ = Describe("ClusterClient with unavailable Cluster", func() { + var client *redis.ClusterClient + + BeforeEach(func() { + for _, node := range cluster.clients { + err := node.ClientPause(ctx, 5*time.Second).Err() + Expect(err).NotTo(HaveOccurred()) + } + + opt := redisClusterOptions() + opt.ReadTimeout = 250 * time.Millisecond + opt.WriteTimeout = 250 * time.Millisecond + opt.MaxRedirects = 1 + client = cluster.newClusterClientUnstable(opt) + }) + + AfterEach(func() { + Expect(client.Close()).NotTo(HaveOccurred()) + }) + + It("recovers when Cluster recovers", func() { + err := client.Ping(ctx).Err() + Expect(err).To(HaveOccurred()) + + Eventually(func() error { + return client.Ping(ctx).Err() + }, "30s").ShouldNot(HaveOccurred()) + }) +}) + +var _ = Describe("ClusterClient timeout", func() { + var client *redis.ClusterClient + + AfterEach(func() { + _ = client.Close() + }) + + testTimeout := func() { + It("Ping timeouts", func() { + err := client.Ping(ctx).Err() + Expect(err).To(HaveOccurred()) + Expect(err.(net.Error).Timeout()).To(BeTrue()) + }) + + It("Pipeline timeouts", func() { + _, err := client.Pipelined(ctx, func(pipe redis.Pipeliner) error { + pipe.Ping(ctx) + return nil + }) + Expect(err).To(HaveOccurred()) + Expect(err.(net.Error).Timeout()).To(BeTrue()) + }) + + It("Tx timeouts", func() { + err := client.Watch(ctx, func(tx *redis.Tx) error { + return tx.Ping(ctx).Err() + }, "foo") + Expect(err).To(HaveOccurred()) + Expect(err.(net.Error).Timeout()).To(BeTrue()) + }) + + It("Tx Pipeline timeouts", func() { + err := client.Watch(ctx, func(tx *redis.Tx) error { + _, err := tx.TxPipelined(ctx, func(pipe redis.Pipeliner) error { + pipe.Ping(ctx) + return nil + }) + return err + }, "foo") + Expect(err).To(HaveOccurred()) + Expect(err.(net.Error).Timeout()).To(BeTrue()) + }) + } + + const pause = 5 * time.Second + + Context("read/write timeout", func() { + BeforeEach(func() { + opt := redisClusterOptions() + opt.ReadTimeout = 250 * time.Millisecond + opt.WriteTimeout = 250 * time.Millisecond + opt.MaxRedirects = 1 + client = cluster.newClusterClient(ctx, opt) + + err := client.ForEachShard(ctx, func(ctx context.Context, client *redis.Client) error { + return client.ClientPause(ctx, pause).Err() + }) + Expect(err).NotTo(HaveOccurred()) + }) + + AfterEach(func() { + _ = client.ForEachShard(ctx, func(ctx context.Context, client *redis.Client) error { + defer GinkgoRecover() + Eventually(func() error { + return client.Ping(ctx).Err() + }, 2*pause).ShouldNot(HaveOccurred()) + return nil + }) + }) + + testTimeout() + }) +}) diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/command.go b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/command.go new file mode 100644 index 0000000..4bb12a8 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/command.go @@ -0,0 +1,3478 @@ +package redis + +import ( + "context" + "fmt" + "net" + "strconv" + "time" + + "github.com/go-redis/redis/v8/internal" + "github.com/go-redis/redis/v8/internal/hscan" + "github.com/go-redis/redis/v8/internal/proto" + "github.com/go-redis/redis/v8/internal/util" +) + +type Cmder interface { + Name() string + FullName() string + Args() []interface{} + String() string + stringArg(int) string + firstKeyPos() int8 + SetFirstKeyPos(int8) + + readTimeout() *time.Duration + readReply(rd *proto.Reader) error + + SetErr(error) + Err() error +} + +func setCmdsErr(cmds []Cmder, e error) { + for _, cmd := range cmds { + if cmd.Err() == nil { + cmd.SetErr(e) + } + } +} + +func cmdsFirstErr(cmds []Cmder) error { + for _, cmd := range cmds { + if err := cmd.Err(); err != nil { + return err + } + } + return nil +} + +func writeCmds(wr *proto.Writer, cmds []Cmder) error { + for _, cmd := range cmds { + if err := writeCmd(wr, cmd); err != nil { + return err + } + } + return nil +} + +func writeCmd(wr *proto.Writer, cmd Cmder) error { + return wr.WriteArgs(cmd.Args()) +} + +func cmdFirstKeyPos(cmd Cmder, info *CommandInfo) int { + if pos := cmd.firstKeyPos(); pos != 0 { + return int(pos) + } + + switch cmd.Name() { + case "eval", "evalsha": + if cmd.stringArg(2) != "0" { + return 3 + } + + return 0 + case "publish": + return 1 + case "memory": + // https://github.com/redis/redis/issues/7493 + if cmd.stringArg(1) == "usage" { + return 2 + } + } + + if info != nil { + return int(info.FirstKeyPos) + } + return 0 +} + +func cmdString(cmd Cmder, val interface{}) string { + b := make([]byte, 0, 64) + + for i, arg := range cmd.Args() { + if i > 0 { + b = append(b, ' ') + } + b = internal.AppendArg(b, arg) + } + + if err := cmd.Err(); err != nil { + b = append(b, ": "...) + b = append(b, err.Error()...) + } else if val != nil { + b = append(b, ": "...) + b = internal.AppendArg(b, val) + } + + return internal.String(b) +} + +//------------------------------------------------------------------------------ + +type baseCmd struct { + ctx context.Context + args []interface{} + err error + keyPos int8 + + _readTimeout *time.Duration +} + +var _ Cmder = (*Cmd)(nil) + +func (cmd *baseCmd) Name() string { + if len(cmd.args) == 0 { + return "" + } + // Cmd name must be lower cased. + return internal.ToLower(cmd.stringArg(0)) +} + +func (cmd *baseCmd) FullName() string { + switch name := cmd.Name(); name { + case "cluster", "command": + if len(cmd.args) == 1 { + return name + } + if s2, ok := cmd.args[1].(string); ok { + return name + " " + s2 + } + return name + default: + return name + } +} + +func (cmd *baseCmd) Args() []interface{} { + return cmd.args +} + +func (cmd *baseCmd) stringArg(pos int) string { + if pos < 0 || pos >= len(cmd.args) { + return "" + } + arg := cmd.args[pos] + switch v := arg.(type) { + case string: + return v + default: + // TODO: consider using appendArg + return fmt.Sprint(v) + } +} + +func (cmd *baseCmd) firstKeyPos() int8 { + return cmd.keyPos +} + +func (cmd *baseCmd) SetFirstKeyPos(keyPos int8) { + cmd.keyPos = keyPos +} + +func (cmd *baseCmd) SetErr(e error) { + cmd.err = e +} + +func (cmd *baseCmd) Err() error { + return cmd.err +} + +func (cmd *baseCmd) readTimeout() *time.Duration { + return cmd._readTimeout +} + +func (cmd *baseCmd) setReadTimeout(d time.Duration) { + cmd._readTimeout = &d +} + +//------------------------------------------------------------------------------ + +type Cmd struct { + baseCmd + + val interface{} +} + +func NewCmd(ctx context.Context, args ...interface{}) *Cmd { + return &Cmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *Cmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *Cmd) SetVal(val interface{}) { + cmd.val = val +} + +func (cmd *Cmd) Val() interface{} { + return cmd.val +} + +func (cmd *Cmd) Result() (interface{}, error) { + return cmd.val, cmd.err +} + +func (cmd *Cmd) Text() (string, error) { + if cmd.err != nil { + return "", cmd.err + } + return toString(cmd.val) +} + +func toString(val interface{}) (string, error) { + switch val := val.(type) { + case string: + return val, nil + default: + err := fmt.Errorf("redis: unexpected type=%T for String", val) + return "", err + } +} + +func (cmd *Cmd) Int() (int, error) { + if cmd.err != nil { + return 0, cmd.err + } + switch val := cmd.val.(type) { + case int64: + return int(val), nil + case string: + return strconv.Atoi(val) + default: + err := fmt.Errorf("redis: unexpected type=%T for Int", val) + return 0, err + } +} + +func (cmd *Cmd) Int64() (int64, error) { + if cmd.err != nil { + return 0, cmd.err + } + return toInt64(cmd.val) +} + +func toInt64(val interface{}) (int64, error) { + switch val := val.(type) { + case int64: + return val, nil + case string: + return strconv.ParseInt(val, 10, 64) + default: + err := fmt.Errorf("redis: unexpected type=%T for Int64", val) + return 0, err + } +} + +func (cmd *Cmd) Uint64() (uint64, error) { + if cmd.err != nil { + return 0, cmd.err + } + return toUint64(cmd.val) +} + +func toUint64(val interface{}) (uint64, error) { + switch val := val.(type) { + case int64: + return uint64(val), nil + case string: + return strconv.ParseUint(val, 10, 64) + default: + err := fmt.Errorf("redis: unexpected type=%T for Uint64", val) + return 0, err + } +} + +func (cmd *Cmd) Float32() (float32, error) { + if cmd.err != nil { + return 0, cmd.err + } + return toFloat32(cmd.val) +} + +func toFloat32(val interface{}) (float32, error) { + switch val := val.(type) { + case int64: + return float32(val), nil + case string: + f, err := strconv.ParseFloat(val, 32) + if err != nil { + return 0, err + } + return float32(f), nil + default: + err := fmt.Errorf("redis: unexpected type=%T for Float32", val) + return 0, err + } +} + +func (cmd *Cmd) Float64() (float64, error) { + if cmd.err != nil { + return 0, cmd.err + } + return toFloat64(cmd.val) +} + +func toFloat64(val interface{}) (float64, error) { + switch val := val.(type) { + case int64: + return float64(val), nil + case string: + return strconv.ParseFloat(val, 64) + default: + err := fmt.Errorf("redis: unexpected type=%T for Float64", val) + return 0, err + } +} + +func (cmd *Cmd) Bool() (bool, error) { + if cmd.err != nil { + return false, cmd.err + } + return toBool(cmd.val) +} + +func toBool(val interface{}) (bool, error) { + switch val := val.(type) { + case int64: + return val != 0, nil + case string: + return strconv.ParseBool(val) + default: + err := fmt.Errorf("redis: unexpected type=%T for Bool", val) + return false, err + } +} + +func (cmd *Cmd) Slice() ([]interface{}, error) { + if cmd.err != nil { + return nil, cmd.err + } + switch val := cmd.val.(type) { + case []interface{}: + return val, nil + default: + return nil, fmt.Errorf("redis: unexpected type=%T for Slice", val) + } +} + +func (cmd *Cmd) StringSlice() ([]string, error) { + slice, err := cmd.Slice() + if err != nil { + return nil, err + } + + ss := make([]string, len(slice)) + for i, iface := range slice { + val, err := toString(iface) + if err != nil { + return nil, err + } + ss[i] = val + } + return ss, nil +} + +func (cmd *Cmd) Int64Slice() ([]int64, error) { + slice, err := cmd.Slice() + if err != nil { + return nil, err + } + + nums := make([]int64, len(slice)) + for i, iface := range slice { + val, err := toInt64(iface) + if err != nil { + return nil, err + } + nums[i] = val + } + return nums, nil +} + +func (cmd *Cmd) Uint64Slice() ([]uint64, error) { + slice, err := cmd.Slice() + if err != nil { + return nil, err + } + + nums := make([]uint64, len(slice)) + for i, iface := range slice { + val, err := toUint64(iface) + if err != nil { + return nil, err + } + nums[i] = val + } + return nums, nil +} + +func (cmd *Cmd) Float32Slice() ([]float32, error) { + slice, err := cmd.Slice() + if err != nil { + return nil, err + } + + floats := make([]float32, len(slice)) + for i, iface := range slice { + val, err := toFloat32(iface) + if err != nil { + return nil, err + } + floats[i] = val + } + return floats, nil +} + +func (cmd *Cmd) Float64Slice() ([]float64, error) { + slice, err := cmd.Slice() + if err != nil { + return nil, err + } + + floats := make([]float64, len(slice)) + for i, iface := range slice { + val, err := toFloat64(iface) + if err != nil { + return nil, err + } + floats[i] = val + } + return floats, nil +} + +func (cmd *Cmd) BoolSlice() ([]bool, error) { + slice, err := cmd.Slice() + if err != nil { + return nil, err + } + + bools := make([]bool, len(slice)) + for i, iface := range slice { + val, err := toBool(iface) + if err != nil { + return nil, err + } + bools[i] = val + } + return bools, nil +} + +func (cmd *Cmd) readReply(rd *proto.Reader) (err error) { + cmd.val, err = rd.ReadReply(sliceParser) + return err +} + +// sliceParser implements proto.MultiBulkParse. +func sliceParser(rd *proto.Reader, n int64) (interface{}, error) { + vals := make([]interface{}, n) + for i := 0; i < len(vals); i++ { + v, err := rd.ReadReply(sliceParser) + if err != nil { + if err == Nil { + vals[i] = nil + continue + } + if err, ok := err.(proto.RedisError); ok { + vals[i] = err + continue + } + return nil, err + } + vals[i] = v + } + return vals, nil +} + +//------------------------------------------------------------------------------ + +type SliceCmd struct { + baseCmd + + val []interface{} +} + +var _ Cmder = (*SliceCmd)(nil) + +func NewSliceCmd(ctx context.Context, args ...interface{}) *SliceCmd { + return &SliceCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *SliceCmd) SetVal(val []interface{}) { + cmd.val = val +} + +func (cmd *SliceCmd) Val() []interface{} { + return cmd.val +} + +func (cmd *SliceCmd) Result() ([]interface{}, error) { + return cmd.val, cmd.err +} + +func (cmd *SliceCmd) String() string { + return cmdString(cmd, cmd.val) +} + +// Scan scans the results from the map into a destination struct. The map keys +// are matched in the Redis struct fields by the `redis:"field"` tag. +func (cmd *SliceCmd) Scan(dst interface{}) error { + if cmd.err != nil { + return cmd.err + } + + // Pass the list of keys and values. + // Skip the first two args for: HMGET key + var args []interface{} + if cmd.args[0] == "hmget" { + args = cmd.args[2:] + } else { + // Otherwise, it's: MGET field field ... + args = cmd.args[1:] + } + + return hscan.Scan(dst, args, cmd.val) +} + +func (cmd *SliceCmd) readReply(rd *proto.Reader) error { + v, err := rd.ReadArrayReply(sliceParser) + if err != nil { + return err + } + cmd.val = v.([]interface{}) + return nil +} + +//------------------------------------------------------------------------------ + +type StatusCmd struct { + baseCmd + + val string +} + +var _ Cmder = (*StatusCmd)(nil) + +func NewStatusCmd(ctx context.Context, args ...interface{}) *StatusCmd { + return &StatusCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *StatusCmd) SetVal(val string) { + cmd.val = val +} + +func (cmd *StatusCmd) Val() string { + return cmd.val +} + +func (cmd *StatusCmd) Result() (string, error) { + return cmd.val, cmd.err +} + +func (cmd *StatusCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *StatusCmd) readReply(rd *proto.Reader) (err error) { + cmd.val, err = rd.ReadString() + return err +} + +//------------------------------------------------------------------------------ + +type IntCmd struct { + baseCmd + + val int64 +} + +var _ Cmder = (*IntCmd)(nil) + +func NewIntCmd(ctx context.Context, args ...interface{}) *IntCmd { + return &IntCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *IntCmd) SetVal(val int64) { + cmd.val = val +} + +func (cmd *IntCmd) Val() int64 { + return cmd.val +} + +func (cmd *IntCmd) Result() (int64, error) { + return cmd.val, cmd.err +} + +func (cmd *IntCmd) Uint64() (uint64, error) { + return uint64(cmd.val), cmd.err +} + +func (cmd *IntCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *IntCmd) readReply(rd *proto.Reader) (err error) { + cmd.val, err = rd.ReadIntReply() + return err +} + +//------------------------------------------------------------------------------ + +type IntSliceCmd struct { + baseCmd + + val []int64 +} + +var _ Cmder = (*IntSliceCmd)(nil) + +func NewIntSliceCmd(ctx context.Context, args ...interface{}) *IntSliceCmd { + return &IntSliceCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *IntSliceCmd) SetVal(val []int64) { + cmd.val = val +} + +func (cmd *IntSliceCmd) Val() []int64 { + return cmd.val +} + +func (cmd *IntSliceCmd) Result() ([]int64, error) { + return cmd.val, cmd.err +} + +func (cmd *IntSliceCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *IntSliceCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make([]int64, n) + for i := 0; i < len(cmd.val); i++ { + num, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + cmd.val[i] = num + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type DurationCmd struct { + baseCmd + + val time.Duration + precision time.Duration +} + +var _ Cmder = (*DurationCmd)(nil) + +func NewDurationCmd(ctx context.Context, precision time.Duration, args ...interface{}) *DurationCmd { + return &DurationCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + precision: precision, + } +} + +func (cmd *DurationCmd) SetVal(val time.Duration) { + cmd.val = val +} + +func (cmd *DurationCmd) Val() time.Duration { + return cmd.val +} + +func (cmd *DurationCmd) Result() (time.Duration, error) { + return cmd.val, cmd.err +} + +func (cmd *DurationCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *DurationCmd) readReply(rd *proto.Reader) error { + n, err := rd.ReadIntReply() + if err != nil { + return err + } + switch n { + // -2 if the key does not exist + // -1 if the key exists but has no associated expire + case -2, -1: + cmd.val = time.Duration(n) + default: + cmd.val = time.Duration(n) * cmd.precision + } + return nil +} + +//------------------------------------------------------------------------------ + +type TimeCmd struct { + baseCmd + + val time.Time +} + +var _ Cmder = (*TimeCmd)(nil) + +func NewTimeCmd(ctx context.Context, args ...interface{}) *TimeCmd { + return &TimeCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *TimeCmd) SetVal(val time.Time) { + cmd.val = val +} + +func (cmd *TimeCmd) Val() time.Time { + return cmd.val +} + +func (cmd *TimeCmd) Result() (time.Time, error) { + return cmd.val, cmd.err +} + +func (cmd *TimeCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *TimeCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + if n != 2 { + return nil, fmt.Errorf("got %d elements, expected 2", n) + } + + sec, err := rd.ReadInt() + if err != nil { + return nil, err + } + + microsec, err := rd.ReadInt() + if err != nil { + return nil, err + } + + cmd.val = time.Unix(sec, microsec*1000) + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type BoolCmd struct { + baseCmd + + val bool +} + +var _ Cmder = (*BoolCmd)(nil) + +func NewBoolCmd(ctx context.Context, args ...interface{}) *BoolCmd { + return &BoolCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *BoolCmd) SetVal(val bool) { + cmd.val = val +} + +func (cmd *BoolCmd) Val() bool { + return cmd.val +} + +func (cmd *BoolCmd) Result() (bool, error) { + return cmd.val, cmd.err +} + +func (cmd *BoolCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *BoolCmd) readReply(rd *proto.Reader) error { + v, err := rd.ReadReply(nil) + // `SET key value NX` returns nil when key already exists. But + // `SETNX key value` returns bool (0/1). So convert nil to bool. + if err == Nil { + cmd.val = false + return nil + } + if err != nil { + return err + } + switch v := v.(type) { + case int64: + cmd.val = v == 1 + return nil + case string: + cmd.val = v == "OK" + return nil + default: + return fmt.Errorf("got %T, wanted int64 or string", v) + } +} + +//------------------------------------------------------------------------------ + +type StringCmd struct { + baseCmd + + val string +} + +var _ Cmder = (*StringCmd)(nil) + +func NewStringCmd(ctx context.Context, args ...interface{}) *StringCmd { + return &StringCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *StringCmd) SetVal(val string) { + cmd.val = val +} + +func (cmd *StringCmd) Val() string { + return cmd.val +} + +func (cmd *StringCmd) Result() (string, error) { + return cmd.Val(), cmd.err +} + +func (cmd *StringCmd) Bytes() ([]byte, error) { + return util.StringToBytes(cmd.val), cmd.err +} + +func (cmd *StringCmd) Bool() (bool, error) { + if cmd.err != nil { + return false, cmd.err + } + return strconv.ParseBool(cmd.val) +} + +func (cmd *StringCmd) Int() (int, error) { + if cmd.err != nil { + return 0, cmd.err + } + return strconv.Atoi(cmd.Val()) +} + +func (cmd *StringCmd) Int64() (int64, error) { + if cmd.err != nil { + return 0, cmd.err + } + return strconv.ParseInt(cmd.Val(), 10, 64) +} + +func (cmd *StringCmd) Uint64() (uint64, error) { + if cmd.err != nil { + return 0, cmd.err + } + return strconv.ParseUint(cmd.Val(), 10, 64) +} + +func (cmd *StringCmd) Float32() (float32, error) { + if cmd.err != nil { + return 0, cmd.err + } + f, err := strconv.ParseFloat(cmd.Val(), 32) + if err != nil { + return 0, err + } + return float32(f), nil +} + +func (cmd *StringCmd) Float64() (float64, error) { + if cmd.err != nil { + return 0, cmd.err + } + return strconv.ParseFloat(cmd.Val(), 64) +} + +func (cmd *StringCmd) Time() (time.Time, error) { + if cmd.err != nil { + return time.Time{}, cmd.err + } + return time.Parse(time.RFC3339Nano, cmd.Val()) +} + +func (cmd *StringCmd) Scan(val interface{}) error { + if cmd.err != nil { + return cmd.err + } + return proto.Scan([]byte(cmd.val), val) +} + +func (cmd *StringCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *StringCmd) readReply(rd *proto.Reader) (err error) { + cmd.val, err = rd.ReadString() + return err +} + +//------------------------------------------------------------------------------ + +type FloatCmd struct { + baseCmd + + val float64 +} + +var _ Cmder = (*FloatCmd)(nil) + +func NewFloatCmd(ctx context.Context, args ...interface{}) *FloatCmd { + return &FloatCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *FloatCmd) SetVal(val float64) { + cmd.val = val +} + +func (cmd *FloatCmd) Val() float64 { + return cmd.val +} + +func (cmd *FloatCmd) Result() (float64, error) { + return cmd.Val(), cmd.Err() +} + +func (cmd *FloatCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *FloatCmd) readReply(rd *proto.Reader) (err error) { + cmd.val, err = rd.ReadFloatReply() + return err +} + +//------------------------------------------------------------------------------ + +type FloatSliceCmd struct { + baseCmd + + val []float64 +} + +var _ Cmder = (*FloatSliceCmd)(nil) + +func NewFloatSliceCmd(ctx context.Context, args ...interface{}) *FloatSliceCmd { + return &FloatSliceCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *FloatSliceCmd) SetVal(val []float64) { + cmd.val = val +} + +func (cmd *FloatSliceCmd) Val() []float64 { + return cmd.val +} + +func (cmd *FloatSliceCmd) Result() ([]float64, error) { + return cmd.val, cmd.err +} + +func (cmd *FloatSliceCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *FloatSliceCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make([]float64, n) + for i := 0; i < len(cmd.val); i++ { + switch num, err := rd.ReadFloatReply(); { + case err == Nil: + cmd.val[i] = 0 + case err != nil: + return nil, err + default: + cmd.val[i] = num + } + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type StringSliceCmd struct { + baseCmd + + val []string +} + +var _ Cmder = (*StringSliceCmd)(nil) + +func NewStringSliceCmd(ctx context.Context, args ...interface{}) *StringSliceCmd { + return &StringSliceCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *StringSliceCmd) SetVal(val []string) { + cmd.val = val +} + +func (cmd *StringSliceCmd) Val() []string { + return cmd.val +} + +func (cmd *StringSliceCmd) Result() ([]string, error) { + return cmd.Val(), cmd.Err() +} + +func (cmd *StringSliceCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *StringSliceCmd) ScanSlice(container interface{}) error { + return proto.ScanSlice(cmd.Val(), container) +} + +func (cmd *StringSliceCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make([]string, n) + for i := 0; i < len(cmd.val); i++ { + switch s, err := rd.ReadString(); { + case err == Nil: + cmd.val[i] = "" + case err != nil: + return nil, err + default: + cmd.val[i] = s + } + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type BoolSliceCmd struct { + baseCmd + + val []bool +} + +var _ Cmder = (*BoolSliceCmd)(nil) + +func NewBoolSliceCmd(ctx context.Context, args ...interface{}) *BoolSliceCmd { + return &BoolSliceCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *BoolSliceCmd) SetVal(val []bool) { + cmd.val = val +} + +func (cmd *BoolSliceCmd) Val() []bool { + return cmd.val +} + +func (cmd *BoolSliceCmd) Result() ([]bool, error) { + return cmd.val, cmd.err +} + +func (cmd *BoolSliceCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *BoolSliceCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make([]bool, n) + for i := 0; i < len(cmd.val); i++ { + n, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + cmd.val[i] = n == 1 + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type StringStringMapCmd struct { + baseCmd + + val map[string]string +} + +var _ Cmder = (*StringStringMapCmd)(nil) + +func NewStringStringMapCmd(ctx context.Context, args ...interface{}) *StringStringMapCmd { + return &StringStringMapCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *StringStringMapCmd) SetVal(val map[string]string) { + cmd.val = val +} + +func (cmd *StringStringMapCmd) Val() map[string]string { + return cmd.val +} + +func (cmd *StringStringMapCmd) Result() (map[string]string, error) { + return cmd.val, cmd.err +} + +func (cmd *StringStringMapCmd) String() string { + return cmdString(cmd, cmd.val) +} + +// Scan scans the results from the map into a destination struct. The map keys +// are matched in the Redis struct fields by the `redis:"field"` tag. +func (cmd *StringStringMapCmd) Scan(dest interface{}) error { + if cmd.err != nil { + return cmd.err + } + + strct, err := hscan.Struct(dest) + if err != nil { + return err + } + + for k, v := range cmd.val { + if err := strct.Scan(k, v); err != nil { + return err + } + } + + return nil +} + +func (cmd *StringStringMapCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make(map[string]string, n/2) + for i := int64(0); i < n; i += 2 { + key, err := rd.ReadString() + if err != nil { + return nil, err + } + + value, err := rd.ReadString() + if err != nil { + return nil, err + } + + cmd.val[key] = value + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type StringIntMapCmd struct { + baseCmd + + val map[string]int64 +} + +var _ Cmder = (*StringIntMapCmd)(nil) + +func NewStringIntMapCmd(ctx context.Context, args ...interface{}) *StringIntMapCmd { + return &StringIntMapCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *StringIntMapCmd) SetVal(val map[string]int64) { + cmd.val = val +} + +func (cmd *StringIntMapCmd) Val() map[string]int64 { + return cmd.val +} + +func (cmd *StringIntMapCmd) Result() (map[string]int64, error) { + return cmd.val, cmd.err +} + +func (cmd *StringIntMapCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *StringIntMapCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make(map[string]int64, n/2) + for i := int64(0); i < n; i += 2 { + key, err := rd.ReadString() + if err != nil { + return nil, err + } + + n, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + + cmd.val[key] = n + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type StringStructMapCmd struct { + baseCmd + + val map[string]struct{} +} + +var _ Cmder = (*StringStructMapCmd)(nil) + +func NewStringStructMapCmd(ctx context.Context, args ...interface{}) *StringStructMapCmd { + return &StringStructMapCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *StringStructMapCmd) SetVal(val map[string]struct{}) { + cmd.val = val +} + +func (cmd *StringStructMapCmd) Val() map[string]struct{} { + return cmd.val +} + +func (cmd *StringStructMapCmd) Result() (map[string]struct{}, error) { + return cmd.val, cmd.err +} + +func (cmd *StringStructMapCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *StringStructMapCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make(map[string]struct{}, n) + for i := int64(0); i < n; i++ { + key, err := rd.ReadString() + if err != nil { + return nil, err + } + cmd.val[key] = struct{}{} + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type XMessage struct { + ID string + Values map[string]interface{} +} + +type XMessageSliceCmd struct { + baseCmd + + val []XMessage +} + +var _ Cmder = (*XMessageSliceCmd)(nil) + +func NewXMessageSliceCmd(ctx context.Context, args ...interface{}) *XMessageSliceCmd { + return &XMessageSliceCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *XMessageSliceCmd) SetVal(val []XMessage) { + cmd.val = val +} + +func (cmd *XMessageSliceCmd) Val() []XMessage { + return cmd.val +} + +func (cmd *XMessageSliceCmd) Result() ([]XMessage, error) { + return cmd.val, cmd.err +} + +func (cmd *XMessageSliceCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XMessageSliceCmd) readReply(rd *proto.Reader) error { + var err error + cmd.val, err = readXMessageSlice(rd) + return err +} + +func readXMessageSlice(rd *proto.Reader) ([]XMessage, error) { + n, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + + msgs := make([]XMessage, n) + for i := 0; i < n; i++ { + var err error + msgs[i], err = readXMessage(rd) + if err != nil { + return nil, err + } + } + return msgs, nil +} + +func readXMessage(rd *proto.Reader) (XMessage, error) { + n, err := rd.ReadArrayLen() + if err != nil { + return XMessage{}, err + } + if n != 2 { + return XMessage{}, fmt.Errorf("got %d, wanted 2", n) + } + + id, err := rd.ReadString() + if err != nil { + return XMessage{}, err + } + + var values map[string]interface{} + + v, err := rd.ReadArrayReply(stringInterfaceMapParser) + if err != nil { + if err != proto.Nil { + return XMessage{}, err + } + } else { + values = v.(map[string]interface{}) + } + + return XMessage{ + ID: id, + Values: values, + }, nil +} + +// stringInterfaceMapParser implements proto.MultiBulkParse. +func stringInterfaceMapParser(rd *proto.Reader, n int64) (interface{}, error) { + m := make(map[string]interface{}, n/2) + for i := int64(0); i < n; i += 2 { + key, err := rd.ReadString() + if err != nil { + return nil, err + } + + value, err := rd.ReadString() + if err != nil { + return nil, err + } + + m[key] = value + } + return m, nil +} + +//------------------------------------------------------------------------------ + +type XStream struct { + Stream string + Messages []XMessage +} + +type XStreamSliceCmd struct { + baseCmd + + val []XStream +} + +var _ Cmder = (*XStreamSliceCmd)(nil) + +func NewXStreamSliceCmd(ctx context.Context, args ...interface{}) *XStreamSliceCmd { + return &XStreamSliceCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *XStreamSliceCmd) SetVal(val []XStream) { + cmd.val = val +} + +func (cmd *XStreamSliceCmd) Val() []XStream { + return cmd.val +} + +func (cmd *XStreamSliceCmd) Result() ([]XStream, error) { + return cmd.val, cmd.err +} + +func (cmd *XStreamSliceCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XStreamSliceCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make([]XStream, n) + for i := 0; i < len(cmd.val); i++ { + i := i + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + if n != 2 { + return nil, fmt.Errorf("got %d, wanted 2", n) + } + + stream, err := rd.ReadString() + if err != nil { + return nil, err + } + + msgs, err := readXMessageSlice(rd) + if err != nil { + return nil, err + } + + cmd.val[i] = XStream{ + Stream: stream, + Messages: msgs, + } + return nil, nil + }) + if err != nil { + return nil, err + } + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type XPending struct { + Count int64 + Lower string + Higher string + Consumers map[string]int64 +} + +type XPendingCmd struct { + baseCmd + val *XPending +} + +var _ Cmder = (*XPendingCmd)(nil) + +func NewXPendingCmd(ctx context.Context, args ...interface{}) *XPendingCmd { + return &XPendingCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *XPendingCmd) SetVal(val *XPending) { + cmd.val = val +} + +func (cmd *XPendingCmd) Val() *XPending { + return cmd.val +} + +func (cmd *XPendingCmd) Result() (*XPending, error) { + return cmd.val, cmd.err +} + +func (cmd *XPendingCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XPendingCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + if n != 4 { + return nil, fmt.Errorf("got %d, wanted 4", n) + } + + count, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + + lower, err := rd.ReadString() + if err != nil && err != Nil { + return nil, err + } + + higher, err := rd.ReadString() + if err != nil && err != Nil { + return nil, err + } + + cmd.val = &XPending{ + Count: count, + Lower: lower, + Higher: higher, + } + _, err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + for i := int64(0); i < n; i++ { + _, err = rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + if n != 2 { + return nil, fmt.Errorf("got %d, wanted 2", n) + } + + consumerName, err := rd.ReadString() + if err != nil { + return nil, err + } + + consumerPending, err := rd.ReadInt() + if err != nil { + return nil, err + } + + if cmd.val.Consumers == nil { + cmd.val.Consumers = make(map[string]int64) + } + cmd.val.Consumers[consumerName] = consumerPending + + return nil, nil + }) + if err != nil { + return nil, err + } + } + return nil, nil + }) + if err != nil && err != Nil { + return nil, err + } + + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type XPendingExt struct { + ID string + Consumer string + Idle time.Duration + RetryCount int64 +} + +type XPendingExtCmd struct { + baseCmd + val []XPendingExt +} + +var _ Cmder = (*XPendingExtCmd)(nil) + +func NewXPendingExtCmd(ctx context.Context, args ...interface{}) *XPendingExtCmd { + return &XPendingExtCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *XPendingExtCmd) SetVal(val []XPendingExt) { + cmd.val = val +} + +func (cmd *XPendingExtCmd) Val() []XPendingExt { + return cmd.val +} + +func (cmd *XPendingExtCmd) Result() ([]XPendingExt, error) { + return cmd.val, cmd.err +} + +func (cmd *XPendingExtCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XPendingExtCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make([]XPendingExt, 0, n) + for i := int64(0); i < n; i++ { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + if n != 4 { + return nil, fmt.Errorf("got %d, wanted 4", n) + } + + id, err := rd.ReadString() + if err != nil { + return nil, err + } + + consumer, err := rd.ReadString() + if err != nil && err != Nil { + return nil, err + } + + idle, err := rd.ReadIntReply() + if err != nil && err != Nil { + return nil, err + } + + retryCount, err := rd.ReadIntReply() + if err != nil && err != Nil { + return nil, err + } + + cmd.val = append(cmd.val, XPendingExt{ + ID: id, + Consumer: consumer, + Idle: time.Duration(idle) * time.Millisecond, + RetryCount: retryCount, + }) + return nil, nil + }) + if err != nil { + return nil, err + } + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type XAutoClaimCmd struct { + baseCmd + + start string + val []XMessage +} + +var _ Cmder = (*XAutoClaimCmd)(nil) + +func NewXAutoClaimCmd(ctx context.Context, args ...interface{}) *XAutoClaimCmd { + return &XAutoClaimCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *XAutoClaimCmd) SetVal(val []XMessage, start string) { + cmd.val = val + cmd.start = start +} + +func (cmd *XAutoClaimCmd) Val() (messages []XMessage, start string) { + return cmd.val, cmd.start +} + +func (cmd *XAutoClaimCmd) Result() (messages []XMessage, start string, err error) { + return cmd.val, cmd.start, cmd.err +} + +func (cmd *XAutoClaimCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XAutoClaimCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + if n != 2 { + return nil, fmt.Errorf("got %d, wanted 2", n) + } + var err error + + cmd.start, err = rd.ReadString() + if err != nil { + return nil, err + } + + cmd.val, err = readXMessageSlice(rd) + if err != nil { + return nil, err + } + + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type XAutoClaimJustIDCmd struct { + baseCmd + + start string + val []string +} + +var _ Cmder = (*XAutoClaimJustIDCmd)(nil) + +func NewXAutoClaimJustIDCmd(ctx context.Context, args ...interface{}) *XAutoClaimJustIDCmd { + return &XAutoClaimJustIDCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *XAutoClaimJustIDCmd) SetVal(val []string, start string) { + cmd.val = val + cmd.start = start +} + +func (cmd *XAutoClaimJustIDCmd) Val() (ids []string, start string) { + return cmd.val, cmd.start +} + +func (cmd *XAutoClaimJustIDCmd) Result() (ids []string, start string, err error) { + return cmd.val, cmd.start, cmd.err +} + +func (cmd *XAutoClaimJustIDCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XAutoClaimJustIDCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + if n != 2 { + return nil, fmt.Errorf("got %d, wanted 2", n) + } + var err error + + cmd.start, err = rd.ReadString() + if err != nil { + return nil, err + } + + nn, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + + cmd.val = make([]string, nn) + for i := 0; i < nn; i++ { + cmd.val[i], err = rd.ReadString() + if err != nil { + return nil, err + } + } + + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type XInfoConsumersCmd struct { + baseCmd + val []XInfoConsumer +} + +type XInfoConsumer struct { + Name string + Pending int64 + Idle int64 +} + +var _ Cmder = (*XInfoConsumersCmd)(nil) + +func NewXInfoConsumersCmd(ctx context.Context, stream string, group string) *XInfoConsumersCmd { + return &XInfoConsumersCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: []interface{}{"xinfo", "consumers", stream, group}, + }, + } +} + +func (cmd *XInfoConsumersCmd) SetVal(val []XInfoConsumer) { + cmd.val = val +} + +func (cmd *XInfoConsumersCmd) Val() []XInfoConsumer { + return cmd.val +} + +func (cmd *XInfoConsumersCmd) Result() ([]XInfoConsumer, error) { + return cmd.val, cmd.err +} + +func (cmd *XInfoConsumersCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XInfoConsumersCmd) readReply(rd *proto.Reader) error { + n, err := rd.ReadArrayLen() + if err != nil { + return err + } + + cmd.val = make([]XInfoConsumer, n) + + for i := 0; i < n; i++ { + cmd.val[i], err = readXConsumerInfo(rd) + if err != nil { + return err + } + } + + return nil +} + +func readXConsumerInfo(rd *proto.Reader) (XInfoConsumer, error) { + var consumer XInfoConsumer + + n, err := rd.ReadArrayLen() + if err != nil { + return consumer, err + } + if n != 6 { + return consumer, fmt.Errorf("redis: got %d elements in XINFO CONSUMERS reply, wanted 6", n) + } + + for i := 0; i < 3; i++ { + key, err := rd.ReadString() + if err != nil { + return consumer, err + } + + val, err := rd.ReadString() + if err != nil { + return consumer, err + } + + switch key { + case "name": + consumer.Name = val + case "pending": + consumer.Pending, err = strconv.ParseInt(val, 0, 64) + if err != nil { + return consumer, err + } + case "idle": + consumer.Idle, err = strconv.ParseInt(val, 0, 64) + if err != nil { + return consumer, err + } + default: + return consumer, fmt.Errorf("redis: unexpected content %s in XINFO CONSUMERS reply", key) + } + } + + return consumer, nil +} + +//------------------------------------------------------------------------------ + +type XInfoGroupsCmd struct { + baseCmd + val []XInfoGroup +} + +type XInfoGroup struct { + Name string + Consumers int64 + Pending int64 + LastDeliveredID string +} + +var _ Cmder = (*XInfoGroupsCmd)(nil) + +func NewXInfoGroupsCmd(ctx context.Context, stream string) *XInfoGroupsCmd { + return &XInfoGroupsCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: []interface{}{"xinfo", "groups", stream}, + }, + } +} + +func (cmd *XInfoGroupsCmd) SetVal(val []XInfoGroup) { + cmd.val = val +} + +func (cmd *XInfoGroupsCmd) Val() []XInfoGroup { + return cmd.val +} + +func (cmd *XInfoGroupsCmd) Result() ([]XInfoGroup, error) { + return cmd.val, cmd.err +} + +func (cmd *XInfoGroupsCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XInfoGroupsCmd) readReply(rd *proto.Reader) error { + n, err := rd.ReadArrayLen() + if err != nil { + return err + } + + cmd.val = make([]XInfoGroup, n) + + for i := 0; i < n; i++ { + cmd.val[i], err = readXGroupInfo(rd) + if err != nil { + return err + } + } + + return nil +} + +func readXGroupInfo(rd *proto.Reader) (XInfoGroup, error) { + var group XInfoGroup + + n, err := rd.ReadArrayLen() + if err != nil { + return group, err + } + if n != 8 { + return group, fmt.Errorf("redis: got %d elements in XINFO GROUPS reply, wanted 8", n) + } + + for i := 0; i < 4; i++ { + key, err := rd.ReadString() + if err != nil { + return group, err + } + + val, err := rd.ReadString() + if err != nil { + return group, err + } + + switch key { + case "name": + group.Name = val + case "consumers": + group.Consumers, err = strconv.ParseInt(val, 0, 64) + if err != nil { + return group, err + } + case "pending": + group.Pending, err = strconv.ParseInt(val, 0, 64) + if err != nil { + return group, err + } + case "last-delivered-id": + group.LastDeliveredID = val + default: + return group, fmt.Errorf("redis: unexpected content %s in XINFO GROUPS reply", key) + } + } + + return group, nil +} + +//------------------------------------------------------------------------------ + +type XInfoStreamCmd struct { + baseCmd + val *XInfoStream +} + +type XInfoStream struct { + Length int64 + RadixTreeKeys int64 + RadixTreeNodes int64 + Groups int64 + LastGeneratedID string + FirstEntry XMessage + LastEntry XMessage +} + +var _ Cmder = (*XInfoStreamCmd)(nil) + +func NewXInfoStreamCmd(ctx context.Context, stream string) *XInfoStreamCmd { + return &XInfoStreamCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: []interface{}{"xinfo", "stream", stream}, + }, + } +} + +func (cmd *XInfoStreamCmd) SetVal(val *XInfoStream) { + cmd.val = val +} + +func (cmd *XInfoStreamCmd) Val() *XInfoStream { + return cmd.val +} + +func (cmd *XInfoStreamCmd) Result() (*XInfoStream, error) { + return cmd.val, cmd.err +} + +func (cmd *XInfoStreamCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XInfoStreamCmd) readReply(rd *proto.Reader) error { + v, err := rd.ReadReply(xStreamInfoParser) + if err != nil { + return err + } + cmd.val = v.(*XInfoStream) + return nil +} + +func xStreamInfoParser(rd *proto.Reader, n int64) (interface{}, error) { + if n != 14 { + return nil, fmt.Errorf("redis: got %d elements in XINFO STREAM reply,"+ + "wanted 14", n) + } + var info XInfoStream + for i := 0; i < 7; i++ { + key, err := rd.ReadString() + if err != nil { + return nil, err + } + switch key { + case "length": + info.Length, err = rd.ReadIntReply() + case "radix-tree-keys": + info.RadixTreeKeys, err = rd.ReadIntReply() + case "radix-tree-nodes": + info.RadixTreeNodes, err = rd.ReadIntReply() + case "groups": + info.Groups, err = rd.ReadIntReply() + case "last-generated-id": + info.LastGeneratedID, err = rd.ReadString() + case "first-entry": + info.FirstEntry, err = readXMessage(rd) + if err == Nil { + err = nil + } + case "last-entry": + info.LastEntry, err = readXMessage(rd) + if err == Nil { + err = nil + } + default: + return nil, fmt.Errorf("redis: unexpected content %s "+ + "in XINFO STREAM reply", key) + } + if err != nil { + return nil, err + } + } + return &info, nil +} + +//------------------------------------------------------------------------------ + +type XInfoStreamFullCmd struct { + baseCmd + val *XInfoStreamFull +} + +type XInfoStreamFull struct { + Length int64 + RadixTreeKeys int64 + RadixTreeNodes int64 + LastGeneratedID string + Entries []XMessage + Groups []XInfoStreamGroup +} + +type XInfoStreamGroup struct { + Name string + LastDeliveredID string + PelCount int64 + Pending []XInfoStreamGroupPending + Consumers []XInfoStreamConsumer +} + +type XInfoStreamGroupPending struct { + ID string + Consumer string + DeliveryTime time.Time + DeliveryCount int64 +} + +type XInfoStreamConsumer struct { + Name string + SeenTime time.Time + PelCount int64 + Pending []XInfoStreamConsumerPending +} + +type XInfoStreamConsumerPending struct { + ID string + DeliveryTime time.Time + DeliveryCount int64 +} + +var _ Cmder = (*XInfoStreamFullCmd)(nil) + +func NewXInfoStreamFullCmd(ctx context.Context, args ...interface{}) *XInfoStreamFullCmd { + return &XInfoStreamFullCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *XInfoStreamFullCmd) SetVal(val *XInfoStreamFull) { + cmd.val = val +} + +func (cmd *XInfoStreamFullCmd) Val() *XInfoStreamFull { + return cmd.val +} + +func (cmd *XInfoStreamFullCmd) Result() (*XInfoStreamFull, error) { + return cmd.val, cmd.err +} + +func (cmd *XInfoStreamFullCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XInfoStreamFullCmd) readReply(rd *proto.Reader) error { + n, err := rd.ReadArrayLen() + if err != nil { + return err + } + if n != 12 { + return fmt.Errorf("redis: got %d elements in XINFO STREAM FULL reply,"+ + "wanted 12", n) + } + + cmd.val = &XInfoStreamFull{} + + for i := 0; i < 6; i++ { + key, err := rd.ReadString() + if err != nil { + return err + } + + switch key { + case "length": + cmd.val.Length, err = rd.ReadIntReply() + case "radix-tree-keys": + cmd.val.RadixTreeKeys, err = rd.ReadIntReply() + case "radix-tree-nodes": + cmd.val.RadixTreeNodes, err = rd.ReadIntReply() + case "last-generated-id": + cmd.val.LastGeneratedID, err = rd.ReadString() + case "entries": + cmd.val.Entries, err = readXMessageSlice(rd) + case "groups": + cmd.val.Groups, err = readStreamGroups(rd) + default: + return fmt.Errorf("redis: unexpected content %s "+ + "in XINFO STREAM reply", key) + } + if err != nil { + return err + } + } + return nil +} + +func readStreamGroups(rd *proto.Reader) ([]XInfoStreamGroup, error) { + n, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + groups := make([]XInfoStreamGroup, 0, n) + for i := 0; i < n; i++ { + nn, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + if nn != 10 { + return nil, fmt.Errorf("redis: got %d elements in XINFO STREAM FULL reply,"+ + "wanted 10", nn) + } + + group := XInfoStreamGroup{} + + for f := 0; f < 5; f++ { + key, err := rd.ReadString() + if err != nil { + return nil, err + } + + switch key { + case "name": + group.Name, err = rd.ReadString() + case "last-delivered-id": + group.LastDeliveredID, err = rd.ReadString() + case "pel-count": + group.PelCount, err = rd.ReadIntReply() + case "pending": + group.Pending, err = readXInfoStreamGroupPending(rd) + case "consumers": + group.Consumers, err = readXInfoStreamConsumers(rd) + default: + return nil, fmt.Errorf("redis: unexpected content %s "+ + "in XINFO STREAM reply", key) + } + + if err != nil { + return nil, err + } + } + + groups = append(groups, group) + } + + return groups, nil +} + +func readXInfoStreamGroupPending(rd *proto.Reader) ([]XInfoStreamGroupPending, error) { + n, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + + pending := make([]XInfoStreamGroupPending, 0, n) + + for i := 0; i < n; i++ { + nn, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + if nn != 4 { + return nil, fmt.Errorf("redis: got %d elements in XINFO STREAM FULL reply,"+ + "wanted 4", nn) + } + + p := XInfoStreamGroupPending{} + + p.ID, err = rd.ReadString() + if err != nil { + return nil, err + } + + p.Consumer, err = rd.ReadString() + if err != nil { + return nil, err + } + + delivery, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + p.DeliveryTime = time.Unix(delivery/1000, delivery%1000*int64(time.Millisecond)) + + p.DeliveryCount, err = rd.ReadIntReply() + if err != nil { + return nil, err + } + + pending = append(pending, p) + } + + return pending, nil +} + +func readXInfoStreamConsumers(rd *proto.Reader) ([]XInfoStreamConsumer, error) { + n, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + + consumers := make([]XInfoStreamConsumer, 0, n) + + for i := 0; i < n; i++ { + nn, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + if nn != 8 { + return nil, fmt.Errorf("redis: got %d elements in XINFO STREAM FULL reply,"+ + "wanted 8", nn) + } + + c := XInfoStreamConsumer{} + + for f := 0; f < 4; f++ { + cKey, err := rd.ReadString() + if err != nil { + return nil, err + } + + switch cKey { + case "name": + c.Name, err = rd.ReadString() + case "seen-time": + seen, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + c.SeenTime = time.Unix(seen/1000, seen%1000*int64(time.Millisecond)) + case "pel-count": + c.PelCount, err = rd.ReadIntReply() + case "pending": + pendingNumber, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + + c.Pending = make([]XInfoStreamConsumerPending, 0, pendingNumber) + + for pn := 0; pn < pendingNumber; pn++ { + nn, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + if nn != 3 { + return nil, fmt.Errorf("redis: got %d elements in XINFO STREAM reply,"+ + "wanted 3", nn) + } + + p := XInfoStreamConsumerPending{} + + p.ID, err = rd.ReadString() + if err != nil { + return nil, err + } + + delivery, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + p.DeliveryTime = time.Unix(delivery/1000, delivery%1000*int64(time.Millisecond)) + + p.DeliveryCount, err = rd.ReadIntReply() + if err != nil { + return nil, err + } + + c.Pending = append(c.Pending, p) + } + default: + return nil, fmt.Errorf("redis: unexpected content %s "+ + "in XINFO STREAM reply", cKey) + } + if err != nil { + return nil, err + } + } + consumers = append(consumers, c) + } + + return consumers, nil +} + +//------------------------------------------------------------------------------ + +type ZSliceCmd struct { + baseCmd + + val []Z +} + +var _ Cmder = (*ZSliceCmd)(nil) + +func NewZSliceCmd(ctx context.Context, args ...interface{}) *ZSliceCmd { + return &ZSliceCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *ZSliceCmd) SetVal(val []Z) { + cmd.val = val +} + +func (cmd *ZSliceCmd) Val() []Z { + return cmd.val +} + +func (cmd *ZSliceCmd) Result() ([]Z, error) { + return cmd.val, cmd.err +} + +func (cmd *ZSliceCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *ZSliceCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make([]Z, n/2) + for i := 0; i < len(cmd.val); i++ { + member, err := rd.ReadString() + if err != nil { + return nil, err + } + + score, err := rd.ReadFloatReply() + if err != nil { + return nil, err + } + + cmd.val[i] = Z{ + Member: member, + Score: score, + } + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type ZWithKeyCmd struct { + baseCmd + + val *ZWithKey +} + +var _ Cmder = (*ZWithKeyCmd)(nil) + +func NewZWithKeyCmd(ctx context.Context, args ...interface{}) *ZWithKeyCmd { + return &ZWithKeyCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *ZWithKeyCmd) SetVal(val *ZWithKey) { + cmd.val = val +} + +func (cmd *ZWithKeyCmd) Val() *ZWithKey { + return cmd.val +} + +func (cmd *ZWithKeyCmd) Result() (*ZWithKey, error) { + return cmd.Val(), cmd.Err() +} + +func (cmd *ZWithKeyCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *ZWithKeyCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + if n != 3 { + return nil, fmt.Errorf("got %d elements, expected 3", n) + } + + cmd.val = &ZWithKey{} + var err error + + cmd.val.Key, err = rd.ReadString() + if err != nil { + return nil, err + } + + cmd.val.Member, err = rd.ReadString() + if err != nil { + return nil, err + } + + cmd.val.Score, err = rd.ReadFloatReply() + if err != nil { + return nil, err + } + + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type ScanCmd struct { + baseCmd + + page []string + cursor uint64 + + process cmdable +} + +var _ Cmder = (*ScanCmd)(nil) + +func NewScanCmd(ctx context.Context, process cmdable, args ...interface{}) *ScanCmd { + return &ScanCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + process: process, + } +} + +func (cmd *ScanCmd) SetVal(page []string, cursor uint64) { + cmd.page = page + cmd.cursor = cursor +} + +func (cmd *ScanCmd) Val() (keys []string, cursor uint64) { + return cmd.page, cmd.cursor +} + +func (cmd *ScanCmd) Result() (keys []string, cursor uint64, err error) { + return cmd.page, cmd.cursor, cmd.err +} + +func (cmd *ScanCmd) String() string { + return cmdString(cmd, cmd.page) +} + +func (cmd *ScanCmd) readReply(rd *proto.Reader) (err error) { + cmd.page, cmd.cursor, err = rd.ReadScanReply() + return err +} + +// Iterator creates a new ScanIterator. +func (cmd *ScanCmd) Iterator() *ScanIterator { + return &ScanIterator{ + cmd: cmd, + } +} + +//------------------------------------------------------------------------------ + +type ClusterNode struct { + ID string + Addr string +} + +type ClusterSlot struct { + Start int + End int + Nodes []ClusterNode +} + +type ClusterSlotsCmd struct { + baseCmd + + val []ClusterSlot +} + +var _ Cmder = (*ClusterSlotsCmd)(nil) + +func NewClusterSlotsCmd(ctx context.Context, args ...interface{}) *ClusterSlotsCmd { + return &ClusterSlotsCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *ClusterSlotsCmd) SetVal(val []ClusterSlot) { + cmd.val = val +} + +func (cmd *ClusterSlotsCmd) Val() []ClusterSlot { + return cmd.val +} + +func (cmd *ClusterSlotsCmd) Result() ([]ClusterSlot, error) { + return cmd.Val(), cmd.Err() +} + +func (cmd *ClusterSlotsCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *ClusterSlotsCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make([]ClusterSlot, n) + for i := 0; i < len(cmd.val); i++ { + n, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + if n < 2 { + err := fmt.Errorf("redis: got %d elements in cluster info, expected at least 2", n) + return nil, err + } + + start, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + + end, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + + nodes := make([]ClusterNode, n-2) + for j := 0; j < len(nodes); j++ { + n, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + if n != 2 && n != 3 { + err := fmt.Errorf("got %d elements in cluster info address, expected 2 or 3", n) + return nil, err + } + + ip, err := rd.ReadString() + if err != nil { + return nil, err + } + + port, err := rd.ReadString() + if err != nil { + return nil, err + } + + nodes[j].Addr = net.JoinHostPort(ip, port) + + if n == 3 { + id, err := rd.ReadString() + if err != nil { + return nil, err + } + nodes[j].ID = id + } + } + + cmd.val[i] = ClusterSlot{ + Start: int(start), + End: int(end), + Nodes: nodes, + } + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +// GeoLocation is used with GeoAdd to add geospatial location. +type GeoLocation struct { + Name string + Longitude, Latitude, Dist float64 + GeoHash int64 +} + +// GeoRadiusQuery is used with GeoRadius to query geospatial index. +type GeoRadiusQuery struct { + Radius float64 + // Can be m, km, ft, or mi. Default is km. + Unit string + WithCoord bool + WithDist bool + WithGeoHash bool + Count int + // Can be ASC or DESC. Default is no sort order. + Sort string + Store string + StoreDist string +} + +type GeoLocationCmd struct { + baseCmd + + q *GeoRadiusQuery + locations []GeoLocation +} + +var _ Cmder = (*GeoLocationCmd)(nil) + +func NewGeoLocationCmd(ctx context.Context, q *GeoRadiusQuery, args ...interface{}) *GeoLocationCmd { + return &GeoLocationCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: geoLocationArgs(q, args...), + }, + q: q, + } +} + +func geoLocationArgs(q *GeoRadiusQuery, args ...interface{}) []interface{} { + args = append(args, q.Radius) + if q.Unit != "" { + args = append(args, q.Unit) + } else { + args = append(args, "km") + } + if q.WithCoord { + args = append(args, "withcoord") + } + if q.WithDist { + args = append(args, "withdist") + } + if q.WithGeoHash { + args = append(args, "withhash") + } + if q.Count > 0 { + args = append(args, "count", q.Count) + } + if q.Sort != "" { + args = append(args, q.Sort) + } + if q.Store != "" { + args = append(args, "store") + args = append(args, q.Store) + } + if q.StoreDist != "" { + args = append(args, "storedist") + args = append(args, q.StoreDist) + } + return args +} + +func (cmd *GeoLocationCmd) SetVal(locations []GeoLocation) { + cmd.locations = locations +} + +func (cmd *GeoLocationCmd) Val() []GeoLocation { + return cmd.locations +} + +func (cmd *GeoLocationCmd) Result() ([]GeoLocation, error) { + return cmd.locations, cmd.err +} + +func (cmd *GeoLocationCmd) String() string { + return cmdString(cmd, cmd.locations) +} + +func (cmd *GeoLocationCmd) readReply(rd *proto.Reader) error { + v, err := rd.ReadArrayReply(newGeoLocationSliceParser(cmd.q)) + if err != nil { + return err + } + cmd.locations = v.([]GeoLocation) + return nil +} + +func newGeoLocationSliceParser(q *GeoRadiusQuery) proto.MultiBulkParse { + return func(rd *proto.Reader, n int64) (interface{}, error) { + locs := make([]GeoLocation, 0, n) + for i := int64(0); i < n; i++ { + v, err := rd.ReadReply(newGeoLocationParser(q)) + if err != nil { + return nil, err + } + switch vv := v.(type) { + case string: + locs = append(locs, GeoLocation{ + Name: vv, + }) + case *GeoLocation: + // TODO: avoid copying + locs = append(locs, *vv) + default: + return nil, fmt.Errorf("got %T, expected string or *GeoLocation", v) + } + } + return locs, nil + } +} + +func newGeoLocationParser(q *GeoRadiusQuery) proto.MultiBulkParse { + return func(rd *proto.Reader, n int64) (interface{}, error) { + var loc GeoLocation + var err error + + loc.Name, err = rd.ReadString() + if err != nil { + return nil, err + } + if q.WithDist { + loc.Dist, err = rd.ReadFloatReply() + if err != nil { + return nil, err + } + } + if q.WithGeoHash { + loc.GeoHash, err = rd.ReadIntReply() + if err != nil { + return nil, err + } + } + if q.WithCoord { + n, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + if n != 2 { + return nil, fmt.Errorf("got %d coordinates, expected 2", n) + } + + loc.Longitude, err = rd.ReadFloatReply() + if err != nil { + return nil, err + } + loc.Latitude, err = rd.ReadFloatReply() + if err != nil { + return nil, err + } + } + + return &loc, nil + } +} + +//------------------------------------------------------------------------------ + +// GeoSearchQuery is used for GEOSearch/GEOSearchStore command query. +type GeoSearchQuery struct { + Member string + + // Latitude and Longitude when using FromLonLat option. + Longitude float64 + Latitude float64 + + // Distance and unit when using ByRadius option. + // Can use m, km, ft, or mi. Default is km. + Radius float64 + RadiusUnit string + + // Height, width and unit when using ByBox option. + // Can be m, km, ft, or mi. Default is km. + BoxWidth float64 + BoxHeight float64 + BoxUnit string + + // Can be ASC or DESC. Default is no sort order. + Sort string + Count int + CountAny bool +} + +type GeoSearchLocationQuery struct { + GeoSearchQuery + + WithCoord bool + WithDist bool + WithHash bool +} + +type GeoSearchStoreQuery struct { + GeoSearchQuery + + // When using the StoreDist option, the command stores the items in a + // sorted set populated with their distance from the center of the circle or box, + // as a floating-point number, in the same unit specified for that shape. + StoreDist bool +} + +func geoSearchLocationArgs(q *GeoSearchLocationQuery, args []interface{}) []interface{} { + args = geoSearchArgs(&q.GeoSearchQuery, args) + + if q.WithCoord { + args = append(args, "withcoord") + } + if q.WithDist { + args = append(args, "withdist") + } + if q.WithHash { + args = append(args, "withhash") + } + + return args +} + +func geoSearchArgs(q *GeoSearchQuery, args []interface{}) []interface{} { + if q.Member != "" { + args = append(args, "frommember", q.Member) + } else { + args = append(args, "fromlonlat", q.Longitude, q.Latitude) + } + + if q.Radius > 0 { + if q.RadiusUnit == "" { + q.RadiusUnit = "km" + } + args = append(args, "byradius", q.Radius, q.RadiusUnit) + } else { + if q.BoxUnit == "" { + q.BoxUnit = "km" + } + args = append(args, "bybox", q.BoxWidth, q.BoxHeight, q.BoxUnit) + } + + if q.Sort != "" { + args = append(args, q.Sort) + } + + if q.Count > 0 { + args = append(args, "count", q.Count) + if q.CountAny { + args = append(args, "any") + } + } + + return args +} + +type GeoSearchLocationCmd struct { + baseCmd + + opt *GeoSearchLocationQuery + val []GeoLocation +} + +var _ Cmder = (*GeoSearchLocationCmd)(nil) + +func NewGeoSearchLocationCmd( + ctx context.Context, opt *GeoSearchLocationQuery, args ...interface{}, +) *GeoSearchLocationCmd { + return &GeoSearchLocationCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + opt: opt, + } +} + +func (cmd *GeoSearchLocationCmd) SetVal(val []GeoLocation) { + cmd.val = val +} + +func (cmd *GeoSearchLocationCmd) Val() []GeoLocation { + return cmd.val +} + +func (cmd *GeoSearchLocationCmd) Result() ([]GeoLocation, error) { + return cmd.val, cmd.err +} + +func (cmd *GeoSearchLocationCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *GeoSearchLocationCmd) readReply(rd *proto.Reader) error { + n, err := rd.ReadArrayLen() + if err != nil { + return err + } + + cmd.val = make([]GeoLocation, n) + for i := 0; i < n; i++ { + _, err = rd.ReadArrayLen() + if err != nil { + return err + } + + var loc GeoLocation + + loc.Name, err = rd.ReadString() + if err != nil { + return err + } + if cmd.opt.WithDist { + loc.Dist, err = rd.ReadFloatReply() + if err != nil { + return err + } + } + if cmd.opt.WithHash { + loc.GeoHash, err = rd.ReadIntReply() + if err != nil { + return err + } + } + if cmd.opt.WithCoord { + nn, err := rd.ReadArrayLen() + if err != nil { + return err + } + if nn != 2 { + return fmt.Errorf("got %d coordinates, expected 2", nn) + } + + loc.Longitude, err = rd.ReadFloatReply() + if err != nil { + return err + } + loc.Latitude, err = rd.ReadFloatReply() + if err != nil { + return err + } + } + + cmd.val[i] = loc + } + + return nil +} + +//------------------------------------------------------------------------------ + +type GeoPos struct { + Longitude, Latitude float64 +} + +type GeoPosCmd struct { + baseCmd + + val []*GeoPos +} + +var _ Cmder = (*GeoPosCmd)(nil) + +func NewGeoPosCmd(ctx context.Context, args ...interface{}) *GeoPosCmd { + return &GeoPosCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *GeoPosCmd) SetVal(val []*GeoPos) { + cmd.val = val +} + +func (cmd *GeoPosCmd) Val() []*GeoPos { + return cmd.val +} + +func (cmd *GeoPosCmd) Result() ([]*GeoPos, error) { + return cmd.Val(), cmd.Err() +} + +func (cmd *GeoPosCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *GeoPosCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make([]*GeoPos, n) + for i := 0; i < len(cmd.val); i++ { + i := i + _, err := rd.ReadReply(func(rd *proto.Reader, n int64) (interface{}, error) { + longitude, err := rd.ReadFloatReply() + if err != nil { + return nil, err + } + + latitude, err := rd.ReadFloatReply() + if err != nil { + return nil, err + } + + cmd.val[i] = &GeoPos{ + Longitude: longitude, + Latitude: latitude, + } + return nil, nil + }) + if err != nil { + if err == Nil { + cmd.val[i] = nil + continue + } + return nil, err + } + } + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type CommandInfo struct { + Name string + Arity int8 + Flags []string + ACLFlags []string + FirstKeyPos int8 + LastKeyPos int8 + StepCount int8 + ReadOnly bool +} + +type CommandsInfoCmd struct { + baseCmd + + val map[string]*CommandInfo +} + +var _ Cmder = (*CommandsInfoCmd)(nil) + +func NewCommandsInfoCmd(ctx context.Context, args ...interface{}) *CommandsInfoCmd { + return &CommandsInfoCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *CommandsInfoCmd) SetVal(val map[string]*CommandInfo) { + cmd.val = val +} + +func (cmd *CommandsInfoCmd) Val() map[string]*CommandInfo { + return cmd.val +} + +func (cmd *CommandsInfoCmd) Result() (map[string]*CommandInfo, error) { + return cmd.Val(), cmd.Err() +} + +func (cmd *CommandsInfoCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *CommandsInfoCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make(map[string]*CommandInfo, n) + for i := int64(0); i < n; i++ { + v, err := rd.ReadReply(commandInfoParser) + if err != nil { + return nil, err + } + vv := v.(*CommandInfo) + cmd.val[vv.Name] = vv + } + return nil, nil + }) + return err +} + +func commandInfoParser(rd *proto.Reader, n int64) (interface{}, error) { + const numArgRedis5 = 6 + const numArgRedis6 = 7 + + switch n { + case numArgRedis5, numArgRedis6: + // continue + default: + return nil, fmt.Errorf("redis: got %d elements in COMMAND reply, wanted 7", n) + } + + var cmd CommandInfo + var err error + + cmd.Name, err = rd.ReadString() + if err != nil { + return nil, err + } + + arity, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + cmd.Arity = int8(arity) + + _, err = rd.ReadReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.Flags = make([]string, n) + for i := 0; i < len(cmd.Flags); i++ { + switch s, err := rd.ReadString(); { + case err == Nil: + cmd.Flags[i] = "" + case err != nil: + return nil, err + default: + cmd.Flags[i] = s + } + } + return nil, nil + }) + if err != nil { + return nil, err + } + + firstKeyPos, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + cmd.FirstKeyPos = int8(firstKeyPos) + + lastKeyPos, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + cmd.LastKeyPos = int8(lastKeyPos) + + stepCount, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + cmd.StepCount = int8(stepCount) + + for _, flag := range cmd.Flags { + if flag == "readonly" { + cmd.ReadOnly = true + break + } + } + + if n == numArgRedis5 { + return &cmd, nil + } + + _, err = rd.ReadReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.ACLFlags = make([]string, n) + for i := 0; i < len(cmd.ACLFlags); i++ { + switch s, err := rd.ReadString(); { + case err == Nil: + cmd.ACLFlags[i] = "" + case err != nil: + return nil, err + default: + cmd.ACLFlags[i] = s + } + } + return nil, nil + }) + if err != nil { + return nil, err + } + + return &cmd, nil +} + +//------------------------------------------------------------------------------ + +type cmdsInfoCache struct { + fn func(ctx context.Context) (map[string]*CommandInfo, error) + + once internal.Once + cmds map[string]*CommandInfo +} + +func newCmdsInfoCache(fn func(ctx context.Context) (map[string]*CommandInfo, error)) *cmdsInfoCache { + return &cmdsInfoCache{ + fn: fn, + } +} + +func (c *cmdsInfoCache) Get(ctx context.Context) (map[string]*CommandInfo, error) { + err := c.once.Do(func() error { + cmds, err := c.fn(ctx) + if err != nil { + return err + } + + // Extensions have cmd names in upper case. Convert them to lower case. + for k, v := range cmds { + lower := internal.ToLower(k) + if lower != k { + cmds[lower] = v + } + } + + c.cmds = cmds + return nil + }) + return c.cmds, err +} + +//------------------------------------------------------------------------------ + +type SlowLog struct { + ID int64 + Time time.Time + Duration time.Duration + Args []string + // These are also optional fields emitted only by Redis 4.0 or greater: + // https://redis.io/commands/slowlog#output-format + ClientAddr string + ClientName string +} + +type SlowLogCmd struct { + baseCmd + + val []SlowLog +} + +var _ Cmder = (*SlowLogCmd)(nil) + +func NewSlowLogCmd(ctx context.Context, args ...interface{}) *SlowLogCmd { + return &SlowLogCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *SlowLogCmd) SetVal(val []SlowLog) { + cmd.val = val +} + +func (cmd *SlowLogCmd) Val() []SlowLog { + return cmd.val +} + +func (cmd *SlowLogCmd) Result() ([]SlowLog, error) { + return cmd.Val(), cmd.Err() +} + +func (cmd *SlowLogCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *SlowLogCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + cmd.val = make([]SlowLog, n) + for i := 0; i < len(cmd.val); i++ { + n, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + if n < 4 { + err := fmt.Errorf("redis: got %d elements in slowlog get, expected at least 4", n) + return nil, err + } + + id, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + + createdAt, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + createdAtTime := time.Unix(createdAt, 0) + + costs, err := rd.ReadIntReply() + if err != nil { + return nil, err + } + costsDuration := time.Duration(costs) * time.Microsecond + + cmdLen, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + if cmdLen < 1 { + err := fmt.Errorf("redis: got %d elements commands reply in slowlog get, expected at least 1", cmdLen) + return nil, err + } + + cmdString := make([]string, cmdLen) + for i := 0; i < cmdLen; i++ { + cmdString[i], err = rd.ReadString() + if err != nil { + return nil, err + } + } + + var address, name string + for i := 4; i < n; i++ { + str, err := rd.ReadString() + if err != nil { + return nil, err + } + if i == 4 { + address = str + } else if i == 5 { + name = str + } + } + + cmd.val[i] = SlowLog{ + ID: id, + Time: createdAtTime, + Duration: costsDuration, + Args: cmdString, + ClientAddr: address, + ClientName: name, + } + } + return nil, nil + }) + return err +} diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/command_test.go b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/command_test.go new file mode 100644 index 0000000..168f9f6 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/command_test.go @@ -0,0 +1,96 @@ +package redis_test + +import ( + "errors" + "time" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + redis "github.com/go-redis/redis/v8" +) + +var _ = Describe("Cmd", func() { + var client *redis.Client + + BeforeEach(func() { + client = redis.NewClient(redisOptions()) + Expect(client.FlushDB(ctx).Err()).NotTo(HaveOccurred()) + }) + + AfterEach(func() { + Expect(client.Close()).NotTo(HaveOccurred()) + }) + + It("implements Stringer", func() { + set := client.Set(ctx, "foo", "bar", 0) + Expect(set.String()).To(Equal("set foo bar: OK")) + + get := client.Get(ctx, "foo") + Expect(get.String()).To(Equal("get foo: bar")) + }) + + It("has val/err", func() { + set := client.Set(ctx, "key", "hello", 0) + Expect(set.Err()).NotTo(HaveOccurred()) + Expect(set.Val()).To(Equal("OK")) + + get := client.Get(ctx, "key") + Expect(get.Err()).NotTo(HaveOccurred()) + Expect(get.Val()).To(Equal("hello")) + + Expect(set.Err()).NotTo(HaveOccurred()) + Expect(set.Val()).To(Equal("OK")) + }) + + It("has helpers", func() { + set := client.Set(ctx, "key", "10", 0) + Expect(set.Err()).NotTo(HaveOccurred()) + + n, err := client.Get(ctx, "key").Int64() + Expect(err).NotTo(HaveOccurred()) + Expect(n).To(Equal(int64(10))) + + un, err := client.Get(ctx, "key").Uint64() + Expect(err).NotTo(HaveOccurred()) + Expect(un).To(Equal(uint64(10))) + + f, err := client.Get(ctx, "key").Float64() + Expect(err).NotTo(HaveOccurred()) + Expect(f).To(Equal(float64(10))) + }) + + It("supports float32", func() { + f := float32(66.97) + + err := client.Set(ctx, "float_key", f, 0).Err() + Expect(err).NotTo(HaveOccurred()) + + val, err := client.Get(ctx, "float_key").Float32() + Expect(err).NotTo(HaveOccurred()) + Expect(val).To(Equal(f)) + }) + + It("supports time.Time", func() { + tm := time.Date(2019, 1, 1, 9, 45, 10, 222125, time.UTC) + + err := client.Set(ctx, "time_key", tm, 0).Err() + Expect(err).NotTo(HaveOccurred()) + + s, err := client.Get(ctx, "time_key").Result() + Expect(err).NotTo(HaveOccurred()) + Expect(s).To(Equal("2019-01-01T09:45:10.000222125Z")) + + tm2, err := client.Get(ctx, "time_key").Time() + Expect(err).NotTo(HaveOccurred()) + Expect(tm2).To(BeTemporally("==", tm)) + }) + + It("allows to set custom error", func() { + e := errors.New("custom error") + cmd := redis.Cmd{} + cmd.SetErr(e) + _, err := cmd.Result() + Expect(err).To(Equal(e)) + }) +}) diff --git a/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/commands.go b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/commands.go new file mode 100644 index 0000000..bbfe089 --- /dev/null +++ b/dependencies/pkg/mod/github.com/go-redis/redis/v8@v8.11.5/commands.go @@ -0,0 +1,3475 @@ +package redis + +import ( + "context" + "errors" + "io" + "time" + + "github.com/go-redis/redis/v8/internal" +) + +// KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, +// otherwise you will receive an error: (error) ERR syntax error. +// For example: +// +// rdb.Set(ctx, key, value, redis.KeepTTL) +const KeepTTL = -1 + +func usePrecise(dur time.Duration) bool { + return dur < time.Second || dur%time.Second != 0 +} + +func formatMs(ctx context.Context, dur time.Duration) int64 { + if dur > 0 && dur < time.Millisecond { + internal.Logger.Printf( + ctx, + "specified duration is %s, but minimal supported value is %s - truncating to 1ms", + dur, time.Millisecond, + ) + return 1 + } + return int64(dur / time.Millisecond) +} + +func formatSec(ctx context.Context, dur time.Duration) int64 { + if dur > 0 && dur < time.Second { + internal.Logger.Printf( + ctx, + "specified duration is %s, but minimal supported value is %s - truncating to 1s", + dur, time.Second, + ) + return 1 + } + return int64(dur / time.Second) +} + +func appendArgs(dst, src []interface{}) []interface{} { + if len(src) == 1 { + return appendArg(dst, src[0]) + } + + dst = append(dst, src...) + return dst +} + +func appendArg(dst []interface{}, arg interface{}) []interface{} { + switch arg := arg.(type) { + case []string: + for _, s := range arg { + dst = append(dst, s) + } + return dst + case []interface{}: + dst = append(dst, arg...) + return dst + case map[string]interface{}: + for k, v := range arg { + dst = append(dst, k, v) + } + return dst + case map[string]string: + for k, v := range arg { + dst = append(dst, k, v) + } + return dst + default: + return append(dst, arg) + } +} + +type Cmdable interface { + Pipeline() Pipeliner + Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) + + TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) + TxPipeline() Pipeliner + + Command(ctx context.Context) *CommandsInfoCmd + ClientGetName(ctx context.Context) *StringCmd + Echo(ctx context.Context, message interface{}) *StringCmd + Ping(ctx context.Context) *StatusCmd + Quit(ctx context.Context) *StatusCmd + Del(ctx context.Context, keys ...string) *IntCmd + Unlink(ctx context.Context, keys ...string) *IntCmd + Dump(ctx context.Context, key string) *StringCmd + Exists(ctx context.Context, keys ...string) *IntCmd + Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd + ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd + ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd + ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd + ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd + ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd + Keys(ctx context.Context, pattern string) *StringSliceCmd + Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd + Move(ctx context.Context, key string, db int) *BoolCmd + ObjectRefCount(ctx context.Context, key string) *IntCmd + ObjectEncoding(ctx context.Context, key string) *StringCmd + ObjectIdleTime(ctx context.Context, key string) *DurationCmd + Persist(ctx context.Context, key string) *BoolCmd + PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd + PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd + PTTL(ctx context.Context, key string) *DurationCmd + RandomKey(ctx context.Context) *StringCmd + Rename(ctx context.Context, key, newkey string) *StatusCmd + RenameNX(ctx context.Context, key, newkey string) *BoolCmd + Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd + RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd + Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd + SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd + SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd + Touch(ctx context.Context, keys ...string) *IntCmd + TTL(ctx context.Context, key string) *DurationCmd + Type(ctx context.Context, key string) *StatusCmd + Append(ctx context.Context, key, value string) *IntCmd + Decr(ctx context.Context, key string) *IntCmd + DecrBy(ctx context.Context, key string, decrement int64) *IntCmd + Get(ctx context.Context, key string) *StringCmd + GetRange(ctx context.Context, key string, start, end int64) *StringCmd + GetSet(ctx context.Context, key string, value interface{}) *StringCmd + GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd + GetDel(ctx context.Context, key string) *StringCmd + Incr(ctx context.Context, key string) *IntCmd + IncrBy(ctx context.Context, key string, value int64) *IntCmd + IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd + MGet(ctx context.Context, keys ...string) *SliceCmd + MSet(ctx context.Context, values ...interface{}) *StatusCmd + MSetNX(ctx context.Context, values ...interface{}) *BoolCmd + Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd + SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd + // TODO: rename to SetEx + SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd + SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd + SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd + SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd + StrLen(ctx context.Context, key string) *IntCmd + Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *IntCmd + + GetBit(ctx context.Context, key string, offset int64) *IntCmd + SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd + BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd + BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd + BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd + BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd + BitOpNot(ctx context.Context, destKey string, key string) *IntCmd + BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd + BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd + + Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd + ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd + SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd + HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd + ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd + + HDel(ctx context.Context, key string, fields ...string) *IntCmd + HExists(ctx context.Context, key, field string) *BoolCmd + HGet(ctx context.Context, key, field string) *StringCmd + HGetAll(ctx context.Context, key string) *StringStringMapCmd + HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd + HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd + HKeys(ctx context.Context, key string) *StringSliceCmd + HLen(ctx context.Context, key string) *IntCmd + HMGet(ctx context.Context, key string, fields ...string) *SliceCmd + HSet(ctx context.Context, key string, values ...interface{}) *IntCmd + HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd + HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd + HVals(ctx context.Context, key string) *StringSliceCmd + HRandField(ctx context.Context, key string, count int, withValues bool) *StringSliceCmd + + BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd + BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd + BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd + LIndex(ctx context.Context, key string, index int64) *StringCmd + LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd + LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd + LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd + LLen(ctx context.Context, key string) *IntCmd + LPop(ctx context.Context, key string) *StringCmd + LPopCount(ctx context.Context, key string, count int) *StringSliceCmd + LPos(ctx context.Context, key string, value string, args LPosArgs) *IntCmd + LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd + LPush(ctx context.Context, key string, values ...interface{}) *IntCmd + LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd + LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd + LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd + LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd + LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd + RPop(ctx context.Context, key string) *StringCmd + RPopCount(ctx context.Context, key string, count int) *StringSliceCmd + RPopLPush(ctx context.Context, source, destination string) *StringCmd + RPush(ctx context.Context, key string, values ...interface{}) *IntCmd + RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd + LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd + BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd + + SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd + SCard(ctx context.Context, key string) *IntCmd + SDiff(ctx context.Context, keys ...string) *StringSliceCmd + SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd + SInter(ctx context.Context, keys ...string) *StringSliceCmd + SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd + SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd + SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd + SMembers(ctx context.Context, key string) *StringSliceCmd + SMembersMap(ctx context.Context, key string) *StringStructMapCmd + SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd + SPop(ctx context.Context, key string) *StringCmd + SPopN(ctx context.Context, key string, count int64) *StringSliceCmd + SRandMember(ctx context.Context, key string) *StringCmd + SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd + SRem(ctx context.Context, key string, members ...interface{}) *IntCmd + SUnion(ctx context.Context, keys ...string) *StringSliceCmd + SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd + + XAdd(ctx context.Context, a *XAddArgs) *StringCmd + XDel(ctx context.Context, stream string, ids ...string) *IntCmd + XLen(ctx context.Context, stream string) *IntCmd + XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd + XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd + XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd + XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd + XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd + XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd + XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd + XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd + XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd + XGroupDestroy(ctx context.Context, stream, group string) *IntCmd + XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd + XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd + XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd + XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd + XPending(ctx context.Context, stream, group string) *XPendingCmd + XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd + XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd + XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd + XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd + XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd + + // TODO: XTrim and XTrimApprox remove in v9. + XTrim(ctx context.Context, key string, maxLen int64) *IntCmd + XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd + XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd + XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd + XTrimMinID(ctx context.Context, key string, minID string) *IntCmd + XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd + XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd + XInfoStream(ctx context.Context, key string) *XInfoStreamCmd + XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd + XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd + + BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd + BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd + + // TODO: remove + // ZAddCh + // ZIncr + // ZAddNXCh + // ZAddXXCh + // ZIncrNX + // ZIncrXX + // in v9. + // use ZAddArgs and ZAddArgsIncr. + + ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd + ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd + ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd + ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd + ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd + ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd + ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd + ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd + ZIncr(ctx context.Context, key string, member *Z) *FloatCmd + ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd + ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd + ZCard(ctx context.Context, key string) *IntCmd + ZCount(ctx context.Context, key, min, max string) *IntCmd + ZLexCount(ctx context.Context, key, min, max string) *IntCmd + ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd + ZInter(ctx context.Context, store *ZStore) *StringSliceCmd + ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd + ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd + ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd + ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd + ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd + ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd + ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd + ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd + ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd + ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd + ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd + ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd + ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd + ZRank(ctx context.Context, key, member string) *IntCmd + ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd + ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd + ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd + ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd + ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd + ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd + ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd + ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd + ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd + ZRevRank(ctx context.Context, key, member string) *IntCmd + ZScore(ctx context.Context, key, member string) *FloatCmd + ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd + ZUnion(ctx context.Context, store ZStore) *StringSliceCmd + ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd + ZRandMember(ctx context.Context, key string, count int, withScores bool) *StringSliceCmd + ZDiff(ctx context.Context, keys ...string) *StringSliceCmd + ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd + ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd + + PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd + PFCount(ctx context.Context, keys ...string) *IntCmd + PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd + + BgRewriteAOF(ctx context.Context) *StatusCmd + BgSave(ctx context.Context) *StatusCmd + ClientKill(ctx context.Context, ipPort string) *StatusCmd + ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd + ClientList(ctx context.Context) *StringCmd + ClientPause(ctx context.Context, dur time.Duration) *BoolCmd + ClientID(ctx context.Context) *IntCmd + ConfigGet(ctx context.Context, parameter string) *SliceCmd + ConfigResetStat(ctx context.Context) *StatusCmd + ConfigSet(ctx context.Context, parameter, value string) *StatusCmd + ConfigRewrite(ctx context.Context) *StatusCmd + DBSize(ctx context.Context) *IntCmd + FlushAll(ctx context.Context) *StatusCmd + FlushAllAsync(ctx context.Context) *StatusCmd + FlushDB(ctx context.Context) *StatusCmd + FlushDBAsync(ctx context.Context) *StatusCmd + Info(ctx context.Context, section ...string) *StringCmd + LastSave(ctx context.Context) *IntCmd + Save(ctx context.Context) *StatusCmd + Shutdown(ctx context.Context) *StatusCmd + ShutdownSave(ctx context.Context) *StatusCmd + ShutdownNoSave(ctx context.Context) *StatusCmd + SlaveOf(ctx context.Context, host, port string) *StatusCmd + Time(ctx context.Context) *TimeCmd + DebugObject(ctx context.Context, key string) *StringCmd + ReadOnly(ctx context.Context) *StatusCmd + ReadWrite(ctx context.Context) *StatusCmd + MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd + + Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd + EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd + ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd + ScriptFlush(ctx context.Context) *StatusCmd + ScriptKill(ctx context.Context) *StatusCmd + ScriptLoad(ctx context.Context, script string) *StringCmd + + Publish(ctx context.Context, channel string, message interface{}) *IntCmd + PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd + PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd + PubSubNumPat(ctx context.Context) *IntCmd + + ClusterSlots(ctx context.Context) *ClusterSlotsCmd + ClusterNodes(ctx context.Context) *StringCmd + ClusterMeet(ctx context.Context, host, port string) *StatusCmd + ClusterForget(ctx context.Context, nodeID string) *StatusCmd + ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd + ClusterResetSoft(ctx context.Context) *StatusCmd + ClusterResetHard(ctx context.Context) *StatusCmd + ClusterInfo(ctx context.Context) *StringCmd + ClusterKeySlot(ctx context.Context, key string) *IntCmd + ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd + ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd + ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd + ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd + ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd + ClusterSaveConfig(ctx context.Context) *StatusCmd + ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd + ClusterFailover(ctx context.Context) *StatusCmd + ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd + ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd + + GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd + GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd + GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd + GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd + GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd + GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd + GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd + GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd + GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd + GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd + GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd +} + +type StatefulCmdable interface { + Cmdable + Auth(ctx context.Context, password string) *StatusCmd + AuthACL(ctx context.Context, username, password string) *StatusCmd + Select(ctx context.Context, index int) *StatusCmd + SwapDB(ctx context.Context, index1, index2 int) *StatusCmd + ClientSetName(ctx context.Context, name string) *BoolCmd +} + +var ( + _ Cmdable = (*Client)(nil) + _ Cmdable = (*Tx)(nil) + _ Cmdable = (*Ring)(nil) + _ Cmdable = (*ClusterClient)(nil) +) + +type cmdable func(ctx context.Context, cmd Cmder) error + +type statefulCmdable func(ctx context.Context, cmd Cmder) error + +//------------------------------------------------------------------------------ + +func (c statefulCmdable) Auth(ctx context.Context, password string) *StatusCmd { + cmd := NewStatusCmd(ctx, "auth", password) + _ = c(ctx, cmd) + return cmd +} + +// AuthACL Perform an AUTH command, using the given user and pass. +// Should be used to authenticate the current connection with one of the connections defined in the ACL list +// when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system. +func (c statefulCmdable) AuthACL(ctx context.Context, username, password string) *StatusCmd { + cmd := NewStatusCmd(ctx, "auth", username, password) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd { + cmd := NewIntCmd(ctx, "wait", numSlaves, int(timeout/time.Millisecond)) + cmd.setReadTimeout(timeout) + _ = c(ctx, cmd) + return cmd +} + +func (c statefulCmdable) Select(ctx context.Context, index int) *StatusCmd { + cmd := NewStatusCmd(ctx, "select", index) + _ = c(ctx, cmd) + return cmd +} + +func (c statefulCmdable) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd { + cmd := NewStatusCmd(ctx, "swapdb", index1, index2) + _ = c(ctx, cmd) + return cmd +} + +// ClientSetName assigns a name to the connection. +func (c statefulCmdable) ClientSetName(ctx context.Context, name string) *BoolCmd { + cmd := NewBoolCmd(ctx, "client", "setname", name) + _ = c(ctx, cmd) + return cmd +} + +//------------------------------------------------------------------------------ + +func (c cmdable) Command(ctx context.Context) *CommandsInfoCmd { + cmd := NewCommandsInfoCmd(ctx, "command") + _ = c(ctx, cmd) + return cmd +} + +// ClientGetName returns the name of the connection. +func (c cmdable) ClientGetName(ctx context.Context) *StringCmd { + cmd := NewStringCmd(ctx, "client", "getname") + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Echo(ctx context.Context, message interface{}) *StringCmd { + cmd := NewStringCmd(ctx, "echo", message) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Ping(ctx context.Context) *StatusCmd { + cmd := NewStatusCmd(ctx, "ping") + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Quit(_ context.Context) *StatusCmd { + panic("not implemented") +} + +func (c cmdable) Del(ctx context.Context, keys ...string) *IntCmd { + args := make([]interface{}, 1+len(keys)) + args[0] = "del" + for i, key := range keys { + args[1+i] = key + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Unlink(ctx context.Context, keys ...string) *IntCmd { + args := make([]interface{}, 1+len(keys)) + args[0] = "unlink" + for i, key := range keys { + args[1+i] = key + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Dump(ctx context.Context, key string) *StringCmd { + cmd := NewStringCmd(ctx, "dump", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Exists(ctx context.Context, keys ...string) *IntCmd { + args := make([]interface{}, 1+len(keys)) + args[0] = "exists" + for i, key := range keys { + args[1+i] = key + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd { + return c.expire(ctx, key, expiration, "") +} + +func (c cmdable) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd { + return c.expire(ctx, key, expiration, "NX") +} + +func (c cmdable) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd { + return c.expire(ctx, key, expiration, "XX") +} + +func (c cmdable) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd { + return c.expire(ctx, key, expiration, "GT") +} + +func (c cmdable) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd { + return c.expire(ctx, key, expiration, "LT") +} + +func (c cmdable) expire( + ctx context.Context, key string, expiration time.Duration, mode string, +) *BoolCmd { + args := make([]interface{}, 3, 4) + args[0] = "expire" + args[1] = key + args[2] = formatSec(ctx, expiration) + if mode != "" { + args = append(args, mode) + } + + cmd := NewBoolCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd { + cmd := NewBoolCmd(ctx, "expireat", key, tm.Unix()) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Keys(ctx context.Context, pattern string) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "keys", pattern) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd { + cmd := NewStatusCmd( + ctx, + "migrate", + host, + port, + key, + db, + formatMs(ctx, timeout), + ) + cmd.setReadTimeout(timeout) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Move(ctx context.Context, key string, db int) *BoolCmd { + cmd := NewBoolCmd(ctx, "move", key, db) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ObjectRefCount(ctx context.Context, key string) *IntCmd { + cmd := NewIntCmd(ctx, "object", "refcount", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ObjectEncoding(ctx context.Context, key string) *StringCmd { + cmd := NewStringCmd(ctx, "object", "encoding", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ObjectIdleTime(ctx context.Context, key string) *DurationCmd { + cmd := NewDurationCmd(ctx, time.Second, "object", "idletime", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Persist(ctx context.Context, key string) *BoolCmd { + cmd := NewBoolCmd(ctx, "persist", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd { + cmd := NewBoolCmd(ctx, "pexpire", key, formatMs(ctx, expiration)) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd { + cmd := NewBoolCmd( + ctx, + "pexpireat", + key, + tm.UnixNano()/int64(time.Millisecond), + ) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) PTTL(ctx context.Context, key string) *DurationCmd { + cmd := NewDurationCmd(ctx, time.Millisecond, "pttl", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) RandomKey(ctx context.Context) *StringCmd { + cmd := NewStringCmd(ctx, "randomkey") + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Rename(ctx context.Context, key, newkey string) *StatusCmd { + cmd := NewStatusCmd(ctx, "rename", key, newkey) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) RenameNX(ctx context.Context, key, newkey string) *BoolCmd { + cmd := NewBoolCmd(ctx, "renamenx", key, newkey) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd { + cmd := NewStatusCmd( + ctx, + "restore", + key, + formatMs(ctx, ttl), + value, + ) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd { + cmd := NewStatusCmd( + ctx, + "restore", + key, + formatMs(ctx, ttl), + value, + "replace", + ) + _ = c(ctx, cmd) + return cmd +} + +type Sort struct { + By string + Offset, Count int64 + Get []string + Order string + Alpha bool +} + +func (sort *Sort) args(key string) []interface{} { + args := []interface{}{"sort", key} + if sort.By != "" { + args = append(args, "by", sort.By) + } + if sort.Offset != 0 || sort.Count != 0 { + args = append(args, "limit", sort.Offset, sort.Count) + } + for _, get := range sort.Get { + args = append(args, "get", get) + } + if sort.Order != "" { + args = append(args, sort.Order) + } + if sort.Alpha { + args = append(args, "alpha") + } + return args +} + +func (c cmdable) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, sort.args(key)...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd { + args := sort.args(key) + if store != "" { + args = append(args, "store", store) + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd { + cmd := NewSliceCmd(ctx, sort.args(key)...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Touch(ctx context.Context, keys ...string) *IntCmd { + args := make([]interface{}, len(keys)+1) + args[0] = "touch" + for i, key := range keys { + args[i+1] = key + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) TTL(ctx context.Context, key string) *DurationCmd { + cmd := NewDurationCmd(ctx, time.Second, "ttl", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Type(ctx context.Context, key string) *StatusCmd { + cmd := NewStatusCmd(ctx, "type", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Append(ctx context.Context, key, value string) *IntCmd { + cmd := NewIntCmd(ctx, "append", key, value) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Decr(ctx context.Context, key string) *IntCmd { + cmd := NewIntCmd(ctx, "decr", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd { + cmd := NewIntCmd(ctx, "decrby", key, decrement) + _ = c(ctx, cmd) + return cmd +} + +// Get Redis `GET key` command. It returns redis.Nil error when key does not exist. +func (c cmdable) Get(ctx context.Context, key string) *StringCmd { + cmd := NewStringCmd(ctx, "get", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) GetRange(ctx context.Context, key string, start, end int64) *StringCmd { + cmd := NewStringCmd(ctx, "getrange", key, start, end) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) GetSet(ctx context.Context, key string, value interface{}) *StringCmd { + cmd := NewStringCmd(ctx, "getset", key, value) + _ = c(ctx, cmd) + return cmd +} + +// GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). +// Requires Redis >= 6.2.0. +func (c cmdable) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd { + args := make([]interface{}, 0, 4) + args = append(args, "getex", key) + if expiration > 0 { + if usePrecise(expiration) { + args = append(args, "px", formatMs(ctx, expiration)) + } else { + args = append(args, "ex", formatSec(ctx, expiration)) + } + } else if expiration == 0 { + args = append(args, "persist") + } + + cmd := NewStringCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// GetDel redis-server version >= 6.2.0. +func (c cmdable) GetDel(ctx context.Context, key string) *StringCmd { + cmd := NewStringCmd(ctx, "getdel", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Incr(ctx context.Context, key string) *IntCmd { + cmd := NewIntCmd(ctx, "incr", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) IncrBy(ctx context.Context, key string, value int64) *IntCmd { + cmd := NewIntCmd(ctx, "incrby", key, value) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd { + cmd := NewFloatCmd(ctx, "incrbyfloat", key, value) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) MGet(ctx context.Context, keys ...string) *SliceCmd { + args := make([]interface{}, 1+len(keys)) + args[0] = "mget" + for i, key := range keys { + args[1+i] = key + } + cmd := NewSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// MSet is like Set but accepts multiple values: +// - MSet("key1", "value1", "key2", "value2") +// - MSet([]string{"key1", "value1", "key2", "value2"}) +// - MSet(map[string]interface{}{"key1": "value1", "key2": "value2"}) +func (c cmdable) MSet(ctx context.Context, values ...interface{}) *StatusCmd { + args := make([]interface{}, 1, 1+len(values)) + args[0] = "mset" + args = appendArgs(args, values) + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// MSetNX is like SetNX but accepts multiple values: +// - MSetNX("key1", "value1", "key2", "value2") +// - MSetNX([]string{"key1", "value1", "key2", "value2"}) +// - MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"}) +func (c cmdable) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd { + args := make([]interface{}, 1, 1+len(values)) + args[0] = "msetnx" + args = appendArgs(args, values) + cmd := NewBoolCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// Set Redis `SET key value [expiration]` command. +// Use expiration for `SETEX`-like behavior. +// +// Zero expiration means the key has no expiration time. +// KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, +// otherwise you will receive an error: (error) ERR syntax error. +func (c cmdable) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd { + args := make([]interface{}, 3, 5) + args[0] = "set" + args[1] = key + args[2] = value + if expiration > 0 { + if usePrecise(expiration) { + args = append(args, "px", formatMs(ctx, expiration)) + } else { + args = append(args, "ex", formatSec(ctx, expiration)) + } + } else if expiration == KeepTTL { + args = append(args, "keepttl") + } + + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// SetArgs provides arguments for the SetArgs function. +type SetArgs struct { + // Mode can be `NX` or `XX` or empty. + Mode string + + // Zero `TTL` or `Expiration` means that the key has no expiration time. + TTL time.Duration + ExpireAt time.Time + + // When Get is true, the command returns the old value stored at key, or nil when key did not exist. + Get bool + + // KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, + // otherwise you will receive an error: (error) ERR syntax error. + KeepTTL bool +} + +// SetArgs supports all the options that the SET command supports. +// It is the alternative to the Set function when you want +// to have more control over the options. +func (c cmdable) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd { + args := []interface{}{"set", key, value} + + if a.KeepTTL { + args = append(args, "keepttl") + } + + if !a.ExpireAt.IsZero() { + args = append(args, "exat", a.ExpireAt.Unix()) + } + if a.TTL > 0 { + if usePrecise(a.TTL) { + args = append(args, "px", formatMs(ctx, a.TTL)) + } else { + args = append(args, "ex", formatSec(ctx, a.TTL)) + } + } + + if a.Mode != "" { + args = append(args, a.Mode) + } + + if a.Get { + args = append(args, "get") + } + + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// SetEX Redis `SETEX key expiration value` command. +func (c cmdable) SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd { + cmd := NewStatusCmd(ctx, "setex", key, formatSec(ctx, expiration), value) + _ = c(ctx, cmd) + return cmd +} + +// SetNX Redis `SET key value [expiration] NX` command. +// +// Zero expiration means the key has no expiration time. +// KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, +// otherwise you will receive an error: (error) ERR syntax error. +func (c cmdable) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd { + var cmd *BoolCmd + switch expiration { + case 0: + // Use old `SETNX` to support old Redis versions. + cmd = NewBoolCmd(ctx, "setnx", key, value) + case KeepTTL: + cmd = NewBoolCmd(ctx, "set", key, value, "keepttl", "nx") + default: + if usePrecise(expiration) { + cmd = NewBoolCmd(ctx, "set", key, value, "px", formatMs(ctx, expiration), "nx") + } else { + cmd = NewBoolCmd(ctx, "set", key, value, "ex", formatSec(ctx, expiration), "nx") + } + } + + _ = c(ctx, cmd) + return cmd +} + +// SetXX Redis `SET key value [expiration] XX` command. +// +// Zero expiration means the key has no expiration time. +// KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, +// otherwise you will receive an error: (error) ERR syntax error. +func (c cmdable) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd { + var cmd *BoolCmd + switch expiration { + case 0: + cmd = NewBoolCmd(ctx, "set", key, value, "xx") + case KeepTTL: + cmd = NewBoolCmd(ctx, "set", key, value, "keepttl", "xx") + default: + if usePrecise(expiration) { + cmd = NewBoolCmd(ctx, "set", key, value, "px", formatMs(ctx, expiration), "xx") + } else { + cmd = NewBoolCmd(ctx, "set", key, value, "ex", formatSec(ctx, expiration), "xx") + } + } + + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd { + cmd := NewIntCmd(ctx, "setrange", key, offset, value) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) StrLen(ctx context.Context, key string) *IntCmd { + cmd := NewIntCmd(ctx, "strlen", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd { + args := []interface{}{"copy", sourceKey, destKey, "DB", db} + if replace { + args = append(args, "REPLACE") + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +//------------------------------------------------------------------------------ + +func (c cmdable) GetBit(ctx context.Context, key string, offset int64) *IntCmd { + cmd := NewIntCmd(ctx, "getbit", key, offset) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd { + cmd := NewIntCmd( + ctx, + "setbit", + key, + offset, + value, + ) + _ = c(ctx, cmd) + return cmd +} + +type BitCount struct { + Start, End int64 +} + +func (c cmdable) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd { + args := []interface{}{"bitcount", key} + if bitCount != nil { + args = append( + args, + bitCount.Start, + bitCount.End, + ) + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) bitOp(ctx context.Context, op, destKey string, keys ...string) *IntCmd { + args := make([]interface{}, 3+len(keys)) + args[0] = "bitop" + args[1] = op + args[2] = destKey + for i, key := range keys { + args[3+i] = key + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd { + return c.bitOp(ctx, "and", destKey, keys...) +} + +func (c cmdable) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd { + return c.bitOp(ctx, "or", destKey, keys...) +} + +func (c cmdable) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd { + return c.bitOp(ctx, "xor", destKey, keys...) +} + +func (c cmdable) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd { + return c.bitOp(ctx, "not", destKey, key) +} + +func (c cmdable) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd { + args := make([]interface{}, 3+len(pos)) + args[0] = "bitpos" + args[1] = key + args[2] = bit + switch len(pos) { + case 0: + case 1: + args[3] = pos[0] + case 2: + args[3] = pos[0] + args[4] = pos[1] + default: + panic("too many arguments") + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd { + a := make([]interface{}, 0, 2+len(args)) + a = append(a, "bitfield") + a = append(a, key) + a = append(a, args...) + cmd := NewIntSliceCmd(ctx, a...) + _ = c(ctx, cmd) + return cmd +} + +//------------------------------------------------------------------------------ + +func (c cmdable) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd { + args := []interface{}{"scan", cursor} + if match != "" { + args = append(args, "match", match) + } + if count > 0 { + args = append(args, "count", count) + } + cmd := NewScanCmd(ctx, c, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd { + args := []interface{}{"scan", cursor} + if match != "" { + args = append(args, "match", match) + } + if count > 0 { + args = append(args, "count", count) + } + if keyType != "" { + args = append(args, "type", keyType) + } + cmd := NewScanCmd(ctx, c, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd { + args := []interface{}{"sscan", key, cursor} + if match != "" { + args = append(args, "match", match) + } + if count > 0 { + args = append(args, "count", count) + } + cmd := NewScanCmd(ctx, c, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd { + args := []interface{}{"hscan", key, cursor} + if match != "" { + args = append(args, "match", match) + } + if count > 0 { + args = append(args, "count", count) + } + cmd := NewScanCmd(ctx, c, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd { + args := []interface{}{"zscan", key, cursor} + if match != "" { + args = append(args, "match", match) + } + if count > 0 { + args = append(args, "count", count) + } + cmd := NewScanCmd(ctx, c, args...) + _ = c(ctx, cmd) + return cmd +} + +//------------------------------------------------------------------------------ + +func (c cmdable) HDel(ctx context.Context, key string, fields ...string) *IntCmd { + args := make([]interface{}, 2+len(fields)) + args[0] = "hdel" + args[1] = key + for i, field := range fields { + args[2+i] = field + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) HExists(ctx context.Context, key, field string) *BoolCmd { + cmd := NewBoolCmd(ctx, "hexists", key, field) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) HGet(ctx context.Context, key, field string) *StringCmd { + cmd := NewStringCmd(ctx, "hget", key, field) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) HGetAll(ctx context.Context, key string) *StringStringMapCmd { + cmd := NewStringStringMapCmd(ctx, "hgetall", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd { + cmd := NewIntCmd(ctx, "hincrby", key, field, incr) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd { + cmd := NewFloatCmd(ctx, "hincrbyfloat", key, field, incr) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) HKeys(ctx context.Context, key string) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "hkeys", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) HLen(ctx context.Context, key string) *IntCmd { + cmd := NewIntCmd(ctx, "hlen", key) + _ = c(ctx, cmd) + return cmd +} + +// HMGet returns the values for the specified fields in the hash stored at key. +// It returns an interface{} to distinguish between empty string and nil value. +func (c cmdable) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd { + args := make([]interface{}, 2+len(fields)) + args[0] = "hmget" + args[1] = key + for i, field := range fields { + args[2+i] = field + } + cmd := NewSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// HSet accepts values in following formats: +// - HSet("myhash", "key1", "value1", "key2", "value2") +// - HSet("myhash", []string{"key1", "value1", "key2", "value2"}) +// - HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"}) +// +// Note that it requires Redis v4 for multiple field/value pairs support. +func (c cmdable) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd { + args := make([]interface{}, 2, 2+len(values)) + args[0] = "hset" + args[1] = key + args = appendArgs(args, values) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// HMSet is a deprecated version of HSet left for compatibility with Redis 3. +func (c cmdable) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd { + args := make([]interface{}, 2, 2+len(values)) + args[0] = "hmset" + args[1] = key + args = appendArgs(args, values) + cmd := NewBoolCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd { + cmd := NewBoolCmd(ctx, "hsetnx", key, field, value) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) HVals(ctx context.Context, key string) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "hvals", key) + _ = c(ctx, cmd) + return cmd +} + +// HRandField redis-server version >= 6.2.0. +func (c cmdable) HRandField(ctx context.Context, key string, count int, withValues bool) *StringSliceCmd { + args := make([]interface{}, 0, 4) + + // Although count=0 is meaningless, redis accepts count=0. + args = append(args, "hrandfield", key, count) + if withValues { + args = append(args, "withvalues") + } + + cmd := NewStringSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +//------------------------------------------------------------------------------ + +func (c cmdable) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd { + args := make([]interface{}, 1+len(keys)+1) + args[0] = "blpop" + for i, key := range keys { + args[1+i] = key + } + args[len(args)-1] = formatSec(ctx, timeout) + cmd := NewStringSliceCmd(ctx, args...) + cmd.setReadTimeout(timeout) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd { + args := make([]interface{}, 1+len(keys)+1) + args[0] = "brpop" + for i, key := range keys { + args[1+i] = key + } + args[len(keys)+1] = formatSec(ctx, timeout) + cmd := NewStringSliceCmd(ctx, args...) + cmd.setReadTimeout(timeout) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd { + cmd := NewStringCmd( + ctx, + "brpoplpush", + source, + destination, + formatSec(ctx, timeout), + ) + cmd.setReadTimeout(timeout) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LIndex(ctx context.Context, key string, index int64) *StringCmd { + cmd := NewStringCmd(ctx, "lindex", key, index) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd { + cmd := NewIntCmd(ctx, "linsert", key, op, pivot, value) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd { + cmd := NewIntCmd(ctx, "linsert", key, "before", pivot, value) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd { + cmd := NewIntCmd(ctx, "linsert", key, "after", pivot, value) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LLen(ctx context.Context, key string) *IntCmd { + cmd := NewIntCmd(ctx, "llen", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LPop(ctx context.Context, key string) *StringCmd { + cmd := NewStringCmd(ctx, "lpop", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "lpop", key, count) + _ = c(ctx, cmd) + return cmd +} + +type LPosArgs struct { + Rank, MaxLen int64 +} + +func (c cmdable) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd { + args := []interface{}{"lpos", key, value} + if a.Rank != 0 { + args = append(args, "rank", a.Rank) + } + if a.MaxLen != 0 { + args = append(args, "maxlen", a.MaxLen) + } + + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd { + args := []interface{}{"lpos", key, value, "count", count} + if a.Rank != 0 { + args = append(args, "rank", a.Rank) + } + if a.MaxLen != 0 { + args = append(args, "maxlen", a.MaxLen) + } + cmd := NewIntSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd { + args := make([]interface{}, 2, 2+len(values)) + args[0] = "lpush" + args[1] = key + args = appendArgs(args, values) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd { + args := make([]interface{}, 2, 2+len(values)) + args[0] = "lpushx" + args[1] = key + args = appendArgs(args, values) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd { + cmd := NewStringSliceCmd( + ctx, + "lrange", + key, + start, + stop, + ) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd { + cmd := NewIntCmd(ctx, "lrem", key, count, value) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd { + cmd := NewStatusCmd(ctx, "lset", key, index, value) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd { + cmd := NewStatusCmd( + ctx, + "ltrim", + key, + start, + stop, + ) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) RPop(ctx context.Context, key string) *StringCmd { + cmd := NewStringCmd(ctx, "rpop", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "rpop", key, count) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) RPopLPush(ctx context.Context, source, destination string) *StringCmd { + cmd := NewStringCmd(ctx, "rpoplpush", source, destination) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd { + args := make([]interface{}, 2, 2+len(values)) + args[0] = "rpush" + args[1] = key + args = appendArgs(args, values) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd { + args := make([]interface{}, 2, 2+len(values)) + args[0] = "rpushx" + args[1] = key + args = appendArgs(args, values) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd { + cmd := NewStringCmd(ctx, "lmove", source, destination, srcpos, destpos) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) BLMove( + ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration, +) *StringCmd { + cmd := NewStringCmd(ctx, "blmove", source, destination, srcpos, destpos, formatSec(ctx, timeout)) + cmd.setReadTimeout(timeout) + _ = c(ctx, cmd) + return cmd +} + +//------------------------------------------------------------------------------ + +func (c cmdable) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd { + args := make([]interface{}, 2, 2+len(members)) + args[0] = "sadd" + args[1] = key + args = appendArgs(args, members) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SCard(ctx context.Context, key string) *IntCmd { + cmd := NewIntCmd(ctx, "scard", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SDiff(ctx context.Context, keys ...string) *StringSliceCmd { + args := make([]interface{}, 1+len(keys)) + args[0] = "sdiff" + for i, key := range keys { + args[1+i] = key + } + cmd := NewStringSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd { + args := make([]interface{}, 2+len(keys)) + args[0] = "sdiffstore" + args[1] = destination + for i, key := range keys { + args[2+i] = key + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SInter(ctx context.Context, keys ...string) *StringSliceCmd { + args := make([]interface{}, 1+len(keys)) + args[0] = "sinter" + for i, key := range keys { + args[1+i] = key + } + cmd := NewStringSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd { + args := make([]interface{}, 2+len(keys)) + args[0] = "sinterstore" + args[1] = destination + for i, key := range keys { + args[2+i] = key + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd { + cmd := NewBoolCmd(ctx, "sismember", key, member) + _ = c(ctx, cmd) + return cmd +} + +// SMIsMember Redis `SMISMEMBER key member [member ...]` command. +func (c cmdable) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd { + args := make([]interface{}, 2, 2+len(members)) + args[0] = "smismember" + args[1] = key + args = appendArgs(args, members) + cmd := NewBoolSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// SMembers Redis `SMEMBERS key` command output as a slice. +func (c cmdable) SMembers(ctx context.Context, key string) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "smembers", key) + _ = c(ctx, cmd) + return cmd +} + +// SMembersMap Redis `SMEMBERS key` command output as a map. +func (c cmdable) SMembersMap(ctx context.Context, key string) *StringStructMapCmd { + cmd := NewStringStructMapCmd(ctx, "smembers", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd { + cmd := NewBoolCmd(ctx, "smove", source, destination, member) + _ = c(ctx, cmd) + return cmd +} + +// SPop Redis `SPOP key` command. +func (c cmdable) SPop(ctx context.Context, key string) *StringCmd { + cmd := NewStringCmd(ctx, "spop", key) + _ = c(ctx, cmd) + return cmd +} + +// SPopN Redis `SPOP key count` command. +func (c cmdable) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "spop", key, count) + _ = c(ctx, cmd) + return cmd +} + +// SRandMember Redis `SRANDMEMBER key` command. +func (c cmdable) SRandMember(ctx context.Context, key string) *StringCmd { + cmd := NewStringCmd(ctx, "srandmember", key) + _ = c(ctx, cmd) + return cmd +} + +// SRandMemberN Redis `SRANDMEMBER key count` command. +func (c cmdable) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "srandmember", key, count) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd { + args := make([]interface{}, 2, 2+len(members)) + args[0] = "srem" + args[1] = key + args = appendArgs(args, members) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SUnion(ctx context.Context, keys ...string) *StringSliceCmd { + args := make([]interface{}, 1+len(keys)) + args[0] = "sunion" + for i, key := range keys { + args[1+i] = key + } + cmd := NewStringSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd { + args := make([]interface{}, 2+len(keys)) + args[0] = "sunionstore" + args[1] = destination + for i, key := range keys { + args[2+i] = key + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +//------------------------------------------------------------------------------ + +// XAddArgs accepts values in the following formats: +// - XAddArgs.Values = []interface{}{"key1", "value1", "key2", "value2"} +// - XAddArgs.Values = []string("key1", "value1", "key2", "value2") +// - XAddArgs.Values = map[string]interface{}{"key1": "value1", "key2": "value2"} +// +// Note that map will not preserve the order of key-value pairs. +// MaxLen/MaxLenApprox and MinID are in conflict, only one of them can be used. +type XAddArgs struct { + Stream string + NoMkStream bool + MaxLen int64 // MAXLEN N + + // Deprecated: use MaxLen+Approx, remove in v9. + MaxLenApprox int64 // MAXLEN ~ N + + MinID string + // Approx causes MaxLen and MinID to use "~" matcher (instead of "="). + Approx bool + Limit int64 + ID string + Values interface{} +} + +// XAdd a.Limit has a bug, please confirm it and use it. +// issue: https://github.com/redis/redis/issues/9046 +func (c cmdable) XAdd(ctx context.Context, a *XAddArgs) *StringCmd { + args := make([]interface{}, 0, 11) + args = append(args, "xadd", a.Stream) + if a.NoMkStream { + args = append(args, "nomkstream") + } + switch { + case a.MaxLen > 0: + if a.Approx { + args = append(args, "maxlen", "~", a.MaxLen) + } else { + args = append(args, "maxlen", a.MaxLen) + } + case a.MaxLenApprox > 0: + // TODO remove in v9. + args = append(args, "maxlen", "~", a.MaxLenApprox) + case a.MinID != "": + if a.Approx { + args = append(args, "minid", "~", a.MinID) + } else { + args = append(args, "minid", a.MinID) + } + } + if a.Limit > 0 { + args = append(args, "limit", a.Limit) + } + if a.ID != "" { + args = append(args, a.ID) + } else { + args = append(args, "*") + } + args = appendArg(args, a.Values) + + cmd := NewStringCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XDel(ctx context.Context, stream string, ids ...string) *IntCmd { + args := []interface{}{"xdel", stream} + for _, id := range ids { + args = append(args, id) + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XLen(ctx context.Context, stream string) *IntCmd { + cmd := NewIntCmd(ctx, "xlen", stream) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd { + cmd := NewXMessageSliceCmd(ctx, "xrange", stream, start, stop) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd { + cmd := NewXMessageSliceCmd(ctx, "xrange", stream, start, stop, "count", count) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd { + cmd := NewXMessageSliceCmd(ctx, "xrevrange", stream, start, stop) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd { + cmd := NewXMessageSliceCmd(ctx, "xrevrange", stream, start, stop, "count", count) + _ = c(ctx, cmd) + return cmd +} + +type XReadArgs struct { + Streams []string // list of streams and ids, e.g. stream1 stream2 id1 id2 + Count int64 + Block time.Duration +} + +func (c cmdable) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd { + args := make([]interface{}, 0, 6+len(a.Streams)) + args = append(args, "xread") + + keyPos := int8(1) + if a.Count > 0 { + args = append(args, "count") + args = append(args, a.Count) + keyPos += 2 + } + if a.Block >= 0 { + args = append(args, "block") + args = append(args, int64(a.Block/time.Millisecond)) + keyPos += 2 + } + args = append(args, "streams") + keyPos++ + for _, s := range a.Streams { + args = append(args, s) + } + + cmd := NewXStreamSliceCmd(ctx, args...) + if a.Block >= 0 { + cmd.setReadTimeout(a.Block) + } + cmd.SetFirstKeyPos(keyPos) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd { + return c.XRead(ctx, &XReadArgs{ + Streams: streams, + Block: -1, + }) +} + +func (c cmdable) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd { + cmd := NewStatusCmd(ctx, "xgroup", "create", stream, group, start) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd { + cmd := NewStatusCmd(ctx, "xgroup", "create", stream, group, start, "mkstream") + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd { + cmd := NewStatusCmd(ctx, "xgroup", "setid", stream, group, start) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd { + cmd := NewIntCmd(ctx, "xgroup", "destroy", stream, group) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd { + cmd := NewIntCmd(ctx, "xgroup", "createconsumer", stream, group, consumer) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd { + cmd := NewIntCmd(ctx, "xgroup", "delconsumer", stream, group, consumer) + _ = c(ctx, cmd) + return cmd +} + +type XReadGroupArgs struct { + Group string + Consumer string + Streams []string // list of streams and ids, e.g. stream1 stream2 id1 id2 + Count int64 + Block time.Duration + NoAck bool +} + +func (c cmdable) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd { + args := make([]interface{}, 0, 10+len(a.Streams)) + args = append(args, "xreadgroup", "group", a.Group, a.Consumer) + + keyPos := int8(4) + if a.Count > 0 { + args = append(args, "count", a.Count) + keyPos += 2 + } + if a.Block >= 0 { + args = append(args, "block", int64(a.Block/time.Millisecond)) + keyPos += 2 + } + if a.NoAck { + args = append(args, "noack") + keyPos++ + } + args = append(args, "streams") + keyPos++ + for _, s := range a.Streams { + args = append(args, s) + } + + cmd := NewXStreamSliceCmd(ctx, args...) + if a.Block >= 0 { + cmd.setReadTimeout(a.Block) + } + cmd.SetFirstKeyPos(keyPos) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd { + args := []interface{}{"xack", stream, group} + for _, id := range ids { + args = append(args, id) + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XPending(ctx context.Context, stream, group string) *XPendingCmd { + cmd := NewXPendingCmd(ctx, "xpending", stream, group) + _ = c(ctx, cmd) + return cmd +} + +type XPendingExtArgs struct { + Stream string + Group string + Idle time.Duration + Start string + End string + Count int64 + Consumer string +} + +func (c cmdable) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd { + args := make([]interface{}, 0, 9) + args = append(args, "xpending", a.Stream, a.Group) + if a.Idle != 0 { + args = append(args, "idle", formatMs(ctx, a.Idle)) + } + args = append(args, a.Start, a.End, a.Count) + if a.Consumer != "" { + args = append(args, a.Consumer) + } + cmd := NewXPendingExtCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +type XAutoClaimArgs struct { + Stream string + Group string + MinIdle time.Duration + Start string + Count int64 + Consumer string +} + +func (c cmdable) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd { + args := xAutoClaimArgs(ctx, a) + cmd := NewXAutoClaimCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd { + args := xAutoClaimArgs(ctx, a) + args = append(args, "justid") + cmd := NewXAutoClaimJustIDCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func xAutoClaimArgs(ctx context.Context, a *XAutoClaimArgs) []interface{} { + args := make([]interface{}, 0, 8) + args = append(args, "xautoclaim", a.Stream, a.Group, a.Consumer, formatMs(ctx, a.MinIdle), a.Start) + if a.Count > 0 { + args = append(args, "count", a.Count) + } + return args +} + +type XClaimArgs struct { + Stream string + Group string + Consumer string + MinIdle time.Duration + Messages []string +} + +func (c cmdable) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd { + args := xClaimArgs(a) + cmd := NewXMessageSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd { + args := xClaimArgs(a) + args = append(args, "justid") + cmd := NewStringSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func xClaimArgs(a *XClaimArgs) []interface{} { + args := make([]interface{}, 0, 5+len(a.Messages)) + args = append(args, + "xclaim", + a.Stream, + a.Group, a.Consumer, + int64(a.MinIdle/time.Millisecond)) + for _, id := range a.Messages { + args = append(args, id) + } + return args +} + +// xTrim If approx is true, add the "~" parameter, otherwise it is the default "=" (redis default). +// example: +// XTRIM key MAXLEN/MINID threshold LIMIT limit. +// XTRIM key MAXLEN/MINID ~ threshold LIMIT limit. +// The redis-server version is lower than 6.2, please set limit to 0. +func (c cmdable) xTrim( + ctx context.Context, key, strategy string, + approx bool, threshold interface{}, limit int64, +) *IntCmd { + args := make([]interface{}, 0, 7) + args = append(args, "xtrim", key, strategy) + if approx { + args = append(args, "~") + } + args = append(args, threshold) + if limit > 0 { + args = append(args, "limit", limit) + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// Deprecated: use XTrimMaxLen, remove in v9. +func (c cmdable) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd { + return c.xTrim(ctx, key, "maxlen", false, maxLen, 0) +} + +// Deprecated: use XTrimMaxLenApprox, remove in v9. +func (c cmdable) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd { + return c.xTrim(ctx, key, "maxlen", true, maxLen, 0) +} + +// XTrimMaxLen No `~` rules are used, `limit` cannot be used. +// cmd: XTRIM key MAXLEN maxLen +func (c cmdable) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd { + return c.xTrim(ctx, key, "maxlen", false, maxLen, 0) +} + +// XTrimMaxLenApprox LIMIT has a bug, please confirm it and use it. +// issue: https://github.com/redis/redis/issues/9046 +// cmd: XTRIM key MAXLEN ~ maxLen LIMIT limit +func (c cmdable) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd { + return c.xTrim(ctx, key, "maxlen", true, maxLen, limit) +} + +// XTrimMinID No `~` rules are used, `limit` cannot be used. +// cmd: XTRIM key MINID minID +func (c cmdable) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd { + return c.xTrim(ctx, key, "minid", false, minID, 0) +} + +// XTrimMinIDApprox LIMIT has a bug, please confirm it and use it. +// issue: https://github.com/redis/redis/issues/9046 +// cmd: XTRIM key MINID ~ minID LIMIT limit +func (c cmdable) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd { + return c.xTrim(ctx, key, "minid", true, minID, limit) +} + +func (c cmdable) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd { + cmd := NewXInfoConsumersCmd(ctx, key, group) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd { + cmd := NewXInfoGroupsCmd(ctx, key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd { + cmd := NewXInfoStreamCmd(ctx, key) + _ = c(ctx, cmd) + return cmd +} + +// XInfoStreamFull XINFO STREAM FULL [COUNT count] +// redis-server >= 6.0. +func (c cmdable) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd { + args := make([]interface{}, 0, 6) + args = append(args, "xinfo", "stream", key, "full") + if count > 0 { + args = append(args, "count", count) + } + cmd := NewXInfoStreamFullCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +//------------------------------------------------------------------------------ + +// Z represents sorted set member. +type Z struct { + Score float64 + Member interface{} +} + +// ZWithKey represents sorted set member including the name of the key where it was popped. +type ZWithKey struct { + Z + Key string +} + +// ZStore is used as an arg to ZInter/ZInterStore and ZUnion/ZUnionStore. +type ZStore struct { + Keys []string + Weights []float64 + // Can be SUM, MIN or MAX. + Aggregate string +} + +func (z ZStore) len() (n int) { + n = len(z.Keys) + if len(z.Weights) > 0 { + n += 1 + len(z.Weights) + } + if z.Aggregate != "" { + n += 2 + } + return n +} + +func (z ZStore) appendArgs(args []interface{}) []interface{} { + for _, key := range z.Keys { + args = append(args, key) + } + if len(z.Weights) > 0 { + args = append(args, "weights") + for _, weights := range z.Weights { + args = append(args, weights) + } + } + if z.Aggregate != "" { + args = append(args, "aggregate", z.Aggregate) + } + return args +} + +// BZPopMax Redis `BZPOPMAX key [key ...] timeout` command. +func (c cmdable) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd { + args := make([]interface{}, 1+len(keys)+1) + args[0] = "bzpopmax" + for i, key := range keys { + args[1+i] = key + } + args[len(args)-1] = formatSec(ctx, timeout) + cmd := NewZWithKeyCmd(ctx, args...) + cmd.setReadTimeout(timeout) + _ = c(ctx, cmd) + return cmd +} + +// BZPopMin Redis `BZPOPMIN key [key ...] timeout` command. +func (c cmdable) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd { + args := make([]interface{}, 1+len(keys)+1) + args[0] = "bzpopmin" + for i, key := range keys { + args[1+i] = key + } + args[len(args)-1] = formatSec(ctx, timeout) + cmd := NewZWithKeyCmd(ctx, args...) + cmd.setReadTimeout(timeout) + _ = c(ctx, cmd) + return cmd +} + +// ZAddArgs WARN: The GT, LT and NX options are mutually exclusive. +type ZAddArgs struct { + NX bool + XX bool + LT bool + GT bool + Ch bool + Members []Z +} + +func (c cmdable) zAddArgs(key string, args ZAddArgs, incr bool) []interface{} { + a := make([]interface{}, 0, 6+2*len(args.Members)) + a = append(a, "zadd", key) + + // The GT, LT and NX options are mutually exclusive. + if args.NX { + a = append(a, "nx") + } else { + if args.XX { + a = append(a, "xx") + } + if args.GT { + a = append(a, "gt") + } else if args.LT { + a = append(a, "lt") + } + } + if args.Ch { + a = append(a, "ch") + } + if incr { + a = append(a, "incr") + } + for _, m := range args.Members { + a = append(a, m.Score) + a = append(a, m.Member) + } + return a +} + +func (c cmdable) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd { + cmd := NewIntCmd(ctx, c.zAddArgs(key, args, false)...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd { + cmd := NewFloatCmd(ctx, c.zAddArgs(key, args, true)...) + _ = c(ctx, cmd) + return cmd +} + +// TODO: Compatible with v8 api, will be removed in v9. +func (c cmdable) zAdd(ctx context.Context, key string, args ZAddArgs, members ...*Z) *IntCmd { + args.Members = make([]Z, len(members)) + for i, m := range members { + args.Members[i] = *m + } + cmd := NewIntCmd(ctx, c.zAddArgs(key, args, false)...) + _ = c(ctx, cmd) + return cmd +} + +// ZAdd Redis `ZADD key score member [score member ...]` command. +func (c cmdable) ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd { + return c.zAdd(ctx, key, ZAddArgs{}, members...) +} + +// ZAddNX Redis `ZADD key NX score member [score member ...]` command. +func (c cmdable) ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd { + return c.zAdd(ctx, key, ZAddArgs{ + NX: true, + }, members...) +} + +// ZAddXX Redis `ZADD key XX score member [score member ...]` command. +func (c cmdable) ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd { + return c.zAdd(ctx, key, ZAddArgs{ + XX: true, + }, members...) +} + +// ZAddCh Redis `ZADD key CH score member [score member ...]` command. +// Deprecated: Use +// client.ZAddArgs(ctx, ZAddArgs{ +// Ch: true, +// Members: []Z, +// }) +// remove in v9. +func (c cmdable) ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd { + return c.zAdd(ctx, key, ZAddArgs{ + Ch: true, + }, members...) +} + +// ZAddNXCh Redis `ZADD key NX CH score member [score member ...]` command. +// Deprecated: Use +// client.ZAddArgs(ctx, ZAddArgs{ +// NX: true, +// Ch: true, +// Members: []Z, +// }) +// remove in v9. +func (c cmdable) ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd { + return c.zAdd(ctx, key, ZAddArgs{ + NX: true, + Ch: true, + }, members...) +} + +// ZAddXXCh Redis `ZADD key XX CH score member [score member ...]` command. +// Deprecated: Use +// client.ZAddArgs(ctx, ZAddArgs{ +// XX: true, +// Ch: true, +// Members: []Z, +// }) +// remove in v9. +func (c cmdable) ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd { + return c.zAdd(ctx, key, ZAddArgs{ + XX: true, + Ch: true, + }, members...) +} + +// ZIncr Redis `ZADD key INCR score member` command. +// Deprecated: Use +// client.ZAddArgsIncr(ctx, ZAddArgs{ +// Members: []Z, +// }) +// remove in v9. +func (c cmdable) ZIncr(ctx context.Context, key string, member *Z) *FloatCmd { + return c.ZAddArgsIncr(ctx, key, ZAddArgs{ + Members: []Z{*member}, + }) +} + +// ZIncrNX Redis `ZADD key NX INCR score member` command. +// Deprecated: Use +// client.ZAddArgsIncr(ctx, ZAddArgs{ +// NX: true, +// Members: []Z, +// }) +// remove in v9. +func (c cmdable) ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd { + return c.ZAddArgsIncr(ctx, key, ZAddArgs{ + NX: true, + Members: []Z{*member}, + }) +} + +// ZIncrXX Redis `ZADD key XX INCR score member` command. +// Deprecated: Use +// client.ZAddArgsIncr(ctx, ZAddArgs{ +// XX: true, +// Members: []Z, +// }) +// remove in v9. +func (c cmdable) ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd { + return c.ZAddArgsIncr(ctx, key, ZAddArgs{ + XX: true, + Members: []Z{*member}, + }) +} + +func (c cmdable) ZCard(ctx context.Context, key string) *IntCmd { + cmd := NewIntCmd(ctx, "zcard", key) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZCount(ctx context.Context, key, min, max string) *IntCmd { + cmd := NewIntCmd(ctx, "zcount", key, min, max) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZLexCount(ctx context.Context, key, min, max string) *IntCmd { + cmd := NewIntCmd(ctx, "zlexcount", key, min, max) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd { + cmd := NewFloatCmd(ctx, "zincrby", key, increment, member) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd { + args := make([]interface{}, 0, 3+store.len()) + args = append(args, "zinterstore", destination, len(store.Keys)) + args = store.appendArgs(args) + cmd := NewIntCmd(ctx, args...) + cmd.SetFirstKeyPos(3) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd { + args := make([]interface{}, 0, 2+store.len()) + args = append(args, "zinter", len(store.Keys)) + args = store.appendArgs(args) + cmd := NewStringSliceCmd(ctx, args...) + cmd.SetFirstKeyPos(2) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd { + args := make([]interface{}, 0, 3+store.len()) + args = append(args, "zinter", len(store.Keys)) + args = store.appendArgs(args) + args = append(args, "withscores") + cmd := NewZSliceCmd(ctx, args...) + cmd.SetFirstKeyPos(2) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd { + args := make([]interface{}, 2+len(members)) + args[0] = "zmscore" + args[1] = key + for i, member := range members { + args[2+i] = member + } + cmd := NewFloatSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd { + args := []interface{}{ + "zpopmax", + key, + } + + switch len(count) { + case 0: + break + case 1: + args = append(args, count[0]) + default: + panic("too many arguments") + } + + cmd := NewZSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd { + args := []interface{}{ + "zpopmin", + key, + } + + switch len(count) { + case 0: + break + case 1: + args = append(args, count[0]) + default: + panic("too many arguments") + } + + cmd := NewZSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// ZRangeArgs is all the options of the ZRange command. +// In version> 6.2.0, you can replace the(cmd): +// ZREVRANGE, +// ZRANGEBYSCORE, +// ZREVRANGEBYSCORE, +// ZRANGEBYLEX, +// ZREVRANGEBYLEX. +// Please pay attention to your redis-server version. +// +// Rev, ByScore, ByLex and Offset+Count options require redis-server 6.2.0 and higher. +type ZRangeArgs struct { + Key string + + // When the ByScore option is provided, the open interval(exclusive) can be set. + // By default, the score intervals specified by and are closed (inclusive). + // It is similar to the deprecated(6.2.0+) ZRangeByScore command. + // For example: + // ZRangeArgs{ + // Key: "example-key", + // Start: "(3", + // Stop: 8, + // ByScore: true, + // } + // cmd: "ZRange example-key (3 8 ByScore" (3 < score <= 8). + // + // For the ByLex option, it is similar to the deprecated(6.2.0+) ZRangeByLex command. + // You can set the and options as follows: + // ZRangeArgs{ + // Key: "example-key", + // Start: "[abc", + // Stop: "(def", + // ByLex: true, + // } + // cmd: "ZRange example-key [abc (def ByLex" + // + // For normal cases (ByScore==false && ByLex==false), and should be set to the index range (int). + // You can read the documentation for more information: https://redis.io/commands/zrange + Start interface{} + Stop interface{} + + // The ByScore and ByLex options are mutually exclusive. + ByScore bool + ByLex bool + + Rev bool + + // limit offset count. + Offset int64 + Count int64 +} + +func (z ZRangeArgs) appendArgs(args []interface{}) []interface{} { + // For Rev+ByScore/ByLex, we need to adjust the position of and . + if z.Rev && (z.ByScore || z.ByLex) { + args = append(args, z.Key, z.Stop, z.Start) + } else { + args = append(args, z.Key, z.Start, z.Stop) + } + + if z.ByScore { + args = append(args, "byscore") + } else if z.ByLex { + args = append(args, "bylex") + } + if z.Rev { + args = append(args, "rev") + } + if z.Offset != 0 || z.Count != 0 { + args = append(args, "limit", z.Offset, z.Count) + } + return args +} + +func (c cmdable) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd { + args := make([]interface{}, 0, 9) + args = append(args, "zrange") + args = z.appendArgs(args) + cmd := NewStringSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd { + args := make([]interface{}, 0, 10) + args = append(args, "zrange") + args = z.appendArgs(args) + args = append(args, "withscores") + cmd := NewZSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd { + return c.ZRangeArgs(ctx, ZRangeArgs{ + Key: key, + Start: start, + Stop: stop, + }) +} + +func (c cmdable) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd { + return c.ZRangeArgsWithScores(ctx, ZRangeArgs{ + Key: key, + Start: start, + Stop: stop, + }) +} + +type ZRangeBy struct { + Min, Max string + Offset, Count int64 +} + +func (c cmdable) zRangeBy(ctx context.Context, zcmd, key string, opt *ZRangeBy, withScores bool) *StringSliceCmd { + args := []interface{}{zcmd, key, opt.Min, opt.Max} + if withScores { + args = append(args, "withscores") + } + if opt.Offset != 0 || opt.Count != 0 { + args = append( + args, + "limit", + opt.Offset, + opt.Count, + ) + } + cmd := NewStringSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd { + return c.zRangeBy(ctx, "zrangebyscore", key, opt, false) +} + +func (c cmdable) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd { + return c.zRangeBy(ctx, "zrangebylex", key, opt, false) +} + +func (c cmdable) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd { + args := []interface{}{"zrangebyscore", key, opt.Min, opt.Max, "withscores"} + if opt.Offset != 0 || opt.Count != 0 { + args = append( + args, + "limit", + opt.Offset, + opt.Count, + ) + } + cmd := NewZSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd { + args := make([]interface{}, 0, 10) + args = append(args, "zrangestore", dst) + args = z.appendArgs(args) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRank(ctx context.Context, key, member string) *IntCmd { + cmd := NewIntCmd(ctx, "zrank", key, member) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd { + args := make([]interface{}, 2, 2+len(members)) + args[0] = "zrem" + args[1] = key + args = appendArgs(args, members) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd { + cmd := NewIntCmd( + ctx, + "zremrangebyrank", + key, + start, + stop, + ) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd { + cmd := NewIntCmd(ctx, "zremrangebyscore", key, min, max) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd { + cmd := NewIntCmd(ctx, "zremrangebylex", key, min, max) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "zrevrange", key, start, stop) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd { + cmd := NewZSliceCmd(ctx, "zrevrange", key, start, stop, "withscores") + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) zRevRangeBy(ctx context.Context, zcmd, key string, opt *ZRangeBy) *StringSliceCmd { + args := []interface{}{zcmd, key, opt.Max, opt.Min} + if opt.Offset != 0 || opt.Count != 0 { + args = append( + args, + "limit", + opt.Offset, + opt.Count, + ) + } + cmd := NewStringSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd { + return c.zRevRangeBy(ctx, "zrevrangebyscore", key, opt) +} + +func (c cmdable) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd { + return c.zRevRangeBy(ctx, "zrevrangebylex", key, opt) +} + +func (c cmdable) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd { + args := []interface{}{"zrevrangebyscore", key, opt.Max, opt.Min, "withscores"} + if opt.Offset != 0 || opt.Count != 0 { + args = append( + args, + "limit", + opt.Offset, + opt.Count, + ) + } + cmd := NewZSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZRevRank(ctx context.Context, key, member string) *IntCmd { + cmd := NewIntCmd(ctx, "zrevrank", key, member) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZScore(ctx context.Context, key, member string) *FloatCmd { + cmd := NewFloatCmd(ctx, "zscore", key, member) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd { + args := make([]interface{}, 0, 2+store.len()) + args = append(args, "zunion", len(store.Keys)) + args = store.appendArgs(args) + cmd := NewStringSliceCmd(ctx, args...) + cmd.SetFirstKeyPos(2) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd { + args := make([]interface{}, 0, 3+store.len()) + args = append(args, "zunion", len(store.Keys)) + args = store.appendArgs(args) + args = append(args, "withscores") + cmd := NewZSliceCmd(ctx, args...) + cmd.SetFirstKeyPos(2) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd { + args := make([]interface{}, 0, 3+store.len()) + args = append(args, "zunionstore", dest, len(store.Keys)) + args = store.appendArgs(args) + cmd := NewIntCmd(ctx, args...) + cmd.SetFirstKeyPos(3) + _ = c(ctx, cmd) + return cmd +} + +// ZRandMember redis-server version >= 6.2.0. +func (c cmdable) ZRandMember(ctx context.Context, key string, count int, withScores bool) *StringSliceCmd { + args := make([]interface{}, 0, 4) + + // Although count=0 is meaningless, redis accepts count=0. + args = append(args, "zrandmember", key, count) + if withScores { + args = append(args, "withscores") + } + + cmd := NewStringSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// ZDiff redis-server version >= 6.2.0. +func (c cmdable) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd { + args := make([]interface{}, 2+len(keys)) + args[0] = "zdiff" + args[1] = len(keys) + for i, key := range keys { + args[i+2] = key + } + + cmd := NewStringSliceCmd(ctx, args...) + cmd.SetFirstKeyPos(2) + _ = c(ctx, cmd) + return cmd +} + +// ZDiffWithScores redis-server version >= 6.2.0. +func (c cmdable) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd { + args := make([]interface{}, 3+len(keys)) + args[0] = "zdiff" + args[1] = len(keys) + for i, key := range keys { + args[i+2] = key + } + args[len(keys)+2] = "withscores" + + cmd := NewZSliceCmd(ctx, args...) + cmd.SetFirstKeyPos(2) + _ = c(ctx, cmd) + return cmd +} + +// ZDiffStore redis-server version >=6.2.0. +func (c cmdable) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd { + args := make([]interface{}, 0, 3+len(keys)) + args = append(args, "zdiffstore", destination, len(keys)) + for _, key := range keys { + args = append(args, key) + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +//------------------------------------------------------------------------------ + +func (c cmdable) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd { + args := make([]interface{}, 2, 2+len(els)) + args[0] = "pfadd" + args[1] = key + args = appendArgs(args, els) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) PFCount(ctx context.Context, keys ...string) *IntCmd { + args := make([]interface{}, 1+len(keys)) + args[0] = "pfcount" + for i, key := range keys { + args[1+i] = key + } + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd { + args := make([]interface{}, 2+len(keys)) + args[0] = "pfmerge" + args[1] = dest + for i, key := range keys { + args[2+i] = key + } + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +//------------------------------------------------------------------------------ + +func (c cmdable) BgRewriteAOF(ctx context.Context) *StatusCmd { + cmd := NewStatusCmd(ctx, "bgrewriteaof") + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) BgSave(ctx context.Context) *StatusCmd { + cmd := NewStatusCmd(ctx, "bgsave") + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ClientKill(ctx context.Context, ipPort string) *StatusCmd { + cmd := NewStatusCmd(ctx, "client", "kill", ipPort) + _ = c(ctx, cmd) + return cmd +} + +// ClientKillByFilter is new style syntax, while the ClientKill is old +// +// CLIENT KILL