From d4b6e97670869a1d777c0e361aebdb60457ab0ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A7=E9=A9=8A?= Date: Fri, 14 Nov 2025 22:40:56 +0800 Subject: [PATCH] feat: update mongo --- Makefile | 58 +++++- build/README.md | 172 ++++++++++++++++++ build/docker-compose-migrate.yml | 29 +++ ....txt => 2024110400000001_audo_id.down.txt} | 0 ...up.txt => 2024110400000001_audo_id.up.txt} | 0 .../mongo/2024110500000001_account.up.txt | 1 + .../mongo/2024110500000002_account_uid.up.txt | 1 + .../mongo/2024110500000003_user.up.txt | 1 + .../mongo/2025100900000001_permission.up.txt | 11 ++ .../mongo/2025100900000002_role.up.txt | 13 ++ .../2025100900000003_role_permission.up.txt | 9 + .../mongo/2025100900000004_user_role.up.txt | 13 ++ .../mongo/2025101200000001_roles.up.txt | 9 +- go.mod | 18 +- go.sum | 40 ++-- 15 files changed, 343 insertions(+), 32 deletions(-) create mode 100644 build/README.md create mode 100644 build/docker-compose-migrate.yml rename generate/database/mongo/{20240422112701_audo_id.down.txt => 2024110400000001_audo_id.down.txt} (100%) rename generate/database/mongo/{20240422112701_audo_id.up.txt => 2024110400000001_audo_id.up.txt} (100%) mode change 100755 => 100644 mode change 100755 => 100644 generate/database/mongo/2024110500000001_account.up.txt mode change 100755 => 100644 generate/database/mongo/2024110500000002_account_uid.up.txt mode change 100755 => 100644 generate/database/mongo/2024110500000003_user.up.txt diff --git a/Makefile b/Makefile index 4e97a0f..cc76e67 100644 --- a/Makefile +++ b/Makefile @@ -71,4 +71,60 @@ clean: ## 清理編譯文件 .PHONY: install install: ## 安裝依賴 go mod tidy - go mod download \ No newline at end of file + go mod download +# go install -tags 'mongodb' github.com/golang-migrate/migrate/v4/cmd/migrate@latest +# go get -u github.com/golang-migrate/migrate/v4/database/mongodb + + +# MongoDB Migration 環境變數(可覆寫) +MONGO_HOST ?= 127.0.0.1:27017 +MONGO_DB ?= digimon +MONGO_USER ?= root +MONGO_PASSWORD ?= example +MONGO_AUTH_DB ?= admin + + +.PHONY: migrate-up +migrate-up: ## 執行 MongoDB migration (up) - 使用 mongosh + Docker + @echo "=== 執行 MongoDB Migration (UP) ===" + @echo "MongoDB: $(MONGO_HOST)/$(MONGO_DB)" + docker-compose -f ./build/docker-compose-migrate.yml run --rm \ + -e MONGO_HOST=$(MONGO_HOST) \ + -e MONGO_DB=$(MONGO_DB) \ + -e MONGO_USER=$(MONGO_USER) \ + -e MONGO_PASSWORD=$(MONGO_PASSWORD) \ + -e MONGO_AUTH_DB=$(MONGO_AUTH_DB) \ + migrate + +.PHONY: migrate-down +migrate-down: ## 執行 MongoDB migration (down) - 使用 mongosh + Docker + @echo "=== 執行 MongoDB Migration (DOWN) ===" + @echo "MongoDB: $(MONGO_HOST)/$(MONGO_DB)" + docker-compose -f ./build/docker-compose-migrate.yml run --rm \ + -e MONGO_HOST=$(MONGO_HOST) \ + -e MONGO_DB=$(MONGO_DB) \ + -e MONGO_USER=$(MONGO_USER) \ + -e MONGO_PASSWORD=$(MONGO_PASSWORD) \ + -e MONGO_AUTH_DB=$(MONGO_AUTH_DB) \ + migrate sh -c " \ + if [ -z \"$$MONGO_USER\" ] || [ \"$$MONGO_USER\" = \"\" ]; then \ + MONGO_URI=\"mongodb://$$MONGO_HOST/$$MONGO_DB\"; \ + else \ + MONGO_URI=\"mongodb://$$MONGO_USER:$$MONGO_PASSWORD@$$MONGO_HOST/$$MONGO_DB?authSource=$$MONGO_AUTH_DB\"; \ + fi && \ + echo \"執行 MongoDB migration (DOWN)...\" && \ + echo \"連接: $$MONGO_URI\" && \ + for file in \$$(ls -1 /migrations/*.down.txt 2>/dev/null | sort -r); do \ + echo \"執行: \$$(basename \$$file)\" && \ + mongosh \"$$MONGO_URI\" --file \"\$$file\" || exit 1; \ + done && \ + echo \"✅ Migration DOWN 完成\" \ + " + +.PHONY: migrate-version +migrate-version: ## 查看已執行的 migration 文件列表 + @echo "=== 已執行的 Migration 文件 ===" + @echo "注意:使用 mongosh 執行,無法追蹤版本" + @echo "Migration 文件列表:" + @ls -1 generate/database/mongo/*.up.txt | xargs -n1 basename + diff --git a/build/README.md b/build/README.md new file mode 100644 index 0000000..854dc79 --- /dev/null +++ b/build/README.md @@ -0,0 +1,172 @@ +# MongoDB Migration 使用說明 (golang-migrate) + +本目錄包含使用 [golang-migrate](https://github.com/golang-migrate/migrate) 執行 MongoDB migration 的配置。 + +## 重要說明 + +**golang-migrate 對 MongoDB 的文件格式要求**: + +根據 [golang-migrate 官方文檔](https://github.com/golang-migrate/migrate),MongoDB 驅動支援以下格式: + +1. **JSON 格式**:使用 `db.runCommand` 的 JSON 格式 +2. **JavaScript 格式**:`.js` 文件,包含 MongoDB shell 命令 + +**當前狀況**: +- 你的 migration 文件是 `.txt` 格式的 MongoDB shell 腳本 +- golang-migrate 可能無法直接執行 `.txt` 文件 + +## 解決方案 + +### 方案 1:將 `.txt` 文件重命名為 `.js`(推薦) + +golang-migrate 支援 `.js` 文件,你可以將現有的 `.txt` 文件重命名為 `.js`: + +```bash +# 重命名所有 migration 文件 +cd generate/database/mongo +for file in *.up.txt; do mv "$file" "${file%.txt}.js"; done +for file in *.down.txt; do mv "$file" "${file%.txt}.js"; done +``` + +### 方案 2:使用 JSON 格式(如果需要) + +如果 `.js` 格式不工作,可以轉換為 JSON 格式。參考 [golang-migrate MongoDB 文檔](https://pkg.go.dev/github.com/golang-migrate/migrate/v4/database/mongodb)。 + +## 文件說明 + +- `Dockerfile-migrate` - 編譯帶 MongoDB 支援的 golang-migrate +- `docker-compose-migrate.yml` - Docker Compose 配置 +- `scripts/` - 輔助腳本(可選) + +## 使用方法 + +### 使用 Docker(推薦) + +#### 執行 UP Migration + +```bash +# 使用預設配置 +make migrate-up + +# 自定義 MongoDB 連接 +make migrate-up MONGO_HOST=localhost:27017 MONGO_DB=digimon_member MONGO_USER=root MONGO_PASSWORD=example +``` + +#### 執行 DOWN Migration + +```bash +# 回滾一個版本 +make migrate-down + +# 自定義連接 +make migrate-down MONGO_HOST=localhost:27017 MONGO_DB=digimon_member +``` + +#### 查看版本 + +```bash +make migrate-version +``` + +### 本地執行(需要安裝 migrate) + +```bash +# 安裝 migrate(帶 MongoDB 支援) +go install -tags 'mongodb' github.com/golang-migrate/migrate/v4/cmd/migrate@latest + +# UP migration +make migrate-local-up + +# DOWN migration +make migrate-local-down +``` + +## 環境變數 + +| 變數 | 預設值 | 說明 | +|------|--------|------| +| `MONGO_HOST` | `127.0.0.1:27017` | MongoDB 主機和端口 | +| `MONGO_DB` | `digimon_member` | 資料庫名稱 | +| `MONGO_USER` | `root` | 用戶名(可選,留空則不使用認證) | +| `MONGO_PASSWORD` | `example` | 密碼(可選) | +| `MONGO_AUTH_DB` | `admin` | 認證資料庫 | + +## Migration 文件格式 + +### 當前格式(.txt) + +```javascript +db.collection.createIndex({"field": 1}, {unique: true}); +``` + +### golang-migrate 支援的格式 + +#### JavaScript (.js) +```javascript +db.collection.createIndex({"field": 1}, {unique: true}); +``` + +#### JSON 格式 +```json +{ + "createIndexes": "collection", + "indexes": [ + { + "key": {"field": 1}, + "name": "field_1", + "unique": true + } + ] +} +``` + +## 連接字符串參數 + +golang-migrate 的 MongoDB 連接字符串需要包含: + +- `x-migrations-collection=migrations` - 指定 migration 版本記錄的集合名稱 + +完整格式: +``` +mongodb://user:password@host:port/database?authSource=admin&x-migrations-collection=migrations +``` + +## 注意事項 + +1. **文件格式**:確保 migration 文件是 `.js` 或 `.json` 格式 +2. **版本追蹤**:golang-migrate 會在 MongoDB 中創建 `migrations` 集合來追蹤版本 +3. **執行順序**:文件按照文件名中的時間戳順序執行 +4. **錯誤處理**:如果 migration 失敗,版本不會更新,可以安全重試 + +## 故障排除 + +### migrate 命令找不到 + +```bash +# 安裝 migrate +go install -tags 'mongodb' github.com/golang-migrate/migrate/v4/cmd/migrate@latest +``` + +### 連接失敗 + +確保 MongoDB 正在運行,並且連接資訊正確: + +```bash +# 測試連接 +mongosh "mongodb://root:example@127.0.0.1:27017/digimon_member?authSource=admin" +``` + +### 文件格式錯誤 + +如果遇到文件格式錯誤,檢查文件是否為有效的 JavaScript 或 JSON: + +```bash +# 檢查文件 +node -c generate/database/mongo/2024110500000001_account.up.js +``` + +## 參考資料 + +- [golang-migrate GitHub](https://github.com/golang-migrate/migrate) +- [MongoDB Driver 文檔](https://pkg.go.dev/github.com/golang-migrate/migrate/v4/database/mongodb) +- [CLI 文檔](https://github.com/golang-migrate/migrate/tree/master/cmd/migrate) diff --git a/build/docker-compose-migrate.yml b/build/docker-compose-migrate.yml new file mode 100644 index 0000000..4673d77 --- /dev/null +++ b/build/docker-compose-migrate.yml @@ -0,0 +1,29 @@ +services: + migrate: + image: mongo:7.0 + volumes: + - ../generate/database/mongo:/migrations:ro + working_dir: /app + environment: + - MONGO_HOST=${MONGO_HOST:-127.0.0.1:27017} + - MONGO_DB=${MONGO_DB:-digimon} + - MONGO_USER=${MONGO_USER:-root} + - MONGO_PASSWORD=${MONGO_PASSWORD:-example} + - MONGO_AUTH_DB=${MONGO_AUTH_DB:-admin} + network_mode: host + # 預設執行 up migration + command: > + sh -c " + if [ -z \"$$MONGO_USER\" ] || [ \"$$MONGO_USER\" = \"\" ]; then + MONGO_URI=\"mongodb://$$MONGO_HOST/$$MONGO_DB\" + else + MONGO_URI=\"mongodb://$$MONGO_USER:$$MONGO_PASSWORD@$$MONGO_HOST/$$MONGO_DB?authSource=$$MONGO_AUTH_DB\" + fi && + echo \"執行 MongoDB migration (UP)...\" && + echo \"連接: $$MONGO_URI\" && + for file in $$(ls -1 /migrations/*.up.txt 2>/dev/null | sort); do + echo \"執行: $$(basename $$file)\" && + mongosh \"$$MONGO_URI\" --file \"$$file\" || exit 1 + done && + echo \"✅ Migration UP 完成\" + " diff --git a/generate/database/mongo/20240422112701_audo_id.down.txt b/generate/database/mongo/2024110400000001_audo_id.down.txt similarity index 100% rename from generate/database/mongo/20240422112701_audo_id.down.txt rename to generate/database/mongo/2024110400000001_audo_id.down.txt diff --git a/generate/database/mongo/20240422112701_audo_id.up.txt b/generate/database/mongo/2024110400000001_audo_id.up.txt old mode 100755 new mode 100644 similarity index 100% rename from generate/database/mongo/20240422112701_audo_id.up.txt rename to generate/database/mongo/2024110400000001_audo_id.up.txt diff --git a/generate/database/mongo/2024110500000001_account.up.txt b/generate/database/mongo/2024110500000001_account.up.txt old mode 100755 new mode 100644 index 337efce..ed1ff32 --- a/generate/database/mongo/2024110500000001_account.up.txt +++ b/generate/database/mongo/2024110500000001_account.up.txt @@ -1,2 +1,3 @@ db.account.createIndex({ "login_id": 1, "platform": 1}, {unique: true}) db.account.createIndex({"create_at": 1}) + diff --git a/generate/database/mongo/2024110500000002_account_uid.up.txt b/generate/database/mongo/2024110500000002_account_uid.up.txt old mode 100755 new mode 100644 index 407f4f3..99c67bc --- a/generate/database/mongo/2024110500000002_account_uid.up.txt +++ b/generate/database/mongo/2024110500000002_account_uid.up.txt @@ -1,3 +1,4 @@ db.account_uid_binding.createIndex({"login_id": 1}, {unique: true}) db.account_uid_binding.createIndex({"uid": 1}) db.account_uid_binding.createIndex({"create_at": 1}) + diff --git a/generate/database/mongo/2024110500000003_user.up.txt b/generate/database/mongo/2024110500000003_user.up.txt old mode 100755 new mode 100644 index 2c5d90e..25c8695 --- a/generate/database/mongo/2024110500000003_user.up.txt +++ b/generate/database/mongo/2024110500000003_user.up.txt @@ -1,2 +1,3 @@ db.user_info.createIndex({"uid": 1},{unique: true}) db.user_info.createIndex({"create_at": 1}) + diff --git a/generate/database/mongo/2025100900000001_permission.up.txt b/generate/database/mongo/2025100900000001_permission.up.txt index 00ce5fe..7a92fee 100644 --- a/generate/database/mongo/2025100900000001_permission.up.txt +++ b/generate/database/mongo/2025100900000001_permission.up.txt @@ -1,7 +1,18 @@ +// 1. 唯一索引:權限名稱必須唯一 db.permission.createIndex({"name": 1}, {unique: true}); + +// 2. 複合唯一稀疏索引:HTTP 路徑 + 方法的組合必須唯一(用於 API 權限) db.permission.createIndex({"http_path": 1, "http_method": 1}, {unique: true, sparse: true}); + +// 3. 查詢索引:按狀態查詢 db.permission.createIndex({"status": 1}); + +// 4. 查詢索引:按父 ID 查詢(用於獲取子權限) db.permission.createIndex({"parent_id": 1}); + +// 5. 複合索引:按類型和狀態查詢(常用組合) db.permission.createIndex({"type": 1, "status": 1}); + +// 6. 時間戳索引:用於排序和時間範圍查詢 db.permission.createIndex({"create_time": 1}); diff --git a/generate/database/mongo/2025100900000002_role.up.txt b/generate/database/mongo/2025100900000002_role.up.txt index dbed02b..5c7a34e 100644 --- a/generate/database/mongo/2025100900000002_role.up.txt +++ b/generate/database/mongo/2025100900000002_role.up.txt @@ -1,8 +1,21 @@ +// 1. 唯一索引:角色 UID 必須唯一 db.role.createIndex({"uid": 1}, {unique: true}); + +// 2. 複合唯一索引:同一個 Client 下角色名稱必須唯一 db.role.createIndex({"client_id": 1, "name": 1}, {unique: true}); + +// 3. 查詢索引:按 Client ID 查詢 db.role.createIndex({"client_id": 1}); + +// 4. 查詢索引:按狀態查詢 db.role.createIndex({"status": 1}); + +// 5. 複合索引:按 Client ID 和狀態查詢(常用組合) db.role.createIndex({"client_id": 1, "status": 1}); + +// 6. 時間戳索引:用於排序和時間範圍查詢 db.role.createIndex({"create_time": 1}); + +// 7. 時間戳索引:用於更新時間排序 db.role.createIndex({"update_time": -1}); diff --git a/generate/database/mongo/2025100900000003_role_permission.up.txt b/generate/database/mongo/2025100900000003_role_permission.up.txt index 1bf8cf3..2a0e045 100644 --- a/generate/database/mongo/2025100900000003_role_permission.up.txt +++ b/generate/database/mongo/2025100900000003_role_permission.up.txt @@ -1,6 +1,15 @@ +// 1. 複合唯一索引:角色 ID + 權限 ID 的組合必須唯一(避免重複關聯) db.role_permission.createIndex({"role_id": 1, "permission_id": 1}, {unique: true}); + +// 2. 查詢索引:按角色 ID 查詢(用於獲取某角色的所有權限) db.role_permission.createIndex({"role_id": 1}); + +// 3. 查詢索引:按權限 ID 查詢(用於獲取擁有某權限的所有角色) db.role_permission.createIndex({"permission_id": 1}); + +// 4. 複合索引:按權限 ID 和狀態查詢 db.role_permission.createIndex({"permission_id": 1, "status": 1}); + +// 5. 時間戳索引:用於排序和時間範圍查詢 db.role_permission.createIndex({"create_time": 1}); diff --git a/generate/database/mongo/2025100900000004_user_role.up.txt b/generate/database/mongo/2025100900000004_user_role.up.txt index 89edcbb..cff5ab2 100644 --- a/generate/database/mongo/2025100900000004_user_role.up.txt +++ b/generate/database/mongo/2025100900000004_user_role.up.txt @@ -1,8 +1,21 @@ +// 1. 唯一索引:使用者 UID 必須唯一(一個使用者只能有一個角色) db.user_role.createIndex({"uid": 1}, {unique: true}); + +// 2. 查詢索引:按角色 ID 查詢(用於獲取某角色的所有使用者) db.user_role.createIndex({"role_id": 1}); + +// 3. 查詢索引:按 Brand 查詢 db.user_role.createIndex({"brand": 1}); + +// 4. 查詢索引:按狀態查詢 db.user_role.createIndex({"status": 1}); + +// 5. 複合索引:按 Brand 和角色 ID 查詢(常用組合) db.user_role.createIndex({"brand": 1, "role_id": 1}); + +// 6. 複合索引:按 Brand 和狀態查詢 db.user_role.createIndex({"brand": 1, "status": 1}); + +// 7. 時間戳索引:用於排序和時間範圍查詢 db.user_role.createIndex({"create_time": 1}); diff --git a/generate/database/mongo/2025101200000001_roles.up.txt b/generate/database/mongo/2025101200000001_roles.up.txt index 8200639..87ae093 100644 --- a/generate/database/mongo/2025101200000001_roles.up.txt +++ b/generate/database/mongo/2025101200000001_roles.up.txt @@ -1,3 +1,4 @@ +// 插入初始角色數據 db.role.insertMany([ { "client_id": 1, @@ -30,5 +31,9 @@ db.role.insertMany([ "status": 1, "create_time": NumberLong(1728745200), "update_time": NumberLong(1728745200) - }, -]); \ No newline at end of file + } +]); + +// 注意:索引應該在 2025100900000002_role.up.txt 中建立 +// 這裡只插入初始數據 + diff --git a/go.mod b/go.mod index 4a573bd..fcd9141 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/zeromicro/go-zero v1.9.2 go.mongodb.org/mongo-driver/v2 v2.4.0 go.uber.org/mock v0.6.0 - golang.org/x/crypto v0.43.0 + golang.org/x/crypto v0.44.0 google.golang.org/grpc v1.76.0 google.golang.org/protobuf v1.36.10 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df @@ -30,7 +30,7 @@ require ( require ( dario.cat/mergo v1.0.2 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Masterminds/semver v1.4.2 // indirect github.com/Masterminds/sprig v2.16.0+incompatible // indirect github.com/Microsoft/go-winio v0.6.2 // indirect @@ -72,7 +72,7 @@ require ( github.com/imdario/mergo v0.3.6 // indirect github.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/klauspost/compress v1.18.0 // indirect + github.com/klauspost/compress v1.18.1 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.10 // indirect @@ -119,10 +119,10 @@ require ( github.com/yuin/gopher-lua v1.1.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect go.opentelemetry.io/otel v1.37.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect @@ -132,10 +132,10 @@ require ( go.opentelemetry.io/otel/trace v1.37.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/automaxprocs v1.6.0 // indirect - golang.org/x/net v0.45.0 // indirect - golang.org/x/sync v0.17.0 // indirect - golang.org/x/sys v0.37.0 // indirect - golang.org/x/text v0.30.0 // indirect + golang.org/x/net v0.46.0 // indirect + golang.org/x/sync v0.18.0 // indirect + golang.org/x/sys v0.38.0 // indirect + golang.org/x/text v0.31.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect diff --git a/go.sum b/go.sum index 3c2c7e1..7fc6edc 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/sprig v2.16.0+incompatible h1:QZbMUPxRQ50EKAq3LFMnxddMu88/EUUG3qmxwtDmPsY= @@ -125,8 +125,8 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co= +github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -266,14 +266,14 @@ go.mongodb.org/mongo-driver/v2 v2.4.0 h1:Oq6BmUAAFTzMeh6AonuDlgZMuAuEiUxoAD1koK5 go.mongodb.org/mongo-driver/v2 v2.4.0/go.mod h1:jHeEDJHJq7tm6ZF45Issun9dbogjfnPySb1vXA7EeAI= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 h1:dIIDULZJpgdiHz5tXrTgKIMLkus6jEFa7x5SOKcyR7E= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0/go.mod h1:jlRVBe7+Z1wyxFSUs48L6OBQZ5JwH2Hg/Vbl+t9rAgI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= @@ -301,20 +301,20 @@ go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= golang.org/x/crypto v0.0.0-20181029175232-7e6ffbd03851/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= -golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= +golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= +golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM= -golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= +golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= -golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190225065934-cc5685c2db12/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -329,19 +329,19 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= -golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q= -golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss= +golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= +golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= -golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=