Compare commits

..
28 Commits
Author SHA1 Message Date
txix e571aa709a 2026-02-20 19:41:52: merge [main:416f9307c3185ce221c98d501d55584da7301600];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-02-20 19:41:52 +03:00
txix 3c0c32ec72 2026-02-10 17:42:12: merge [main:f97795bd90603310b924d685666ce64c68644e4a];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-02-10 17:42:12 +03:00
txix bd3a52e7f3 2026-02-09 12:15:13: merge [main:f7931b1d8350cf640562be540836310ee6da010b];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-02-09 12:15:13 +03:00
txix bb02ef25ab 2026-02-06 11:20:37: merge [main:245cf8852da4396ef3b198c2af5f7e483379e391]; 2026-02-06 11:20:37 +03:00
txix bd633d1599 2026-02-05 17:50:20: merge [main:7b09eb3a07fc352b4ebee3cd1f0a9631f4ccb38d]; 2026-02-05 17:50:20 +03:00
txix 7ee7b6749f 2025-12-01 16:45:09: merge [main:8101f9a8c84d0c8c7bd462ac374f4db79dbc5d21];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-12-01 16:45:09 +03:00
txix 065c96042d 2025-10-09 15:30:52: merge [main:efed09bb923fb843bd0ebfcc65fd558a5a91727b];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-10-09 15:30:52 +03:00
txix 964ead61f7 2025-09-17 18:00:36: merge [main:5a3d4fffeaf49ec2831d3f9b1dea027c1e1784e1];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-09-17 18:00:36 +03:00
txix c36b4cdc1c 2025-08-21 16:39:38: merge [main:7a585711f6c2abcee6bbfb53dbf4c38fbbb68103]; 2025-08-21 16:39:38 +03:00
txix 261dfbd3cd 2025-07-08 11:38:08: merge [main:846129b1afe26f21c7e182be578112bb0c3f76ce];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-07-08 11:38:08 +03:00
txix f32c1bef30 2025-06-10 09:17:26: merge [main:78eeee0bc665dc8fd1e8b99c5ce47dc227342a7f];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-06-10 09:17:26 +03:00
txix 5e248d85fe 2025-06-06 17:09:42: merge [main:eb7997476085e283af784adf7ada881a3d37e535];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-06-06 17:09:42 +03:00
txix 7ec4962301 2025-06-06 16:56:57: merge [main:350d22ae7512add0069a2d5ac30546bd8b32d979]; 2025-06-06 16:56:57 +03:00
txix 6b7ddafa32 2025-05-27 14:44:20: merge [main:3e7f2358764cd22b6766b4ea57d14a429cfb06ab]; 2025-05-27 14:44:20 +03:00
txix 7ba1f0a5e8 2025-04-18 12:20:59: merge [main:aefc14ece9229d4d8e88c117a09f85d1a6775b46]; 2025-04-18 12:20:59 +03:00
txix 18205b2e66 2025-04-17 18:01:00: merge [main:0e6b5dec5225670f20a213993b54e1c0fcd44c63]; 2025-04-17 18:01:00 +03:00
txix 22baffabfb 2025-03-24 15:30:34: merge [main:7a1d8822489f02be3b825bb1224de48bab9c1657]; 2025-03-24 15:30:34 +03:00
txix 4a95b4b578 2024-12-27 16:47:46: merge [main:69567c48694f02359eecd8e696669f7c3de0b398]; 2024-12-27 16:47:46 +03:00
txix 0fbe723485 2024-12-12 13:56:05: merge [main:5fbfe1b039c8b70814b6262508bfeda3a8069dd2]; 2024-12-12 13:56:05 +03:00
txix e81f8c64cf 2024-11-27 12:16:06: merge [master:8f9dc2048fde1f9cb1c40e716e65dd91b77256b8]; 2024-11-27 12:16:06 +03:00
txix 802ce18a5e 2024-11-26 19:14:10: merge [master:16d2701e265c75b03df0b81a0cefc06bc9563e7a]; 2024-11-26 19:14:10 +03:00
txix 77244d4997 2024-11-20 14:39:28: merge [master:83355f8bbc6bf330c8f3d946415d732d2590d17d]; 2024-11-20 14:39:28 +03:00
txix 12b71a1777 2024-11-15 13:12:14: merge [master:93f2a5ed50211ee88fbdb241f4dbaa4af50d1d38]; 2024-11-15 13:12:14 +03:00
txix 1badb6b931 2024-04-24 17:59:21: merge [master:5e72ec386437c66661a2a98b1a232a3ad49af893]; 2024-04-24 17:59:21 +03:00
txix 14221f778c 2024-03-25 17:42:24: merge [master:e2419e2c4bf843e66dc679b387cbb6900599ee22]; 2024-03-25 17:42:24 +03:00
txix a5ca7b230a 2024-03-25 17:06:20: merge [master:72afc94782d802dbef7d4b1b092b6b1d02301edf]; 2024-03-25 17:06:20 +03:00
txix 3427a92d08 2024-03-25 16:52:24: merge [master:02070b1db1d2009dc917980dfc5e731e9508b8d0]; 2024-03-25 16:52:24 +03:00
txix ef7c017e4c 2024-03-25 16:23:54: merge [master:2fc6c7ba91a773e1055473094b8e3d7192bf4df4]; 2024-03-25 16:23:54 +03:00
71 changed files with 772 additions and 2654 deletions

No files matched your search

+1 -3
View File
@@ -67,11 +67,9 @@ fabric.properties
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
/vendor/
/node_modules/
/vendor/
package.json
yarn.lock
conf/config_dev.yml
.DS_Store
+23 -3
View File
@@ -1,3 +1,23 @@
include:
- project: '$CI_PROJECT_PATH'
file: '/ci-isp-go-service.yml'
docker-build:
image: docker:20.10.16
stage: build
services:
- docker:20.10.16-dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- export VERSION=`cat .version `
- echo $VERSION
- echo $CI_DOCKER_FILE
- echo $CI_REGISTRY
script:
- set
- mkdir -p migrations
- docker build -f Dockerfile.dit --force-rm --build-arg="version=$VERSION" --build-arg="app_name=$CI_PROJECT_NAME" --pull -t "$CI_REGISTRY/$CI_PROJECT_NAME:$VERSION" .
- |
docker tag "$CI_REGISTRY/$CI_PROJECT_NAME:$VERSION" "$CI_REGISTRY/$CI_PROJECT_NAME:latest"
docker push "$CI_REGISTRY/$CI_PROJECT_NAME:$VERSION"
docker push "$CI_REGISTRY/$CI_PROJECT_NAME:latest"
docker rmi -f "$CI_REGISTRY/$CI_PROJECT_NAME:$VERSION"
docker rmi -f "$CI_REGISTRY/$CI_PROJECT_NAME:latest"
- docker logout $CI_REGISTRY
+3 -11
View File
@@ -8,10 +8,9 @@ linters:
- depguard # не всегда имеет смысл
- dupword # не имеет смысла
- exhaustruct # не имеет смысла
- exhaustruct_v5 # не имеет смысла
- goconst # не всегда имеет смысл
- godot # не актуально для swagger
- godox # не позволяет оставлять todo
- gomoddirectives
- musttag # у нас собственное правило: не используем теги, если работаем с пакетом isp-kit/json и с внутренними структурами(между нашими сервисами), при этом теги обязательный для всех внешних для нас структур
- nlreturn # не всегда имеет смысл
- nolintlint # Goland все равно форматирует с отступом
@@ -19,10 +18,7 @@ linters:
- tagalign # не всегда имеет смысл
- varnamelen # очень индивидуально (db)
- wsl # расставление пробелов очень индивидуально
- wsl_v5 # расставление пробелов очень индивидуально
- godoclint # ругается на // nolint, не удобно
- prealloc # слишком аггресивный, в большинстве случаев не требуется
- gomoddirectives # в проекте осознанно захардкожены версии зависимостей
- wsl_v5
settings:
cyclop:
max-complexity: 15 # по умолчанию 10 мало
@@ -59,10 +55,6 @@ linters:
- linters:
- wrapcheck
path: transaction # транзакции прозрачны
- linters:
- unqueryvet
- prealloc
path: ".*_test\\.go$"
paths:
- third_party$
- builtin$
@@ -75,4 +67,4 @@ formatters:
paths:
- third_party$
- builtin$
- examples$
- examples$
+1 -1
View File
@@ -1 +1 @@
3.11.1
3.9.0
+4 -4
View File
@@ -1,4 +1,4 @@
FROM golang:1.26-alpine AS builder
FROM golang:1.25-alpine as builder
WORKDIR /build
ARG version
ENV version_env=$version
@@ -8,15 +8,15 @@ COPY . .
RUN apk update && apk upgrade && apk add --no-cache gcc musl-dev
RUN go build -ldflags="-X 'main.version=$version_env'" -o /main .
WORKDIR cmd/migrate
#RUN CGO_ENABLED=1 go build -o /migrate .
RUN CGO_ENABLED=1 go build -o /migrate .
FROM alpine:3.23
FROM alpine:3.22
RUN apk add --no-cache tzdata
RUN cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime
RUN echo "Europe/Moscow" > /etc/timezone
#COPY --from=builder migrate /migrate/migrate
COPY --from=builder migrate /migrate/migrate
COPY cmd/migrate/config.yml /migrate/config.yml
RUN chmod 666 /migrate/config.yml
+1 -1
View File
@@ -1,5 +1,5 @@
FROM dockerhub.mos.ru/mosos/arbat:15.5 as builder
RUN zypper --no-gpg-checks update -y && zypper --no-gpg-checks install -y go1.26 git
RUN zypper --no-gpg-checks update -y && zypper --no-gpg-checks install -y go1.25 git
WORKDIR /build
ARG version
ENV version_env=$version
+1 -4
View File
@@ -96,7 +96,7 @@ func (l Locator) Config() *Config {
configHistoryRepo := repository.NewConfigHistory(l.db)
variableRepo := repository.NewVariable(l.db)
variableService := variable.NewService(variableRepo, configRepo, eventRepo, configSchemaRepo, l.logger)
variableService := variable.NewService(variableRepo, configRepo, eventRepo)
variableController := api.NewVariable(variableService)
etpSrv := etp.NewServer(
@@ -134,8 +134,6 @@ func (l Locator) Config() *Config {
subscriptionService,
emitter,
variableService,
variableRepo,
l.cfg.Local.ConfigWriteDeny,
l.logger,
)
moduleController := controller.NewModule(moduleService, l.logger)
@@ -150,7 +148,6 @@ func (l Locator) Config() *Config {
configApiService := apisvs.NewConfig(
configRepo,
moduleRepo,
moduleService,
configSchemaRepo,
eventRepo,
configHistoryApiService,
-15
View File
@@ -1,18 +1,3 @@
### v3.11.1
* Исправлено: при сохранении конфига с многократным использованием одной переменной через `_Var()` терялись все связи переменной с конфигами (конфликт PK в транзакции ссылок)
* Ошибки statement в rqlite-транзакциях больше не игнорируются молча, возвращаются как ошибка запроса
* Отключены линтеры `exhaustruct_v5`, `goconst`
### v3.11.0
* Добавлены `admin` permission к endpoint'ам
### v3.10.0
* событие `MODULE_READY` теперь может быть обработано несколько раз, обновляя полученные данные об инстансе модуля
### v3.9.3
* обновлены зависимости
### v3.9.2
* Обновлен isp-kit
### v3.9.1
* Версия go 1.26
* Добавлен эндпоинт `/module/get_required_modules` для получения списка модулей, от которых зависит модуль, отправивший запрос
### v3.9.0
* Обновлены зависимости
* Добавлено поле `transport` в таблицу `isp_config_service__backend`
+34 -34
View File
@@ -1,15 +1,15 @@
module isp-config-service/migrate
go 1.26.0
go 1.25.0
replace isp-config-service => ../..
require (
github.com/jmoiron/sqlx v1.4.0
github.com/mattn/go-sqlite3 v1.14.47
github.com/mattn/go-sqlite3 v1.14.32
github.com/pkg/errors v0.9.1
github.com/pressly/goose/v3 v3.27.3
github.com/txix-open/isp-kit v1.74.1
github.com/pressly/goose/v3 v3.26.0
github.com/txix-open/isp-kit v1.64.11
isp-config-service v0.0.0-00010101000000-000000000000
)
@@ -18,60 +18,60 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coder/websocket v1.8.15 // indirect
github.com/gabriel-vasile/mimetype v1.4.15 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/coder/websocket v1.8.14 // indirect
github.com/gabriel-vasile/mimetype v1.4.11 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/pgx/v5 v5.10.0 // indirect
github.com/jackc/pgx/v5 v5.7.6 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.19.2 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/leodido/go-urn v1.5.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mfridman/interpolate v0.0.2 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/prometheus/client_golang v1.24.1 // indirect
github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.70.1 // indirect
github.com/prometheus/procfs v0.21.1 // indirect
github.com/sethvargo/go-retry v0.4.0 // indirect
github.com/prometheus/common v0.67.3 // indirect
github.com/prometheus/procfs v0.19.2 // indirect
github.com/sethvargo/go-retry v0.3.0 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/match v1.2.0 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/txix-open/bellows v1.2.0 // indirect
github.com/txix-open/etp/v4 v4.1.3 // indirect
github.com/txix-open/etp/v4 v4.0.1 // indirect
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.71.0 // indirect
go.opentelemetry.io/otel v1.46.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0 // indirect
go.opentelemetry.io/otel/metric v1.46.0 // indirect
go.opentelemetry.io/otel/sdk v1.46.0 // indirect
go.opentelemetry.io/otel/trace v1.46.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect
go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.28.0 // indirect
golang.org/x/crypto v0.55.0 // indirect
golang.org/x/net v0.58.0 // indirect
golang.org/x/sync v0.22.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/text v0.41.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260825221802-da73d73af1c5 // indirect
google.golang.org/grpc v1.83.2 // indirect
google.golang.org/protobuf v1.36.12 // indirect
go.uber.org/zap v1.27.1 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/net v0.47.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-20251111163417-95abcf5c77ba // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846 // indirect
google.golang.org/grpc v1.77.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
+85 -110
View File
@@ -1,18 +1,19 @@
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo=
filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc=
github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM=
github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA=
github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
@@ -21,15 +22,13 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/gabriel-vasile/mimetype v1.4.13 h1:46nXokslUBsAJE/wMsp5gtO500a4F3Nkz9Ufpk2AcUM=
github.com/gabriel-vasile/mimetype v1.4.13/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
github.com/gabriel-vasile/mimetype v1.4.15/go.mod h1:azpTcoLcDZRNgFou5j+APrqQx9HqVPWa6ijYQIIVswQ=
github.com/getsentry/sentry-go v0.47.0 h1:AnSMSyrYA5qZCIN/2xpgAAwv63sVULV+vBq37ajouc8=
github.com/getsentry/sentry-go v0.47.0/go.mod h1:h+b4VHpKnK7aUXB5wc+KDnPgp9ZtfliRD4eV85FbiSA=
github.com/gabriel-vasile/mimetype v1.4.11 h1:AQvxbp830wPhHTqc1u7nzoLT+ZFxGY7emj5DR5DYFik=
github.com/gabriel-vasile/mimetype v1.4.11/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
github.com/getsentry/sentry-go v0.38.0 h1:S8Xui7gLeAvXINVLMOaX94HnsDf1GexnfXGSNC4+KQs=
github.com/getsentry/sentry-go v0.38.0/go.mod h1:eRXCoh3uvmjQLY6qu63BjUZnaBu5L5WhMV1RwYO8W5s=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
@@ -38,11 +37,11 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-resty/resty/v2 v2.17.2 h1:FQW5oHYcIlkCNrMD2lloGScxcHJ0gkjshV3qcQAyHQk=
github.com/go-resty/resty/v2 v2.17.2/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2mLtQrOyQlVA=
github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM=
github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA=
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
github.com/go-sql-driver/mysql v1.10.0 h1:Q+1LV8DkHJvSYAdR83XzuhDaTykuDx0l6fkXxoWCWfw=
github.com/go-sql-driver/mysql v1.10.0/go.mod h1:M+cqaI7+xxXGG9swrdeUIoPG3Y3KCkF0pZej+SK+nWk=
github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo=
github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
@@ -50,17 +49,16 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 h1:5VipnvEpbqr2gA2VbM+nYVbkIF28c5ZQfqCBQ5g2xfk=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0/go.mod h1:Hyl3n6Twe1hvtd9XUXDec4pTvgMSEixRuQKPTMH2bNs=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0/go.mod h1:zOBXOsUaBSjKgmH4OGzV1esUpR3oUSCPYVd2cUBjKYY=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 h1:NmZ1PKzSTQbuGHw9DGPFomqkkLWMC+vZCkfs+FHv1Vg=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4=
github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=
github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
github.com/jackc/pgx/v5 v5.10.0 h1:VhSvgU2jSli8o3AqIEOTJr7rZwAEUVo4E4XhR94Zfr0=
github.com/jackc/pgx/v5 v5.10.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4=
github.com/jackc/pgx/v5 v5.7.6 h1:rWQc5FwZSPX58r1OQmkuaNicxdmExaEz5A2DO2hUuTk=
github.com/jackc/pgx/v5 v5.7.6/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M=
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o=
@@ -69,9 +67,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/klauspost/compress v1.19.0 h1:sXLILfc9jV2QYWkzFOPWStmcUVH2RHEB1JCdY2oVvCQ=
github.com/klauspost/compress v1.19.0/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/compress v1.19.2/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
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.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -84,14 +81,13 @@ github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhR
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw=
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
github.com/leodido/go-urn v1.5.0/go.mod h1:9BORnCDhdPBJNDEX+w1bJisa8yOKYi116VeO96s4ifE=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4=
github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mattn/go-sqlite3 v1.14.47 h1:jOBI62gS7nKeZv+as1oGEy0+1qISgXwH/QBlR6KbfIo=
github.com/mattn/go-sqlite3 v1.14.47/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w=
github.com/mattn/go-sqlite3 v1.14.32 h1:JD12Ag3oLy1zQA+BNn74xRgaBbdhbNIDYvQUEuuErjs=
github.com/mattn/go-sqlite3 v1.14.32/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY=
github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
@@ -103,33 +99,29 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pressly/goose/v3 v3.27.2 h1:FjKNzcmMdGrQlSIu5alMSmakQtJFBgtw+A0bb1p/LC8=
github.com/pressly/goose/v3 v3.27.2/go.mod h1:qWW+/8dkVtJYjJrbIpwD5xxnEJTUKvxkQ9JKQp9LaIM=
github.com/pressly/goose/v3 v3.27.3/go.mod h1:Dag+xpV6o20HR2LFY1j0q6MDwc3f7vPUFDA77R+0yGY=
github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jpmM=
github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY=
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
github.com/prometheus/client_golang v1.24.1/go.mod h1:F+oSRECHg4sse5ucfYpYDeIv/hu68Zo0uoHKetWnzcE=
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
github.com/prometheus/common v0.69.0 h1:OA85nJQS/T/MaYh/Q2CcgDKSGWqNIgrBDvDH85CuiNk=
github.com/prometheus/common v0.69.0/go.mod h1:ZzL3f6u94qUxh9p+tJTrF+FvBS1XXbbRAZCQkytAL0Y=
github.com/prometheus/common v0.70.1/go.mod h1:VdFUQDMZK3VLkurFUVhia6uys/0suUp86TJz5qbJRhc=
github.com/prometheus/procfs v0.21.1 h1:GljZCt+zSTS+NZq88cyQ1LjZ+RCHp3uVuabBWA5+OJI=
github.com/prometheus/procfs v0.21.1/go.mod h1:aB55Cww9pdSJVHk0hUf0inxWyyjPogFIjmHKYgMKmtY=
github.com/prometheus/common v0.67.3 h1:shd26MlnwTw5jksTDhC7rTQIteBxy+ZZDr3t7F2xN2Q=
github.com/prometheus/common v0.67.3/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI=
github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws=
github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE=
github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas=
github.com/sethvargo/go-retry v0.4.0/go.mod h1:tvsjdKG6xfiCx4LSiUZ06kcv38xvdVQwv8R6/VnnVWg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
@@ -153,81 +145,64 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/txix-open/bellows v1.2.0 h1:CXv8nQaZtB/micraeRilYyj/gtfv+bqBgP5aPYQgjeY=
github.com/txix-open/bellows v1.2.0/go.mod h1:qbKCy+RTgD30Qpw1fyb3y3jp5Y9mGhLLxgae1l0W92o=
github.com/txix-open/etp/v4 v4.1.1 h1:Yna+0mw/kQZP7Rl6QI4spCrO6qgO8ZhP8PjHlJj2lTU=
github.com/txix-open/etp/v4 v4.1.1/go.mod h1:9GK+Aje8BmLFq8Hk4j6Qb976LdU9WECCWAuLK1vAKgM=
github.com/txix-open/etp/v4 v4.1.3/go.mod h1:9GK+Aje8BmLFq8Hk4j6Qb976LdU9WECCWAuLK1vAKgM=
github.com/txix-open/isp-kit v1.71.1 h1:MNSuHy/HEvy7dKPQXkM+dgQpShDhcv1Sq1kLgep2LaA=
github.com/txix-open/isp-kit v1.71.1/go.mod h1:j2sj86byoKllCs+DaRWwg56NgcL2omr/bUzmU7+AF74=
github.com/txix-open/isp-kit v1.74.1/go.mod h1:i4g+hgfVQAXa02kHqr104TqYEsiW2em17RZF0KjkB78=
github.com/txix-open/etp/v4 v4.0.1 h1:5VSYgGsvnMz0tvUHsjVWFETI0qWBTCF1O3ARCHaCIgA=
github.com/txix-open/etp/v4 v4.0.1/go.mod h1:FIu7TUDdwcgmtmF6tFTV1bGA2fRY/iVaPQdsGzvqYc8=
github.com/txix-open/isp-kit v1.64.11 h1:K7RILD1of3iUYRFVCMw+S0epxo4CnL6KoYo8lNUi4Tk=
github.com/txix-open/isp-kit v1.64.11/go.mod h1:GvBsX5p2U3/ugK6PuWANYzSy/4YgawROm3eAKb35G6o=
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb h1:UJgT4u/QMv5QHKOQeJ7igShHa36c2/vIRqJiRLdDlf0=
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb/go.mod h1:0biAFE0bgbcKeBBAwgEDhbZz6uT1vuSETCrFQlv2RiA=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.69.0 h1:MCcYL7J6Vt/X0kjqbMZkekCmwsurbQRbL69vkiye2lk=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.69.0/go.mod h1:3jnStNwSufK+f5ktjL4EPcwtig4rtd81NS70lqHuXl8=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.71.0/go.mod h1:+H3sPOFwag14eMHTPMElZtV0e4YfVZ/85KgrKUCB5FI=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 h1:8tvICD4vSTOOsNrsI4Ljf6C+6UKvpTEH5XY3JMoyPoo=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0/go.mod h1:z9+yiacE0IHRqM4qFfkbt/JYlmYXgss8GY/jXoNuPJI=
go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU=
go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc=
go.opentelemetry.io/otel v1.46.0/go.mod h1:Gj3SEScelsNC45tp4nSxRYlS+f5iez7W8XPMCt905kE=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 h1:4YsVu3B8+3qtWYYrsUYgn0OG78pN0rnNPRGX4SbokQI=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0/go.mod h1:+wnlSn0mD1ADVMe3v9Z/WIaiz6q6gL2J/ejaAmdmv80=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0/go.mod h1:716wFneO0ov19A2beH5hjfh9AK5z/VWNAtDijp1Y0/g=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0 h1:lgh3PiVrRUWMLOVSkQicxzZll5NjF1r+AtsX1XRIHw0=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0/go.mod h1:5Cnhth3m/AgOeTgE3ex12pPmiu/gGtZit03kSzx9X7s=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0/go.mod h1:zDSEzoEqsOrgBeGvH66KRgxh90VonFyJqBHA0Pk3+rM=
go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc=
go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo=
go.opentelemetry.io/otel/metric v1.46.0/go.mod h1:iPmdWqifKUdzziPkvvzIJXITl56fQx2mGM/DHLB3/2o=
go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58=
go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0=
go.opentelemetry.io/otel/sdk v1.46.0/go.mod h1:GAERFXFt5SYCEB+YiKUbMBeza6UaDH7GmGOZEfh2gSM=
go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI=
go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA=
go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk=
go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE=
go.opentelemetry.io/otel/trace v1.46.0/go.mod h1:J7GAXweO77XSFkB/rmAqk9D6ihszhFjLU+d9WuUxDLI=
go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
go.opentelemetry.io/proto/otlp v1.11.0/go.mod h1:SmVizdCOAm3XBtG1g1NnOdhW6jtddT72hLMhv8VwA8E=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 h1:2pn7OzMewmYRiNtv1doZnLo3gONcnMHlFnmOR8Vgt+8=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0/go.mod h1:rjbQTDEPQymPE0YnRQp9/NuPwwtL0sesz/fnqRW/v84=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 h1:aTL7F04bJHUlztTsNGJ2l+6he8c+y/b//eR0jjjemT4=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4=
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A=
go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo=
go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q=
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU=
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M=
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
google.golang.org/genproto/googleapis/api v0.0.0-20260630182238-925bb5da69e7 h1:jQ9p21COKWjP3VwuFrNRiiOTMh3mPpN45R7SLrH/HUU=
google.golang.org/genproto/googleapis/api v0.0.0-20260630182238-925bb5da69e7/go.mod h1:KqHwBx2upmfa1XSi1WuRvC+2VGCLtooKkfmyvRbUmqA=
google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5/go.mod h1:3LhxRw4YYkf+ylAfgaY9JlVLFKhokkCV8duhLLe7+t0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260724162435-b2f20204f0df h1:O3ig1i5WDDzsVzRp+cCdgelT9vXnlnOFdlEeFtL4HCc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260724162435-b2f20204f0df/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260825221802-da73d73af1c5/go.mod h1:DjtHYE8FKJLivXcBEjGwndXfIC23G0VpXiXKqG179uA=
google.golang.org/grpc v1.82.1 h1:NnAxzGRA0677vCa4BUkOAnO5+FfQqVl9iUXeD0IqcGE=
google.golang.org/grpc v1.82.1/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o=
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8=
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
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.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba h1:B14OtaXuMaCQsl2deSvNkyPKIzq3BjfxQp8d00QyWx4=
google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba/go.mod h1:G5IanEx8/PgI9w6CFcYQf7jMtHQhZruvfM1i3qOqk5U=
google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846 h1:Wgl1rcDNThT+Zn47YyCXOXyX/COgMTIdhJ717F0l4xk=
google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM=
google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig=
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
@@ -236,11 +211,11 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
modernc.org/libc v1.73.4 h1:+ra4Ui8ngyt8HDcO1FTDPWlkAh6yOdaO2yAoh8MddQA=
modernc.org/libc v1.73.4/go.mod h1:DXZ3eO8qMCNn2SnmTNCiC71nJ9Rcq3PsnpU6Vc4rWK8=
modernc.org/libc v1.66.3 h1:cfCbjTUcdsKyyZZfEUKfoHcP3S0Wkvz3jgSzByEWVCQ=
modernc.org/libc v1.66.3/go.mod h1:XD9zO8kt59cANKvHPXpx7yS2ELPheAey0vjIuZOhOU8=
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
modernc.org/sqlite v1.53.0 h1:20WG8N9q4ji/dEqGk4uiI0c6OPjSeLTNYGFCc3+7c1M=
modernc.org/sqlite v1.53.0/go.mod h1:xoEpOIpGrgT48H5iiyt/YXPCZPEzlfmfFwtk8Lklw8s=
modernc.org/sqlite v1.38.2 h1:Aclu7+tgjgcQVShZqim41Bbw9Cho0y/7WzYptXqkEek=
modernc.org/sqlite v1.38.2/go.mod h1:cPTJYSlgg3Sfg046yBShXENNtPrWrDX8bsbAQBzgQ5E=
+1 -1
View File
@@ -18,9 +18,9 @@ import (
"github.com/jmoiron/sqlx"
_ "github.com/mattn/go-sqlite3"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/app"
"github.com/txix-open/isp-kit/db"
"github.com/txix-open/isp-kit/errors"
"isp-config-service/entity"
"isp-config-service/entity/xtypes"
"isp-config-service/migrate/migration"
+1 -1
View File
@@ -9,8 +9,8 @@ import (
"strings"
"time"
"github.com/pkg/errors"
"github.com/pressly/goose/v3"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/log"
)
+1 -2
View File
@@ -3,7 +3,7 @@ package conf
import (
"isp-config-service/service/rqlite"
"github.com/rqlite/rqlite/v10/auth"
"github.com/rqlite/rqlite/v9/auth"
"github.com/txix-open/isp-kit/bootstrap"
)
@@ -15,7 +15,6 @@ type Local struct {
InternalClientCredential string `validate:"required"`
Rqlite Rqlite
Backup rqlite.Backup
ConfigWriteDeny bool
}
type Rqlite struct {
+5 -36
View File
@@ -5,13 +5,12 @@ import (
"context"
"strconv"
"isp-config-service/domain"
"isp-config-service/entity"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/grpc"
"github.com/txix-open/isp-kit/grpc/apierrors"
"google.golang.org/grpc/metadata"
"isp-config-service/domain"
"isp-config-service/entity"
)
type ConfigService interface {
@@ -185,24 +184,12 @@ func (c Config) GetConfigById(ctx context.Context, req domain.IdRequest) (*domai
// @Produce json
// @Param body body domain.IdRequest true "id конфигурации для изменения"
// @Success 200
// @Failure 400 {object} apierrors.Error "`errorCode: 2002` - конфиг не найден<br/>`errorCode: 2003` - конфигурация нарушает политику секретных переменных (детали по путям в `details`)<br/>"
// @Failure 400 {object} apierrors.Error "`errorCode: 2002` - конфиг не найден<br/>"
// @Failure 500 {object} apierrors.Error
// @Router /config/mark_config_as_active [POST]
func (c Config) MarkConfigAsActive(ctx context.Context, identity domain.IdRequest) error {
err := c.service.MarkConfigAsActive(ctx, identity.Id)
var validationError domain.ConfigValidationError
switch {
case errors.As(err, &validationError):
details := map[string]any{}
for key, value := range validationError.Details {
details[key] = value
}
return apierrors.NewBusinessError(
domain.ErrorCodeInvalidConfig,
"invalid config",
err,
).WithDetails(details)
case errors.Is(err, entity.ErrConfigNotFound):
return apierrors.NewBusinessError(
domain.ErrorCodeConfigNotFound,
@@ -285,36 +272,18 @@ func (c Config) UpdateConfigName(ctx context.Context, req domain.UpdateConfigNam
// @Produce json
// @Param body body domain.SyncConfigRequest true "название модуля"
// @Success 200 {object} domain.Config
// @Failure 400 {object} apierrors.Error "`errorCode: 2001` - модуль не найден<br/>`errorCode: 2002` - конфиг не найден<br/>`errorCode: 2003` - в UI-экспонируемых полях активная конфигурация ссылается на секретную переменную"
// @Failure 400 {object} apierrors.Error "`errorCode: 2001` - модуль не найден<br/>`errorCode: 2002` - конфиг не найден"
// @Failure 500 {object} apierrors.Error
// @Router /config/sync_config [POST]
func (c Config) SyncConfig(ctx context.Context, req domain.SyncConfigRequest) error {
err := c.service.SyncConfig(ctx, req.ModuleName)
var validationError domain.ConfigValidationError
switch {
case errors.As(err, &validationError):
details := map[string]any{}
for key, value := range validationError.Details {
details[key] = value
}
return apierrors.NewBusinessError(
domain.ErrorCodeInvalidConfig,
"invalid config",
err,
).WithDetails(details)
case errors.Is(err, entity.ErrModuleNotFound):
return apierrors.NewBusinessError(
domain.ErrorCodeModuleNotFound,
"module not found",
err,
)
case errors.Is(err, entity.ErrConfigNotFound):
return apierrors.NewBusinessError(
domain.ErrorCodeConfigNotFound,
"config not found",
err,
)
case err != nil:
return apierrors.NewInternalServiceError(err)
default:
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"isp-config-service/domain"
"isp-config-service/entity"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/grpc/apierrors"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"isp-config-service/domain"
"isp-config-service/entity"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/grpc/apierrors"
)
-18
View File
@@ -11,7 +11,6 @@ type ModuleService interface {
Status(ctx context.Context) ([]domain.ModuleInfo, error)
Delete(ctx context.Context, id string) error
Connections(ctx context.Context) ([]domain.Connection, error)
RequiredModules(ctx context.Context) ([]domain.ModuleRelation, error)
}
type Module struct {
@@ -66,23 +65,6 @@ func (c Module) DeleteModule(ctx context.Context, identities []string) (*domain.
}, nil
}
// RequiredModules
// @Summary Метод для получения зависимостей модулей
// @Description Возвращает список модулей с их зависимостями
// @Tags Модули
// @Accept json
// @Produce json
// @Success 200 {array} domain.ModuleRelation
// @Failure 500 {object} apierrors.Error
// @Router /module/get_required_modules [POST]
func (c Module) RequiredModules(ctx context.Context) ([]domain.ModuleRelation, error) {
relations, err := c.service.RequiredModules(ctx)
if err != nil {
return nil, apierrors.NewInternalServiceError(err)
}
return relations, nil
}
// Connections
// @Summary Метод получения маршрутов
// @Description Возвращает все доступные роуты
+1 -1
View File
@@ -4,7 +4,7 @@ package api
import (
"context"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/grpc/apierrors"
_ "github.com/txix-open/isp-kit/grpc/apierrors"
"isp-config-service/domain"
+1 -1
View File
@@ -3,7 +3,7 @@ package controller
import (
"context"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/http/apierrors"
"isp-config-service/domain"
)
+1 -1
View File
@@ -3,10 +3,10 @@ package controller
import (
"context"
"github.com/pkg/errors"
"github.com/txix-open/etp/v4"
"github.com/txix-open/etp/v4/msg"
"github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/json"
"github.com/txix-open/isp-kit/log"
"isp-config-service/helpers"
+2 -44
View File
@@ -201,17 +201,6 @@ definitions:
$ref: '#/definitions/domain.Connection'
type: array
type: object
domain.ModuleRelation:
properties:
id:
type: string
name:
type: string
requiredModules:
items:
$ref: '#/definitions/domain.RequiredModuleType'
type: array
type: object
domain.PrometheusTargets:
properties:
labels:
@@ -233,13 +222,6 @@ definitions:
- keepVersions
- moduleName
type: object
domain.RequiredModuleType:
properties:
id:
type: string
name:
type: string
type: object
domain.SyncConfigRequest:
properties:
moduleName:
@@ -591,9 +573,7 @@ paths:
"200":
description: OK
"400":
description: '`errorCode: 2002` - конфиг не найден<br/>`errorCode: 2003`
- конфигурация нарушает политику секретных переменных (детали по путям
в `details`)<br/>'
description: '`errorCode: 2002` - конфиг не найден<br/>'
schema:
$ref: '#/definitions/github_com_txix-open_isp-kit_grpc_apierrors.Error'
"500":
@@ -657,8 +637,7 @@ paths:
$ref: '#/definitions/domain.Config'
"400":
description: '`errorCode: 2001` - модуль не найден<br/>`errorCode: 2002`
- конфиг не найден<br/>`errorCode: 2003` - в UI-экспонируемых полях активная
конфигурация ссылается на секретную переменную'
- конфиг не найден'
schema:
$ref: '#/definitions/github_com_txix-open_isp-kit_grpc_apierrors.Error'
"500":
@@ -768,27 +747,6 @@ paths:
summary: Метод полчения полной информации о состоянии модулей
tags:
- Модули
/module/get_required_modules:
post:
consumes:
- application/json
description: Возвращает список модулей с их зависимостями
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/domain.ModuleRelation'
type: array
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/github_com_txix-open_isp-kit_grpc_apierrors.Error'
summary: Метод для получения зависимостей модулей
tags:
- Модули
/routing/get_routes:
post:
consumes:
-11
View File
@@ -77,14 +77,3 @@ type ConfigSchema struct {
CreatedAt time.Time
UpdatedAt time.Time
}
type ModuleRelation struct {
Id string
Name string
RequiredModules []RequiredModuleType
}
type RequiredModuleType struct {
Id string
Name string
}
+1 -1
View File
@@ -1,7 +1,7 @@
package entity
import (
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
)
var (
+6 -13
View File
@@ -5,20 +5,13 @@ import (
"isp-config-service/entity/xtypes"
)
type VariableType = string
const (
SecretType VariableType = "SECRET"
TextType VariableType = "TEXT"
)
type Variable struct {
Name string `json:"name"`
Description string `json:"description"`
Type VariableType `json:"type"`
Value string `json:"value"`
CreatedAt xtypes.Time `json:"created_at"`
UpdatedAt xtypes.Time `json:"updated_at"`
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
Value string `json:"value"`
CreatedAt xtypes.Time `json:"created_at"`
UpdatedAt xtypes.Time `json:"updated_at"`
}
type ConfigHasVariable struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package xtypes
import (
"strconv"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/json"
)
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"strconv"
"time"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
)
type Time time.Time
+76 -74
View File
@@ -1,124 +1,126 @@
module isp-config-service
go 1.27
go 1.25.0
replace (
github.com/armon/go-metrics => github.com/hashicorp/go-metrics v0.5.1
github.com/mattn/go-sqlite3 => github.com/rqlite/go-sqlite3 v1.48.0
github.com/mattn/go-sqlite3 => github.com/rqlite/go-sqlite3 v1.42.0
golang.org/x/text => golang.org/x/text v0.3.8
)
require (
github.com/Masterminds/squirrel v1.5.4
github.com/google/uuid v1.6.0
github.com/pressly/goose/v3 v3.30.1
github.com/prometheus/client_golang v1.25.0
github.com/pkg/errors v0.9.1
github.com/pressly/goose/v3 v3.26.0
github.com/prometheus/client_golang v1.23.2
github.com/rqlite/gorqlite v0.0.0-20250609141355-ac86a4a1c9a8
github.com/rqlite/rqlite-disco-clients v0.0.0-20250205044118-8ada2b350099
github.com/rqlite/rqlite/v10 v10.2.7
github.com/stretchr/testify v1.12.1
github.com/rqlite/rqlite/v9 v9.3.2
github.com/stretchr/testify v1.11.1
github.com/tidwall/gjson v1.18.0
github.com/txix-open/etp/v4 v4.1.3
github.com/txix-open/etp/v4 v4.0.1
github.com/txix-open/go-cmp v0.0.0-20240401171944-16b203530f60
github.com/txix-open/isp-kit v1.31.5-0.20261127095759-c39408f3bd58
github.com/txix-open/isp-kit v1.64.11
github.com/xeipuuv/gojsonschema v1.2.0
golang.org/x/sync v0.25.0
google.golang.org/grpc v1.85.0
golang.org/x/sync v0.18.0
google.golang.org/grpc v1.77.0
)
require (
github.com/armon/go-metrics v0.6.0 // indirect
github.com/aws/aws-sdk-go-v2 v1.42.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 // indirect
github.com/aws/aws-sdk-go-v2/config v1.32.25 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.19.24 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.28 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.104.0 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 // indirect
github.com/aws/smithy-go v1.27.2 // indirect
github.com/armon/go-metrics v0.5.4 // indirect
github.com/aws/aws-sdk-go-v2 v1.40.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 // indirect
github.com/aws/aws-sdk-go-v2/config v1.32.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.19.0 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.91.1 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.4 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.8 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.41.1 // indirect
github.com/aws/smithy-go v1.23.2 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/buger/jsonparser v1.6.1 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coder/websocket v1.8.15 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.16 // indirect
github.com/getsentry/sentry-go v0.50.0 // indirect
github.com/go-faker/faker/v4 v4.12.0 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/coder/websocket v1.8.14 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.11 // indirect
github.com/getsentry/sentry-go v0.38.0 // indirect
github.com/go-faker/faker/v4 v4.7.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.2 // indirect
github.com/go-playground/universal-translator v0.18.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.34.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-metrics v0.6.0 // indirect
github.com/hashicorp/go-metrics v0.5.4 // indirect
github.com/hashicorp/go-msgpack v1.1.5 // indirect
github.com/hashicorp/go-msgpack/v2 v2.1.5 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/raft v1.7.3 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.20.4 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/leodido/go-urn v1.5.0 // indirect
github.com/mailru/easyjson v0.9.2 // indirect
github.com/mattn/go-colorable v0.1.15 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
github.com/mattn/go-sqlite3 v1.14.47 // indirect
github.com/mfridman/interpolate v0.2.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mailru/easyjson v0.9.1 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-sqlite3 v1.14.32 // indirect
github.com/mfridman/interpolate v0.0.2 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pandatix/go-abnf v0.5.5 // indirect
github.com/prometheus/client_model v0.6.3 // indirect
github.com/prometheus/common v0.74.0 // indirect
github.com/prometheus/procfs v0.23.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.67.3 // indirect
github.com/prometheus/procfs v0.19.2 // indirect
github.com/rqlite/raft-boltdb/v2 v2.0.0-20230523104317-c08e70f4de48 // indirect
github.com/rqlite/sql v0.0.0-20260224021119-1b2524a41372 // indirect
github.com/sethvargo/go-retry v0.5.0 // indirect
github.com/rqlite/sql v0.0.0-20251114131613-ef07423e7137 // indirect
github.com/sethvargo/go-retry v0.3.0 // indirect
github.com/tidwall/match v1.2.0 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/txix-open/bellows v1.2.0 // indirect
github.com/txix-open/jsonschema v1.3.0 // indirect
github.com/txix-open/validator/v10 v10.0.0-20261027072444-85f3391fc5c3 // indirect
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
go.etcd.io/bbolt v1.5.0 // indirect
go.etcd.io/bbolt v1.4.3 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.72.0 // indirect
go.opentelemetry.io/otel v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0 // indirect
go.opentelemetry.io/otel/log v1.47.0 // indirect
go.opentelemetry.io/otel/metric v1.47.0 // indirect
go.opentelemetry.io/otel/sdk v1.47.0 // indirect
go.opentelemetry.io/otel/trace v1.47.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect
go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.28.0 // indirect
go.yaml.in/yaml/v3 v3.0.6 // indirect
golang.org/x/crypto v0.59.0 // indirect
golang.org/x/net v0.63.0 // indirect
golang.org/x/sys v0.50.0 // indirect
golang.org/x/text v0.44.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20261118221215-c8830f628b3f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f // indirect
google.golang.org/protobuf v1.36.12 // indirect
go.uber.org/zap v1.27.1 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/net v0.47.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-20251111163417-95abcf5c77ba // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846 // indirect
google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
+240 -169
View File
@@ -1,3 +1,4 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM=
github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10=
@@ -5,46 +6,49 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/aws/aws-sdk-go-v2 v1.42.0 h1:XvXMJTkFQtpBKIWZnmr9ZEOc2InWM2yldjXEJ/bymhA=
github.com/aws/aws-sdk-go-v2 v1.42.0/go.mod h1:27+ACypSLljLAEKsCYOmrjKh83vuTRkuAe9Uv/3A4bg=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 h1:p1BBrg/Hhp6uK7zpejeI8QFXHJeC/mynzi04Sl03k9g=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13/go.mod h1:8cIfkE9MDhkRZGpQ22aV6/lkYeYSozpz16Smrs5x4Ls=
github.com/aws/aws-sdk-go-v2/config v1.32.25 h1:ACCejvStYoilgwrfegSt5ZntCbPrk52qfwyNcnl3omM=
github.com/aws/aws-sdk-go-v2/config v1.32.25/go.mod h1:LJyU8sDRbXUxFn8xMJIGP+v9QYYwveNLI8a/giAOiAs=
github.com/aws/aws-sdk-go-v2/credentials v1.19.24 h1:2hQqYCV9yqyePQ9o6dCrZc/zO8U3TwPr9mIKlZnPu/I=
github.com/aws/aws-sdk-go-v2/credentials v1.19.24/go.mod h1:IDwpACtwqHLISdzfwUUNq4P9DsB/h5BLg4FwJPNfqFY=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 h1:r6qZHbT+wxgWO/e9vYNUEtg7lv5+UN3pRqKhLXvnArg=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29/go.mod h1:QRnaRcTVGKPGRy8w78HMQtKUGRYcnMZAANATkeVA6Mo=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.28 h1:ez4y5o7sa0uaRI8BquYOXtZpioUPhbQEh7Igm88oV9U=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.28/go.mod h1:TpmZOrQA12XKEpVypgBGZSQBsm1WUTndCiSnbDsbvug=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 h1:f3vKqSo13fhTYb+JEcXwXefZQE26I1FB5eTSniU67ko=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29/go.mod h1:MzoLFUArKGpGD+ukmPiTPG1X5x4o6M2kq4v2dr1FiEc=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 h1:RdwIf/CuUsvJX3RgJagbOyotl/cxoLY4xviKuE7p2GY=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29/go.mod h1:71wt8W2EgswdZy9Mf9KNnzxZ3TiZlv4caKghPktDOkA=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 h1:VTGy885W5DKBxWRUJbym9hytNaYzsyaPkCHGRRMAOhU=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30/go.mod h1:AS0HycUvJRFvTt613AYDOgO2jzw+00cVSMny8XB3yMY=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 h1:ZD2+BSw9vFsNlKYIasSNt3uDbjqqXIBcM13UJv/Lx2k=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12/go.mod h1:Ms4zlcVBbXbiP7EVLhl+lgjvA/a7YphqQ3Ih3174EmI=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 h1:V51LGlOq/1VsDsHUdoklAQi7rMmx4qQubvFYAlP2254=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22/go.mod h1:4Pzhyz8hJOm2bepgl+NjvRx8vlUFAIIvJnZ/MkcNPpU=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 h1:DRebniUGZ2MqiiIVmQJ04vIXr918hubdHMnarSLEWyU=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29/go.mod h1:LfRkPCD8YHDM2E5eTkos2UpwYeZnBcVarTa8L59bJHA=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 h1:hiME6pBzC7OTl9LMtlyTWBuEl1f4QBcUmFDKC7MLXtc=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29/go.mod h1:G7RP+uhagpKtKhd1BM9N6JQqjCcGEU47K5lBVZQyRQw=
github.com/aws/aws-sdk-go-v2/service/s3 v1.104.0 h1:ta8csKy5vN91F3i5gGR85lFV0srBqySEji7Jroes6rE=
github.com/aws/aws-sdk-go-v2/service/s3 v1.104.0/go.mod h1:77ZAgynvx1txMvDG8gGWoWkO1augYDxkp9JElWFgjQU=
github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 h1:3nXpRcFwRCW8n7HgO2QGy0Dc20eQNfBuUemGQhpF8m8=
github.com/aws/aws-sdk-go-v2/service/signin v1.2.0/go.mod h1:LxYujSTLPRlp2vTtcUO/+1ilrew8ytt6SvQyOgejzFQ=
github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 h1:ey1XLTYXb9PcLt4535632o5kCGXNXEhNb620Dqwuylo=
github.com/aws/aws-sdk-go-v2/service/sso v1.31.3/go.mod h1:Lk7PlmoTYryQmyBG0EXqj5BcUbj3whXdU2s3yGI3EAc=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 h1:yLr03zQE/5Eu5l3QU0Si+xMbLMbSDF2YXsigqXngs6g=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6/go.mod h1:Q5N6icH+KJZDLh+ESNwzdv6cZ6vLFF/egy3IOxWhmz4=
github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 h1:VrIhKRCSK1umelSgB9RghvA9RTUYeQffyAS5ApXehNI=
github.com/aws/aws-sdk-go-v2/service/sts v1.43.3/go.mod h1:r8wkDOuLaaMFqFiYAb8dGY2A3gJCOujMc6CFOVC4Zhc=
github.com/aws/smithy-go v1.27.2 h1:y9NPmSE6am6LjEFPfqHqG/jJk7AauQvhCJONKh7kpzk=
github.com/aws/smithy-go v1.27.2/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/aws/aws-sdk-go-v2 v1.40.0 h1:/WMUA0kjhZExjOQN2z3oLALDREea1A7TobfuiBrKlwc=
github.com/aws/aws-sdk-go-v2 v1.40.0/go.mod h1:c9pm7VwuW0UPxAEYGyTmyurVcNrbF6Rt/wixFqDhcjE=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 h1:DHctwEM8P8iTXFxC/QK0MRjwEpWQeM9yzidCRjldUz0=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3/go.mod h1:xdCzcZEtnSTKVDOmUZs4l/j3pSV6rpo1WXl5ugNsL8Y=
github.com/aws/aws-sdk-go-v2/config v1.32.0 h1:T5WWJYnam9SzBLbsVYDu2HscLDe+GU1AUJtfcDAc/vA=
github.com/aws/aws-sdk-go-v2/config v1.32.0/go.mod h1:pSRm/+D3TxBixGMXlgtX4+MPO9VNtEEtiFmNpxksoxw=
github.com/aws/aws-sdk-go-v2/credentials v1.19.0 h1:7zm+ez+qEqLaNsCSRaistkvJRJv8sByDOVuCnyHbP7M=
github.com/aws/aws-sdk-go-v2/credentials v1.19.0/go.mod h1:pHKPblrT7hqFGkNLxqoS3FlGoPrQg4hMIa+4asZzBfs=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14 h1:WZVR5DbDgxzA0BJeudId89Kmgy6DIU4ORpxwsVHz0qA=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14/go.mod h1:Dadl9QO0kHgbrH1GRqGiZdYtW5w+IXXaBNCHTIaheM4=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.9 h1:luPCleinMpiPLuC73psYTKmrIVpQ9NhmyNxNGIPkcUE=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.9/go.mod h1:szPVaB6mJ+FuNpHH8LTG32DP6Abr+aGEMdDAyFl5klE=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 h1:PZHqQACxYb8mYgms4RZbhZG0a7dPW06xOjmaH0EJC/I=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14/go.mod h1:VymhrMJUWs69D8u0/lZ7jSB6WgaG/NqHi3gX0aYf6U0=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 h1:bOS19y6zlJwagBfHxs0ESzr1XCOU2KXJCWcq3E2vfjY=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14/go.mod h1:1ipeGBMAxZ0xcTm6y6paC2C/J6f6OO7LBODV9afuAyM=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 h1:WKuaxf++XKWlHWu9ECbMlha8WOEGm0OUEZqm4K/Gcfk=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4/go.mod h1:ZWy7j6v1vWGmPReu0iSGvRiise4YI5SkR3OHKTZ6Wuc=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14 h1:ITi7qiDSv/mSGDSWNpZ4k4Ve0DQR6Ug2SJQ8zEHoDXg=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14/go.mod h1:k1xtME53H1b6YpZt74YmwlONMWf4ecM+lut1WQLAF/U=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 h1:x2Ibm/Af8Fi+BH+Hsn9TXGdT+hKbDd5XOTZxTMxDk7o=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3/go.mod h1:IW1jwyrQgMdhisceG8fQLmQIydcT/jWY21rFhzgaKwo=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5 h1:Hjkh7kE6D81PgrHlE/m9gx+4TyyeLHuY8xJs7yXN5C4=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5/go.mod h1:nPRXgyCfAurhyaTMoBMwRBYBhaHI4lNPAnJmjM0Tslc=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14 h1:FIouAnCE46kyYqyhs0XEBDFFSREtdnr8HQuLPQPLCrY=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14/go.mod h1:UTwDc5COa5+guonQU8qBikJo1ZJ4ln2r1MkF7Dqag1E=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14 h1:FzQE21lNtUor0Fb7QNgnEyiRCBlolLTX/Z1j65S7teM=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14/go.mod h1:s1ydyWG9pm3ZwmmYN21HKyG9WzAZhYVW85wMHs5FV6w=
github.com/aws/aws-sdk-go-v2/service/s3 v1.91.1 h1:f3CVT98cvySOZslMZHusyQHTMY8Xt+F1i0YaR6oEJ4s=
github.com/aws/aws-sdk-go-v2/service/s3 v1.91.1/go.mod h1:wYNqY3L02Z3IgRYxOBPH9I1zD9Cjh9hI5QOy/eOjQvw=
github.com/aws/aws-sdk-go-v2/service/signin v1.0.1 h1:BDgIUYGEo5TkayOWv/oBLPphWwNm/A91AebUjAu5L5g=
github.com/aws/aws-sdk-go-v2/service/signin v1.0.1/go.mod h1:iS6EPmNeqCsGo+xQmXv0jIMjyYtQfnwg36zl2FwEouk=
github.com/aws/aws-sdk-go-v2/service/sso v1.30.4 h1:U//SlnkE1wOQiIImxzdY5PXat4Wq+8rlfVEw4Y7J8as=
github.com/aws/aws-sdk-go-v2/service/sso v1.30.4/go.mod h1:av+ArJpoYf3pgyrj6tcehSFW+y9/QvAY8kMooR9bZCw=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.8 h1:MvlNs/f+9eM0mOjD9JzBUbf5jghyTk3p+O9yHMXX94Y=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.8/go.mod h1:/j67Z5XBVDx8nZVp9EuFM9/BS5dvBznbqILGuu73hug=
github.com/aws/aws-sdk-go-v2/service/sts v1.41.1 h1:GdGmKtG+/Krag7VfyOXV17xjTCz0i9NT+JnqLTOI5nA=
github.com/aws/aws-sdk-go-v2/service/sts v1.41.1/go.mod h1:6TxbXoDSgBQ225Qd8Q+MbxUxUh6TtNKwbRt/EPS9xso=
github.com/aws/smithy-go v1.23.2 h1:Crv0eatJUQhaManss33hS5r40CG3ZFH+21XSkqMrIUM=
github.com/aws/smithy-go v1.23.2/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0=
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@@ -52,8 +56,10 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
github.com/buger/jsonparser v1.6.1 h1:I0phFv0PlbLHnM7TZAVjZ2MJ2/eWRTDyuO7GLR98IEs=
github.com/buger/jsonparser v1.6.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
@@ -61,40 +67,46 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA=
github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.1.0 h1:dbKTrvD0klcbBV/h4AWJdMuZogJACoMlvWIWZ5b2xWg=
github.com/dustin/go-humanize v1.1.0/go.mod h1:hc1CvRkJMsgxqjmjMQF3QNRAZBwY8AXBAzKYoSX9sFI=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w=
github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE=
github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc=
github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE=
github.com/gabriel-vasile/mimetype v1.4.16 h1:5izNFuvA37st1dDRAcA7TtmngBmRgiIPDmTtiEvjx1E=
github.com/gabriel-vasile/mimetype v1.4.16/go.mod h1:3oFFwxX8kTklZwzIl2aQEDZT0lKY8xH92ST88bAwba4=
github.com/getsentry/sentry-go v0.50.0 h1:gkO59rn/i0RCAXUUTflC5QVbTQGPXbaFabs2olVzc9g=
github.com/getsentry/sentry-go v0.50.0/go.mod h1:+xsDuN+SoRN/xfs1hdq78wnrE3omIZf+FCuh9FOW1C8=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/gabriel-vasile/mimetype v1.4.11 h1:AQvxbp830wPhHTqc1u7nzoLT+ZFxGY7emj5DR5DYFik=
github.com/gabriel-vasile/mimetype v1.4.11/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
github.com/getsentry/sentry-go v0.38.0 h1:S8Xui7gLeAvXINVLMOaX94HnsDf1GexnfXGSNC4+KQs=
github.com/getsentry/sentry-go v0.38.0/go.mod h1:eRXCoh3uvmjQLY6qu63BjUZnaBu5L5WhMV1RwYO8W5s=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-faker/faker/v4 v4.12.0 h1:yZXxuoQjxN+C2PVgYoDSHGiD9wj6dX1/Ful4p7QQV0k=
github.com/go-faker/faker/v4 v4.12.0/go.mod h1:VFIEwWDd16EdYDLF6NJ5gAAzEp7vz5LgKgJ2iZ17Tdg=
github.com/go-faker/faker/v4 v4.7.0 h1:VboC02cXHl/NuQh5lM2W8b87yp4iFXIu59x4w0RZi4E=
github.com/go-faker/faker/v4 v4.7.0/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7BdxkcWk7tiKQXk=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8=
github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.2 h1:d8UmcrM6Nip0hfGZKLGpAvZH37XB4TS0xzK9B56YNCY=
github.com/go-playground/locales v0.14.2/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.2 h1:LCsMLC9RzmbUMNUPVYD15dmcjwYAJhmX8mPZRW4rAVU=
github.com/go-playground/universal-translator v0.18.2/go.mod h1:67VZIMp5lQpDWlnStOct22q1bkdJGJqHghbOtmkawxk=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM=
github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
@@ -102,17 +114,27 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.34.0 h1:vzlTzzi4tHLa/JQdIE5LeXw6SEX5EVVhq/VPqKHnKOk=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.34.0/go.mod h1:FHXQZnW5pA0txiMr3jApv9uNJzZ+7mYZd+u+PPenCFU=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 h1:NmZ1PKzSTQbuGHw9DGPFomqkkLWMC+vZCkfs+FHv1Vg=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
@@ -122,8 +144,8 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-metrics v0.5.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/Hqck/U=
github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE=
github.com/hashicorp/go-metrics v0.6.0 h1:+kjWqHRH2HxAocneVfB/BI6EeWUUHyPhyQZozMT8Ed4=
github.com/hashicorp/go-metrics v0.6.0/go.mod h1:0B52B5pZ7+qm5Zhzs8Fygr87isvmUgr0Zv9rmJ9qsnQ=
github.com/hashicorp/go-metrics v0.5.4 h1:8mmPiIJkTPPEbAiV97IxdAGNdRdaWwVap1BU6elejKY=
github.com/hashicorp/go-metrics v0.5.4/go.mod h1:CG5yz4NZ/AI/aQt9Ucm/vdBnbh7fvmv4lxZ350i+QQI=
github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-msgpack v1.1.5 h1:9byZdVjKTe5mce63pRVNP1L7UAmdHOTEMGehn6KvJWs=
github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4=
@@ -140,16 +162,20 @@ github.com/hashicorp/raft v1.1.0/go.mod h1:4Ak7FSPnuvmb0GV6vgIAJ4vYT4bek9bb6Q+7H
github.com/hashicorp/raft v1.7.3 h1:DxpEqZJysHN0wK+fviai5mFcSYsCkNpFUl1xpAW8Rbo=
github.com/hashicorp/raft v1.7.3/go.mod h1:DfvCGFxpAUPE0L4Uc8JLlTPtc3GzSbdH0MTJCLgnmJQ=
github.com/hashicorp/raft-boltdb v0.0.0-20210409134258-03c10cc3d4ea/go.mod h1:qRd6nFJYYS6Iqnc/8HcUmko2/2Gw8qTFEmxDLii6W5I=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/klauspost/compress v1.20.4 h1:dD0v/bvxtjCBqQu6sx1TNWkalEY5lNTIe+HY9w8TeNI=
github.com/klauspost/compress v1.20.4/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI=
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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
@@ -164,21 +190,21 @@ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o=
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk=
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw=
github.com/leodido/go-urn v1.5.0 h1:pLqT2kq1zpHW/1D18QMjMpdtX7cekxqtJJjg5ANyWw0=
github.com/leodido/go-urn v1.5.0/go.mod h1:9BORnCDhdPBJNDEX+w1bJisa8yOKYi116VeO96s4ifE=
github.com/mailru/easyjson v0.9.2 h1:dX8U45hQsZpxd80nLvDGihsQ/OxlvTkVUXH2r/8cb2M=
github.com/mailru/easyjson v0.9.2/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8=
github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.15 h1:+u9SLTRGnXv73cEsnsmoZBom+dMU88B2M0aDcWy0/jY=
github.com/mattn/go-colorable v0.1.15/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI=
github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mfridman/interpolate v0.2.0 h1:HM9ID8p6CUxoMJX+fECOtGQ2Mu7TW/GIMPyu48nnvUg=
github.com/mfridman/interpolate v0.2.0/go.mod h1:8SfDy95IaPNnIokZh9mvIppmc3fGl8fx+Gu7uusuO9Q=
github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY=
github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -191,10 +217,9 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/ncruces/go-strftime v1.1.0 h1:vtPmPWMkb539RGV9WpWT9EwJGvrOCKvMNI4obWL47Hk=
github.com/ncruces/go-strftime v1.1.0/go.mod h1:yVaq7iwCN09vHRrKBrrflXT0M9tTMG2KmZ9Fj7xeG/g=
github.com/pandatix/go-abnf v0.5.5 h1:EXex5KkRQx4Dm6GnpAcQnIMBs9KiK0uf8p/wq+4t9PM=
github.com/pandatix/go-abnf v0.5.5/go.mod h1:AE0KD3/VNoCjGzc1gqetRKshbI4SYErXQ/8kPenR5mc=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
@@ -204,49 +229,58 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pressly/goose/v3 v3.30.1 h1:KO28meBdbAUIdMbTP7bl9dp1FYZGXcYWb2O7miT09lE=
github.com/pressly/goose/v3 v3.30.1/go.mod h1:CHGwuG2acDerUaXwz2i5T18VSauXpYDiL4WxzDvcOIM=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jpmM=
github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
github.com/prometheus/client_golang v1.25.0 h1:cDtW1TcFsMi1RJc8khwCKB4VhzwV04aKqbYtNOXuiK0=
github.com/prometheus/client_golang v1.25.0/go.mod h1:j2X/4/kaQHLPnmyEU8zjmkndo1T317VpCIQEml8LTKk=
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.6.3 h1:O0jaTVAYNxTHYInEPFJt5I3+sN8zqBtVMPTB1qyxiEo=
github.com/prometheus/client_model v0.6.3/go.mod h1:gpN5P9S7Rr6Yr92PiQ+Ixvhf6JZEkF1dnxsYL2aPBEM=
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
github.com/prometheus/common v0.74.0 h1:6iYW8MsYvmEnXFD9zLGgF0qmReaRhs3OMONu1c/nrLI=
github.com/prometheus/common v0.74.0/go.mod h1:i/02C+FCst5B1etKgWesNrD49n+onplJCqUCtUKkOeA=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
github.com/prometheus/common v0.67.3 h1:shd26MlnwTw5jksTDhC7rTQIteBxy+ZZDr3t7F2xN2Q=
github.com/prometheus/common v0.67.3/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/prometheus/procfs v0.23.0 h1:ad+S6FTkzwaMgacKLM5h6bNKExS+DMH0YiUwXItH/o4=
github.com/prometheus/procfs v0.23.0/go.mod h1:3AVXO0FqLafyYFU/V/IQRZlC8Rgqz8Dm/x6pKLK+RIk=
github.com/rabbitmq/amqp091-go v1.17.0 h1:6KmTqrnJq93cGIE3Q3UnXgsqw6NtLu8MNfFoIbfBAIQ=
github.com/rabbitmq/amqp091-go v1.17.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws=
github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw=
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/rqlite/go-sqlite3 v1.48.0 h1:3z/QU1WEFrywWvhjhLvZ+SBkaoIQZtkNcHgpCaxE1eg=
github.com/rqlite/go-sqlite3 v1.48.0/go.mod h1:XIq9SQymduohsJwPy++jWepF9QJ5gT/S3SkUivYSVZ0=
github.com/rqlite/go-sqlite3 v1.42.0 h1:xfOaauBRqJyww/6g2z910/p3gyw/vjb2GgQYKfrZSrU=
github.com/rqlite/go-sqlite3 v1.42.0/go.mod h1:R9H7CatgYBt3c+fSV/5yo2vLh4ZjCB0aMHdkv69fP4A=
github.com/rqlite/gorqlite v0.0.0-20250609141355-ac86a4a1c9a8 h1:BoxiqWvhprOB2isgM59s8wkgKwAoyQH66Twfmof41oE=
github.com/rqlite/gorqlite v0.0.0-20250609141355-ac86a4a1c9a8/go.mod h1:xF/KoXmrRyahPfo5L7Szb5cAAUl53dMWBh9cMruGEZg=
github.com/rqlite/raft-boltdb/v2 v2.0.0-20230523104317-c08e70f4de48 h1:NZ62M+kT0JqhyFUMc8I4SMmfmD4NGJxhb2ePJQXjryc=
github.com/rqlite/raft-boltdb/v2 v2.0.0-20230523104317-c08e70f4de48/go.mod h1:CRnsxgy5G8fAf5J+AM0yrsSdxXHKkIYOaq2sm+Q4DYc=
github.com/rqlite/rqlite-disco-clients v0.0.0-20250205044118-8ada2b350099 h1:5cqkVLdl6sGJSY3kiF2dqaA3bD+8OS5FUdZqO0BxXLU=
github.com/rqlite/rqlite-disco-clients v0.0.0-20250205044118-8ada2b350099/go.mod h1:6SVI8KegsW9Fyu2UQ+uvw0JI5CAILRYRyiQ/OFSJPrs=
github.com/rqlite/rqlite/v10 v10.2.7 h1:fUsbbgoELw+MrKfQ9EkVrm8tA0rdVUe/bYYdtOOsnx4=
github.com/rqlite/rqlite/v10 v10.2.7/go.mod h1:iTG1rLhR0zBBWTHiN33b9o/HXVwaC71xrcdoFaUJecE=
github.com/rqlite/sql v0.0.0-20260224021119-1b2524a41372 h1:2V0y6mzmPj7vQKad76nTL7sZ/lFLj5VKvNjpa6IRxYE=
github.com/rqlite/sql v0.0.0-20260224021119-1b2524a41372/go.mod h1:ib9zVtNgRKiGuoMyUqqL5aNpk+r+++YlyiVIkclVqPg=
github.com/sethvargo/go-retry v0.5.0 h1:JYfFKmVJ8ER06GReN1efzc5cm52BrVsFVzmcHiKJwfY=
github.com/sethvargo/go-retry v0.5.0/go.mod h1:tvsjdKG6xfiCx4LSiUZ06kcv38xvdVQwv8R6/VnnVWg=
github.com/rqlite/rqlite/v9 v9.3.2 h1:/gpsmjbKqRTb4LEF0G5ik0g3jxKFmvMKK3L11Rk6UYE=
github.com/rqlite/rqlite/v9 v9.3.2/go.mod h1:2TBF943qiqoJI+4/o46Rfgec2il/IL6hjlqHXvj0uII=
github.com/rqlite/sql v0.0.0-20251114131613-ef07423e7137 h1:OG5MfYAA0yaWgllfPdOq9Xa2bo1vpurCNx1LWz7+Zh0=
github.com/rqlite/sql v0.0.0-20251114131613-ef07423e7137/go.mod h1:ib9zVtNgRKiGuoMyUqqL5aNpk+r+++YlyiVIkclVqPg=
github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE=
github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
@@ -260,8 +294,8 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=
github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
@@ -273,20 +307,20 @@ github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhso
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/txix-open/bellows v1.2.0 h1:CXv8nQaZtB/micraeRilYyj/gtfv+bqBgP5aPYQgjeY=
github.com/txix-open/bellows v1.2.0/go.mod h1:qbKCy+RTgD30Qpw1fyb3y3jp5Y9mGhLLxgae1l0W92o=
github.com/txix-open/etp/v4 v4.1.3 h1:u9ZyU2yKGgoQ1/DSaElhazWm8xASdqGEdWjoJ2xQlfo=
github.com/txix-open/etp/v4 v4.1.3/go.mod h1:9GK+Aje8BmLFq8Hk4j6Qb976LdU9WECCWAuLK1vAKgM=
github.com/txix-open/etp/v4 v4.0.1 h1:5VSYgGsvnMz0tvUHsjVWFETI0qWBTCF1O3ARCHaCIgA=
github.com/txix-open/etp/v4 v4.0.1/go.mod h1:FIu7TUDdwcgmtmF6tFTV1bGA2fRY/iVaPQdsGzvqYc8=
github.com/txix-open/go-cmp v0.0.0-20240401171944-16b203530f60 h1:7SZ72lNU69g8eiT5rcRh1ubATZPs/J05NEIN7E47TYM=
github.com/txix-open/go-cmp v0.0.0-20240401171944-16b203530f60/go.mod h1:jzpq0uwcdGq0OSNXZ6vv6UJkCOU/fLPgeoz+KkGDYgo=
github.com/txix-open/grmq v1.12.0 h1:lSPYvwLfTL0+b0xDQmuuN6RaKS3NCEJNK9ccWpOWa8Y=
github.com/txix-open/grmq v1.12.0/go.mod h1:6m9CCTQao/HAFalu5rFOZGJ5KLEP6WzzIwj80Ml3KGE=
github.com/txix-open/isp-kit v1.31.5-0.20261127095759-c39408f3bd58 h1:huhPwzaU5BBwfhXD0vkBNBNv1xhjvAvplEZ/dOK1osQ=
github.com/txix-open/isp-kit v1.31.5-0.20261127095759-c39408f3bd58/go.mod h1:hR9iAlh3x9gEg5GfALrrkN/2SbGkgZQCmwO2GZWjC1M=
github.com/txix-open/isp-kit v1.77.0 h1:gAUyLrnHUSpr06CPNIL+atiSnKFhaM05UtjfSSP8m68=
github.com/txix-open/isp-kit v1.77.0/go.mod h1:hR9iAlh3x9gEg5GfALrrkN/2SbGkgZQCmwO2GZWjC1M=
github.com/txix-open/grmq v1.9.0 h1:ArDbJJcFX9zXKEcPf49rp9nYiRyGMJxGKJAxdbSsfaM=
github.com/txix-open/grmq v1.9.0/go.mod h1:EyFOP17KrwEFOUjR+PH8iH3LCtiN9TSQ8t0ysyk62po=
github.com/txix-open/isp-kit v1.64.10 h1:lAowLtShBbICZbOWQJ4ptr9LaKKRZ7CE5DBK+7LcLqM=
github.com/txix-open/isp-kit v1.64.10/go.mod h1:GvBsX5p2U3/ugK6PuWANYzSy/4YgawROm3eAKb35G6o=
github.com/txix-open/isp-kit v1.64.11 h1:K7RILD1of3iUYRFVCMw+S0epxo4CnL6KoYo8lNUi4Tk=
github.com/txix-open/isp-kit v1.64.11/go.mod h1:GvBsX5p2U3/ugK6PuWANYzSy/4YgawROm3eAKb35G6o=
github.com/txix-open/jsonschema v1.3.0 h1:XGuOTg22G7PdqfKypjajM20/i5FyGfFYsJKmheebKi4=
github.com/txix-open/jsonschema v1.3.0/go.mod h1:l8YDZ1nvJrw6uxWowSVOxCV/ebiMJyapffW87ZEqH00=
github.com/txix-open/validator/v10 v10.0.0-20261027072444-85f3391fc5c3 h1:1jE11HLmMHDYYAcE+UmQ5VHgz4stzz0+daJbDWS+sEs=
github.com/txix-open/validator/v10 v10.0.0-20261027072444-85f3391fc5c3/go.mod h1:Yf41v210LFyYAj+tGmDh7PHdGsTaZjdBzHG0ptUvihw=
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb h1:UJgT4u/QMv5QHKOQeJ7igShHa36c2/vIRqJiRLdDlf0=
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb/go.mod h1:0biAFE0bgbcKeBBAwgEDhbZz6uT1vuSETCrFQlv2RiA=
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
@@ -296,86 +330,122 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
go.etcd.io/bbolt v1.5.0 h1:S7GAl7Fxv12yohbwFfIbQCGDWbQbtDGPET4P/bD4lxU=
go.etcd.io/bbolt v1.5.0/go.mod h1:mkltfYE5aUHQxUct9N9V+Kp7aSjFqjgrhcXIS70Lrdk=
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.72.0 h1:jva1c3z2ZFEQ5sTvnLG2tBALNehO+QvdXKQii6eKRoo=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.72.0/go.mod h1:3pjFS5EnOVfjvYO6/NMdtJFHFQR+8uiGtrZ965nZP4w=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0 h1:LxwW/9ctSCv+QkE/cLR7M91ZIkXNMqJtEMi1vCw9U8s=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0/go.mod h1:tOsftB4SslBwwErVEPaenU2RpThXWPIU8DoJHEC4dyw=
go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM=
go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 h1:julhjPeUH/q/7hinbSdDdqt5h7Zw9YWmRlWRhI0jd54=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0/go.mod h1:Ao2mz688LH/tFf0yMAenidq6k2YNSx6SIY2q6jDACck=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0 h1:aXZXsZ012wOgVkqaiQv+Z/d8V0xKjmg70F6m4CE94lc=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0/go.mod h1:ziu1gUIJhAaxM3EV1e3Ralk5AAyL1UOYz3lJJ4VSI38=
go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI=
go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw=
go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY=
go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU=
go.opentelemetry.io/otel/sdk v1.47.0 h1:zWXEr4j2lFefG87TU6Yg8a7ngfohIKFZHKp0Hf5hC6I=
go.opentelemetry.io/otel/sdk v1.47.0/go.mod h1:VUc24kiOeoGsxG8G9ULx3fWKvB7jMhnGE8Oi607lgR0=
go.opentelemetry.io/otel/sdk/metric v1.47.0 h1:lfISg2j93VT6yqdk9OfUaZmw/GfcZqCCV3jdXtsPnKw=
go.opentelemetry.io/otel/sdk/metric v1.47.0/go.mod h1:ypLp+mW1Nt2x+Szt3b5/i1syodyts49lMOwxpDI3VGw=
go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM=
go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0=
go.opentelemetry.io/proto/otlp v1.11.1 h1:SCrPqH9NE5CmBrOqpjNCiT0X5mGwMyGERXdogfR7Yjw=
go.opentelemetry.io/proto/otlp v1.11.1/go.mod h1:wq8W4aSf6bOy8RZyESOeQFr9Pu7wydWX/TY4sgvrTPg=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 h1:2pn7OzMewmYRiNtv1doZnLo3gONcnMHlFnmOR8Vgt+8=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0/go.mod h1:rjbQTDEPQymPE0YnRQp9/NuPwwtL0sesz/fnqRW/v84=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 h1:aTL7F04bJHUlztTsNGJ2l+6he8c+y/b//eR0jjjemT4=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4=
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A=
go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo=
go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q=
go.yaml.in/yaml/v2 v2.4.5 h1:a5nxWvYi94DRl6QSLlTbLpVmutgx2qg8EVjnJtuFpwI=
go.yaml.in/yaml/v2 v2.4.5/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
go.yaml.in/yaml/v3 v3.0.6 h1:zcDfvjXEqTQmpjniUBLc91xYJMB2c4QOFxEF/LCEckM=
go.yaml.in/yaml/v3 v3.0.6/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.59.0 h1:xS2jhqYbzNrpvkWP2YTDf4TJwBy3ykR03i8vFDxEc7c=
golang.org/x/crypto v0.59.0/go.mod h1:veDyUwATGs3c+vN3VfTbzViMGXeTBk3WyhBOkn+F/4U=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/exp v0.0.0-20251017212417-90e834f514db h1:by6IehL4BH5k3e3SJmcoNbOobMey2SLpAF79iPOEBvw=
golang.org/x/exp v0.0.0-20251017212417-90e834f514db/go.mod h1:j/pmGrbnkbPtQfxEe5D0VQhZC6qKbfKifgD0oM7sR70=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.63.0 h1:HCoTmNh9EpD1PpK8gBNFY4gcTY4N+KQEO8ylfIKqFJ0=
golang.org/x/net v0.63.0/go.mod h1:15JLg3IX1bLjHK264EZQEbIpTiR/KVLuo9CTRWd0pig=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
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.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.25.0 h1:dJnifr0nMV8/SBnBvdo4eSGGnrc3O4FFx6IqvtLcmRs=
golang.org/x/sync v0.25.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/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.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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs=
golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo=
golang.org/x/text v0.44.0/go.mod h1:S4FR1waQ9LbjQTls97SyRjDaUUVkaM+cXwwuG/G+MwY=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
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/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/tools v0.0.0-20190424220101-1e8e1cfdf96b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
google.golang.org/genproto/googleapis/api v0.0.0-20261118221215-c8830f628b3f h1:7CbYDSDM5xqpq8v2tNm+Q057COf1lvA0gorVk+304tY=
google.golang.org/genproto/googleapis/api v0.0.0-20261118221215-c8830f628b3f/go.mod h1:CPxXEEQ1S9iJmInAF/8MNc8tKWnya8I8Kni9Zh2hV0M=
google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f h1:aDW6Vb2T1K0xbAgW+ED8iz39WlgjjX/OKiNh6tXv/+g=
google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc=
google.golang.org/grpc v1.85.0 h1:BPBCfuVRQ1qvBhKDOq9uvQllMvO59rKsYhXpp7Dd8vw=
google.golang.org/grpc v1.85.0/go.mod h1:0rQrOD58yjal/0EaVbGBANindixsCZNQPDV3VKtaKuQ=
google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba h1:B14OtaXuMaCQsl2deSvNkyPKIzq3BjfxQp8d00QyWx4=
google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba/go.mod h1:G5IanEx8/PgI9w6CFcYQf7jMtHQhZruvfM1i3qOqk5U=
google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846 h1:Wgl1rcDNThT+Zn47YyCXOXyX/COgMTIdhJ717F0l4xk=
google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM=
google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -387,14 +457,15 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
modernc.org/libc v1.80.2 h1:3+a4fJZvvzg920ZC0mOepnKPGn7cqCaVeDxm/UnrM1A=
modernc.org/libc v1.80.2/go.mod h1:pvo25Rs3OJEbDqhUV9jdEGevxeLJrJeDmNid/AcQV1g=
modernc.org/libc v1.66.3 h1:cfCbjTUcdsKyyZZfEUKfoHcP3S0Wkvz3jgSzByEWVCQ=
modernc.org/libc v1.66.3/go.mod h1:XD9zO8kt59cANKvHPXpx7yS2ELPheAey0vjIuZOhOU8=
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
modernc.org/memory v1.12.1 h1:nFMiWrpStgZczNl6XI9GnIk/rWhYIyHGUaR04pGbp9g=
modernc.org/memory v1.12.1/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
modernc.org/sqlite v1.62.0 h1:gMaCjSM1qpl+iOjiWhR1LYP3zqrYDI+5GYLGt6veP2g=
modernc.org/sqlite v1.62.0/go.mod h1:Jzjh1mt4s0HuQ0KvtB1LIuHiGRmU2D5pgj8dUhW7/SE=
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
modernc.org/sqlite v1.38.2 h1:Aclu7+tgjgcQVShZqim41Bbw9Cho0y/7WzYptXqkEek=
modernc.org/sqlite v1.38.2/go.mod h1:cPTJYSlgg3Sfg046yBShXENNtPrWrDX8bsbAQBzgQ5E=
+1 -1
View File
@@ -3,9 +3,9 @@ package helpers
import (
"net"
"github.com/pkg/errors"
"github.com/txix-open/etp/v4"
"github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/log"
"isp-config-service/entity"
)
+1 -6
View File
@@ -26,12 +26,7 @@ var (
//go:generate swag init --parseDependency
//go:generate rm -f docs/swagger.json docs/docs.go
func main() {
boot := bootstrap.New(
version,
conf.Remote{},
cluster.Endpoints(routes.EndpointDescriptors()),
cluster.GrpcTransport,
)
boot := bootstrap.New(version, conf.Remote{}, routes.EndpointDescriptors(), cluster.GrpcTransport)
app := boot.App
logger := app.Logger()
+1 -2
View File
@@ -2,7 +2,6 @@ package middlewares
import (
"context"
"slices"
"github.com/txix-open/etp/v4"
@@ -28,7 +27,7 @@ func EtpLogger(logger log.Logger) EtpMiddleware {
//nolint:ireturn
func EtpChain(root etp.Handler, middlewares ...EtpMiddleware) etp.Handler {
for i := range slices.Backward(middlewares) {
for i := len(middlewares) - 1; i >= 0; i-- {
root = middlewares[i](root)
}
return root
+6 -25
View File
@@ -4,12 +4,11 @@ import (
"context"
"fmt"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
"isp-config-service/entity"
"isp-config-service/middlewares/sql_metrics"
"isp-config-service/service/rqlite/db"
"github.com/Masterminds/squirrel"
"github.com/txix-open/isp-kit/errors"
)
type Backend struct {
@@ -22,8 +21,8 @@ func NewBackend(db db.DB) Backend {
}
}
func (r Backend) Upsert(ctx context.Context, backend entity.Backend) error {
ctx = sql_metrics.OperationLabelToContext(ctx, "Backend.Upsert")
func (r Backend) Insert(ctx context.Context, backend entity.Backend) error {
ctx = sql_metrics.OperationLabelToContext(ctx, "Backend.Insert")
query, args, err := squirrel.Insert(Table("backend")).
Columns("ws_connection_id", "module_id", "address",
@@ -35,13 +34,6 @@ func (r Backend) Upsert(ctx context.Context, backend entity.Backend) error {
backend.ConfigServiceNodeId, backend.Endpoints, backend.RequiredModules,
backend.MetricsAutodiscovery,
).
Suffix(`on conflict (ws_connection_id) do update
set module_id = excluded.module_id, address = excluded.address,
version = excluded.version, lib_version = excluded.lib_version,
module_name = excluded.module_name, transport = excluded.transport,
config_service_node_id = excluded.config_service_node_id,
endpoints = excluded.endpoints, required_modules = excluded.required_modules,
metrics_autodiscovery = excluded.metrics_autodiscovery`).
ToSql()
if err != nil {
return errors.WithMessage(err, "build query")
@@ -101,7 +93,6 @@ func (r Backend) DeleteByConfigServiceNodeId(ctx context.Context, configServiceN
func (r Backend) GetByConfigServiceNodeId(ctx context.Context, configServiceNodeId string) ([]entity.Backend, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Backend.GetByConfigServiceNodeId")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("backend")).
Where(squirrel.Eq{
@@ -125,17 +116,8 @@ func (r Backend) All(ctx context.Context) ([]entity.Backend, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Backend.All")
result := make([]entity.Backend, 0)
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("backend")).
OrderBy("created_at desc").
ToSql()
if err != nil {
return nil, errors.WithMessage(err, "build query")
}
err = r.db.Select(ctx, &result, query, args...)
query := fmt.Sprintf("SELECT * FROM %s order by created_at desc", Table("backend"))
err := r.db.Select(ctx, &result, query)
if err != nil {
return nil, errors.WithMessagef(err, "select: %s", query)
}
@@ -145,7 +127,6 @@ func (r Backend) All(ctx context.Context) ([]entity.Backend, error) {
func (r Backend) GetByModuleId(ctx context.Context, moduleId string) ([]entity.Backend, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Backend.GetByModuleId")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("backend")).
Where(squirrel.Eq{
+1 -4
View File
@@ -5,7 +5,7 @@ import (
"fmt"
"github.com/Masterminds/squirrel"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"isp-config-service/domain"
"isp-config-service/entity"
"isp-config-service/entity/xtypes"
@@ -46,7 +46,6 @@ func (r Config) Insert(ctx context.Context, cfg entity.Config) error {
func (r Config) GetActive(ctx context.Context, moduleId string) (*entity.Config, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Config.GetActive")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("config")).
Where(squirrel.Eq{
@@ -65,7 +64,6 @@ func (r Config) GetActive(ctx context.Context, moduleId string) (*entity.Config,
func (r Config) GetByModuleId(ctx context.Context, moduleId string) ([]entity.Config, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Config.GetByModuleId")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("config")).
Where(squirrel.Eq{
@@ -88,7 +86,6 @@ func (r Config) GetByModuleId(ctx context.Context, moduleId string) ([]entity.Co
func (r Config) GetById(ctx context.Context, id string) (*entity.Config, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Config.GetById")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("config")).
Where(squirrel.Eq{
+3 -14
View File
@@ -5,7 +5,7 @@ import (
"fmt"
"github.com/Masterminds/squirrel"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"isp-config-service/entity"
"isp-config-service/middlewares/sql_metrics"
"isp-config-service/service/rqlite/db"
@@ -24,23 +24,12 @@ func NewConfigHistory(db db.DB) ConfigHistory {
func (r ConfigHistory) GetByConfigId(ctx context.Context, configId string) ([]entity.ConfigHistory, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigHistory.GetByConfigId")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("config_history")).
Where(squirrel.Eq{
"config_id": configId,
}).OrderBy("version desc").
ToSql()
if err != nil {
return nil, errors.WithMessage(err, "build query")
}
query := fmt.Sprintf(`select * from %s where config_id = ? order by version desc`, Table("config_history"))
result := make([]entity.ConfigHistory, 0)
err = r.db.Select(ctx, &result, query, args...)
err := r.db.Select(ctx, &result, query, configId)
if err != nil {
return nil, errors.WithMessagef(err, "select: %s", query)
}
return result, nil
}
+5 -14
View File
@@ -3,9 +3,10 @@ package repository
import (
"context"
"database/sql"
"fmt"
"github.com/Masterminds/squirrel"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"isp-config-service/entity"
"isp-config-service/middlewares/sql_metrics"
"isp-config-service/service/rqlite/db"
@@ -45,28 +46,18 @@ func (r ConfigSchema) Upsert(ctx context.Context, schema entity.ConfigSchema) er
func (r ConfigSchema) All(ctx context.Context) ([]entity.ConfigSchema, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigSchema.All")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("config_schema")).
OrderBy("created_at").
ToSql()
if err != nil {
return nil, errors.WithMessage(err, "build query")
}
result := make([]entity.ConfigSchema, 0)
err = r.db.Select(ctx, &result, query, args...)
query := fmt.Sprintf("select * from %s order by created_at", Table("config_schema"))
err := r.db.Select(ctx, &result, query)
if err != nil {
return nil, errors.WithMessagef(err, "select: %s", query)
}
return result, nil
}
func (r ConfigSchema) GetByModuleId(ctx context.Context, moduleId string) (*entity.ConfigSchema, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "ConfigSchema.GetByModuleId")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("config_schema")).
Where(squirrel.Eq{"module_id": moduleId}).
@@ -97,7 +88,7 @@ func (r ConfigSchema) UpdateByModuleId(ctx context.Context, moduleId string, dat
}
//nolint:nilnil
func selectRow[T any](ctx context.Context, db db.DB, query string, args ...any) (*T, error) {
func selectRow[T any](ctx context.Context, db db.DB, query string, args ...interface{}) (*T, error) {
var result T
err := db.SelectRow(ctx, &result, query, args...)
if errors.Is(err, sql.ErrNoRows) {
+3 -17
View File
@@ -4,8 +4,7 @@ import (
"context"
"fmt"
"github.com/Masterminds/squirrel"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"isp-config-service/entity"
"isp-config-service/entity/xtypes"
"isp-config-service/middlewares/sql_metrics"
@@ -36,25 +35,12 @@ func (r Event) Insert(ctx context.Context, event entity.Event) error {
func (r Event) Get(ctx context.Context, lastEventId int, limit int) ([]entity.Event, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Event.Get")
// nolint:unqueryvet,gosec
query, args, err := squirrel.Select("*").
From(Table("event")).
Where(squirrel.Gt{
"id": lastEventId,
}).
OrderBy("id").
Limit(uint64(limit)).
ToSql()
if err != nil {
return nil, errors.WithMessage(err, "build query")
}
query := fmt.Sprintf("select * from %s where id > ? order by id limit ?", Table("event"))
result := make([]entity.Event, 0)
err = r.db.Select(ctx, &result, query, args...)
err := r.db.Select(ctx, &result, query, lastEventId, limit)
if err != nil {
return nil, errors.WithMessagef(err, "select: %s", query)
}
return result, nil
}
+5 -25
View File
@@ -5,7 +5,7 @@ import (
"fmt"
"github.com/Masterminds/squirrel"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"isp-config-service/entity"
"isp-config-service/middlewares/sql_metrics"
"isp-config-service/service/rqlite/db"
@@ -66,7 +66,6 @@ func (r Module) SetDisconnectedAtNow(
func (r Module) GetByNames(ctx context.Context, names []string) ([]entity.Module, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Module.GetByNames")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("module")).
Where(squirrel.Eq{
@@ -89,38 +88,19 @@ func (r Module) GetByNames(ctx context.Context, names []string) ([]entity.Module
func (r Module) GetById(ctx context.Context, id string) (*entity.Module, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Module.GetById")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("module")).
Where(squirrel.Eq{
"id": id,
}).
ToSql()
if err != nil {
return nil, errors.WithMessage(err, "build query")
}
return selectRow[entity.Module](ctx, r.db, query, args...)
query := fmt.Sprintf("select * from %s where id = ?", Table("module"))
return selectRow[entity.Module](ctx, r.db, query, id)
}
func (r Module) All(ctx context.Context) ([]entity.Module, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Module.All")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("module")).
OrderBy("name").
ToSql()
if err != nil {
return nil, errors.WithMessage(err, "build query")
}
result := make([]entity.Module, 0)
err = r.db.Select(ctx, &result, query, args...)
query := fmt.Sprintf("select * from %s order by name", Table("module"))
err := r.db.Select(ctx, &result, query)
if err != nil {
return nil, errors.WithMessagef(err, "select: %s", query)
}
return result, nil
}
+13 -48
View File
@@ -3,14 +3,14 @@ package repository
import (
"context"
"database/sql"
"fmt"
"strings"
"github.com/Masterminds/squirrel"
"github.com/pkg/errors"
"isp-config-service/entity"
"isp-config-service/middlewares/sql_metrics"
"isp-config-service/service/rqlite/db"
"github.com/Masterminds/squirrel"
"github.com/txix-open/isp-kit/errors"
)
type Variable struct {
@@ -26,28 +26,18 @@ func NewVariable(db db.DB) Variable {
func (r Variable) All(ctx context.Context) ([]entity.Variable, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Variable.All")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("variable")).
OrderBy("created_at desc").
ToSql()
if err != nil {
return nil, errors.WithMessage(err, "build query")
}
result := make([]entity.Variable, 0)
err = r.db.Select(ctx, &result, query, args...)
query := fmt.Sprintf("SELECT * FROM %s order by created_at desc", Table("variable"))
err := r.db.Select(ctx, &result, query)
if err != nil {
return nil, errors.WithMessagef(err, "select: %s", query)
}
return result, nil
}
func (r Variable) GetByName(ctx context.Context, name string) (*entity.Variable, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Variable.GetByName")
// nolint:unqueryvet
query, args, err := squirrel.Select("*").
From(Table("variable")).
Where(squirrel.Eq{"name": name}).
@@ -67,35 +57,6 @@ func (r Variable) GetByName(ctx context.Context, name string) (*entity.Variable,
return &result, nil
}
func (r Variable) GetVariablesByName(ctx context.Context, names map[string]struct{}) ([]entity.Variable, error) {
ctx = sql_metrics.OperationLabelToContext(ctx, "Variables.GetObjectsByName")
ns := make([]string, 0, len(names))
for n := range names {
ns = append(ns, n)
}
if len(ns) == 0 {
return []entity.Variable{}, nil
}
query, args, err := squirrel.Select("name", "type").
From(Table("variable")).
Where(squirrel.Eq{"name": ns}).
ToSql()
if err != nil {
return nil, errors.WithMessage(err, "build query")
}
result := make([]entity.Variable, 0)
err = r.db.Select(ctx, &result, query, args...)
if err != nil {
return nil, errors.WithMessagef(err, "select: %s", query)
}
return result, nil
}
func (r Variable) Insert(ctx context.Context, variable entity.Variable) error {
ctx = sql_metrics.OperationLabelToContext(ctx, "Variable.Insert")
@@ -187,10 +148,14 @@ func (r Variable) UpsertLinks(ctx context.Context, configId string, links []enti
}
for _, variable := range links {
requests = append(requests, db.Request(
`insert or ignore into `+Table("config_has_variable")+` (config_id, variable_name) values (?, ?)`,
variable.ConfigId, variable.VariableName,
))
query, args, err := squirrel.Insert(Table("config_has_variable")).
Columns("config_id", "variable_name").
Values(variable.ConfigId, variable.VariableName).
ToSql()
if err != nil {
return errors.WithMessage(err, "build query")
}
requests = append(requests, db.Request(query, args...))
}
_, err = r.db.ExecTransaction(ctx, requests)
+7 -59
View File
@@ -27,23 +27,12 @@ type Controllers struct {
}
func EndpointDescriptors() []cluster.EndpointDescriptor {
c := Controllers{}
return concatEndpoints(
modulesDescriptors(c),
configsDescriptors(c),
variablesDescriptors(c),
)
return endpointDescriptors(Controllers{})
}
func GrpcHandler(wrapper endpoint.Wrapper, c Controllers) *grpc.Mux {
muxer := grpc.NewMux()
for _, descriptor := range modulesDescriptors(c) {
muxer.Handle(descriptor.Path, wrapper.Endpoint(descriptor.Handler))
}
for _, descriptor := range configsDescriptors(c) {
muxer.Handle(descriptor.Path, wrapper.Endpoint(descriptor.Handler))
}
for _, descriptor := range variablesDescriptors(c) {
for _, descriptor := range endpointDescriptors(c) {
muxer.Handle(descriptor.Path, wrapper.Endpoint(descriptor.Handler))
}
return muxer
@@ -78,143 +67,102 @@ func HttpHandler(etpSrv *etp.Server, conf conf.Local, rqliteProxy, rqliteBackupP
return httpMux
}
func modulesDescriptors(c Controllers) []cluster.EndpointDescriptor {
// nolint:funlen
func endpointDescriptors(c Controllers) []cluster.EndpointDescriptor {
return []cluster.EndpointDescriptor{
// modules
{
Path: "config/module/get_modules_info",
Inner: true,
Extra: cluster.RequireAdminPermission("module_view"),
Handler: c.ModuleApi.Status,
}, {
Path: "config/module/delete_module",
Inner: true,
Extra: cluster.RequireAdminPermission("module_delete"),
Handler: c.ModuleApi.DeleteModule,
}, {
Path: "config/routing/get_routes",
Inner: true,
Extra: cluster.RequireAdminPermission("module_view"),
Handler: c.ModuleApi.Connections,
}, {
Path: "config/module/get_required_modules",
Inner: true,
Extra: cluster.RequireAdminPermission("module_view"),
Handler: c.ModuleApi.RequiredModules,
},
}
}
func configsDescriptors(c Controllers) []cluster.EndpointDescriptor {
return []cluster.EndpointDescriptor{
// configs
{
Path: "config/config/get_active_config_by_module_name",
Inner: true,
Extra: cluster.RequireAdminPermission("module_view"),
Handler: c.ConfigApi.GetActiveConfigByModuleName,
}, {
Path: "config/config/get_configs_by_module_id",
Inner: true,
Extra: cluster.RequireAdminPermission("module_view"),
Handler: c.ConfigApi.GetConfigsByModuleId,
}, {
Path: "config/config/create_update_config",
Inner: true,
Extra: cluster.RequireAdminPermission("module_configuration_edit"),
Handler: c.ConfigApi.CreateUpdateConfig,
}, {
Path: "config/config/get_config_by_id",
Inner: true,
Extra: cluster.RequireAdminPermission("module_view"),
Handler: c.ConfigApi.GetConfigById,
}, {
Path: "config/config/mark_config_as_active",
Inner: true,
Extra: cluster.RequireAdminPermission("module_configuration_set_active"),
Handler: c.ConfigApi.MarkConfigAsActive,
}, {
Path: "config/config/update_config_name",
Inner: true,
Extra: cluster.RequireAdminPermission("module_configuration_edit"),
Handler: c.ConfigApi.UpdateConfigName,
}, {
Path: "config/config/delete_config",
Inner: true,
Extra: cluster.RequireAdminPermission("module_configuration_edit"),
Handler: c.ConfigApi.DeleteConfigs,
}, {
Path: "config/config/sync",
Inner: true,
Extra: cluster.RequireAdminPermission("module_configuration_edit"),
Handler: c.ConfigApi.SyncConfig,
}, {
Path: "config/config/get_all_version",
Inner: true,
Extra: cluster.RequireAdminPermission("module_view"),
Handler: c.ConfigHistoryApi.GetAllVersion,
}, {
Path: "config/config/delete_version",
Inner: true,
Extra: cluster.RequireAdminPermission("module_history_delete_version"),
Handler: c.ConfigHistoryApi.DeleteConfigVersion,
}, {
Path: "config/config/purge_versions",
Inner: true,
Extra: cluster.RequireAdminPermission("module_history_delete_version"),
Handler: c.ConfigHistoryApi.PurgeConfigVersions,
}, {
Path: "config/schema/get_by_module_id",
Inner: true,
Extra: cluster.RequireAdminPermission("module_view"),
Handler: c.ConfigSchemaApi.SchemaByModuleId,
}, {
Path: "config/schema/update_by_module_name",
Inner: true,
Extra: cluster.RequireAdminPermission("module_configuration_edit"),
Handler: c.ConfigSchemaApi.UpdateSchemaByModuleName,
},
}
}
func variablesDescriptors(c Controllers) []cluster.EndpointDescriptor {
return []cluster.EndpointDescriptor{
// variables
{
Path: "config/variable/all",
Inner: true,
Extra: cluster.RequireAdminPermission("variable_view"),
Handler: c.VariableApi.All,
}, {
Path: "config/variable/get_by_name",
Inner: true,
Extra: cluster.RequireAdminPermission("variable_view"),
Handler: c.VariableApi.GetByName,
}, {
Path: "config/variable/create",
Inner: true,
Extra: cluster.RequireAdminPermission("variable_add"),
Handler: c.VariableApi.Create,
}, {
Path: "config/variable/update",
Inner: true,
Extra: cluster.RequireAdminPermission("variable_edit"),
Handler: c.VariableApi.Update,
}, {
Path: "config/variable/upsert",
Inner: true,
Extra: cluster.RequireAdminPermission("variable_edit"),
Handler: c.VariableApi.Upsert,
}, {
Path: "config/variable/delete",
Inner: true,
Extra: cluster.RequireAdminPermission("variable_delete"),
Handler: c.VariableApi.Delete,
},
}
}
func concatEndpoints(endpoints ...[]cluster.EndpointDescriptor) []cluster.EndpointDescriptor {
var result []cluster.EndpointDescriptor
for _, c := range endpoints {
result = append(result, c...)
}
return result
}
+98 -140
View File
@@ -4,16 +4,15 @@ import (
"context"
"time"
"isp-config-service/domain"
"isp-config-service/entity"
"isp-config-service/entity/xtypes"
"github.com/google/uuid"
"github.com/pkg/errors"
"github.com/txix-open/go-cmp/cmp"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/json"
"github.com/txix-open/isp-kit/log"
"github.com/xeipuuv/gojsonschema"
"isp-config-service/domain"
"isp-config-service/entity"
"isp-config-service/entity/xtypes"
)
type ConfigRepo interface {
@@ -40,14 +39,9 @@ type VariableService interface {
SaveVariableLinks(ctx context.Context, configId string, links []entity.ConfigHasVariable) error
}
type ModuleService interface {
FilterSecretParams(ctx context.Context, config json.RawMessage, moduleId string) error
}
type Config struct {
configRepo ConfigRepo
moduleRepo ModuleRepo
moduleService ModuleService
schemaRepo SchemaRepo
eventRepo EventRepo
configHistoryService ConfigHistoryService
@@ -58,7 +52,6 @@ type Config struct {
func NewConfig(
configRepo ConfigRepo,
moduleRepo ModuleRepo,
moduleService ModuleService,
schemaRepo SchemaRepo,
eventRepo EventRepo,
configHistoryService ConfigHistoryService,
@@ -68,7 +61,6 @@ func NewConfig(
return Config{
configRepo: configRepo,
moduleRepo: moduleRepo,
moduleService: moduleService,
schemaRepo: schemaRepo,
eventRepo: eventRepo,
configHistoryService: configHistoryService,
@@ -95,7 +87,8 @@ func (c Config) GetActiveConfigByModuleName(ctx context.Context, moduleName stri
return nil, entity.ErrConfigNotFound
}
return new(configToDto(*config, nil)), nil
result := configToDto(*config, nil)
return &result, nil
}
func (c Config) GetConfigsByModuleId(ctx context.Context, moduleId string) ([]domain.Config, error) {
@@ -129,13 +122,8 @@ func (c Config) CreateUpdateConfig(
adminId int,
req domain.CreateUpdateConfigRequest,
) (*domain.CreateUpdateConfigResponse, error) {
err := c.moduleService.FilterSecretParams(ctx, req.Data, req.ModuleId)
if err != nil {
return nil, errors.WithMessage(err, "filter secret params")
}
if !req.Unsafe {
err = c.validateConfigUpdate(ctx, req.ModuleId, req.Data)
err := c.validateConfigUpdate(ctx, req.ModuleId, req.Data)
if err != nil {
return nil, errors.WithMessage(err, "validate config")
}
@@ -147,117 +135,6 @@ func (c Config) CreateUpdateConfig(
Config: newConfig, IsChanged: true}, err
}
return c.updateConfig(ctx, adminId, req)
}
func (c Config) GetConfigById(ctx context.Context, configId string) (*domain.Config, error) {
config, err := c.configRepo.GetById(ctx, configId)
if err != nil {
return nil, errors.WithMessage(err, "get config by id")
}
if config == nil {
return nil, entity.ErrConfigNotFound
}
return new(configToDto(*config, nil)), nil
}
func (c Config) MarkConfigAsActive(ctx context.Context, configId string) error {
cfg, err := c.configRepo.GetById(ctx, configId)
if err != nil {
return errors.WithMessage(err, "get config by id")
}
if cfg == nil {
return entity.ErrConfigNotFound
}
err = c.moduleService.FilterSecretParams(ctx, cfg.Data, cfg.ModuleId)
if err != nil {
return errors.WithMessage(err, "filter secret params")
}
currentActiveConfig, err := c.configRepo.GetActive(ctx, cfg.ModuleId)
if err != nil {
return errors.WithMessage(err, "get active config")
}
if currentActiveConfig != nil {
err := c.configRepo.SetActive(ctx, currentActiveConfig.Id, false)
if err != nil {
return errors.WithMessage(err, "deactivate config")
}
}
err = c.configRepo.SetActive(ctx, configId, true)
if err != nil {
return errors.WithMessage(err, "set active config")
}
err = c.emitChangeActiveConfigEvent(ctx, cfg.ModuleId)
if err != nil {
return errors.WithMessage(err, "emit change active config event")
}
return nil
}
func (c Config) DeleteConfig(ctx context.Context, configId string) error {
deleted, err := c.configRepo.DeleteNonActiveById(ctx, configId)
if err != nil {
return errors.WithMessage(err, "delete config")
}
if !deleted {
return entity.ErrConfigNotFoundOrActive
}
return nil
}
func (c Config) UpdateConfigName(ctx context.Context, req domain.UpdateConfigNameRequest) error {
exist, err := c.configRepo.UpdateConfigName(ctx, req)
if err != nil {
return errors.WithMessage(err, "update config name")
}
if !exist {
return entity.ErrConfigNotFound
}
return nil
}
func (c Config) SyncConfig(ctx context.Context, moduleName string) error {
modules, err := c.moduleRepo.GetByNames(ctx, []string{moduleName})
if err != nil {
return errors.WithMessage(err, "get config by module name")
}
if len(modules) == 0 {
return entity.ErrModuleNotFound
}
moduleId := modules[0].Id
activeConfig, err := c.configRepo.GetActive(ctx, moduleId)
if err != nil {
return errors.WithMessage(err, "get active config")
}
if activeConfig == nil {
return entity.ErrConfigNotFound
}
err = c.moduleService.FilterSecretParams(ctx, activeConfig.Data, moduleId)
if err != nil {
return errors.WithMessage(err, "filter secret params")
}
err = c.emitChangeActiveConfigEvent(ctx, moduleId)
if err != nil {
return errors.WithMessage(err, "emit change active config event")
}
return nil
}
// updateConfig updates an existing config version, records the history and
// variable links, and emits the active-config change event when needed.
func (c Config) updateConfig(ctx context.Context, adminId int, req domain.CreateUpdateConfigRequest) (*domain.CreateUpdateConfigResponse, error) {
variableExtractionResult, err := c.extractAndCheckVariables(ctx, req.Id, req.Data)
if err != nil {
return nil, errors.WithMessage(err, "extract variables")
@@ -323,6 +200,93 @@ func (c Config) updateConfig(ctx context.Context, adminId int, req domain.Create
Config: configToDto(newConfig, nil), IsChanged: true}, nil
}
func (c Config) GetConfigById(ctx context.Context, configId string) (*domain.Config, error) {
config, err := c.configRepo.GetById(ctx, configId)
if err != nil {
return nil, errors.WithMessage(err, "get config by id")
}
if config == nil {
return nil, entity.ErrConfigNotFound
}
result := configToDto(*config, nil)
return &result, nil
}
func (c Config) MarkConfigAsActive(ctx context.Context, configId string) error {
cfg, err := c.configRepo.GetById(ctx, configId)
if err != nil {
return errors.WithMessage(err, "get config by id")
}
if cfg == nil {
return entity.ErrConfigNotFound
}
currentActiveConfig, err := c.configRepo.GetActive(ctx, cfg.ModuleId)
if err != nil {
return errors.WithMessage(err, "get active config")
}
if currentActiveConfig != nil {
err := c.configRepo.SetActive(ctx, currentActiveConfig.Id, false)
if err != nil {
return errors.WithMessage(err, "deactivate config")
}
}
err = c.configRepo.SetActive(ctx, configId, true)
if err != nil {
return errors.WithMessage(err, "set active config")
}
err = c.emitChangeActiveConfigEvent(ctx, cfg.ModuleId)
if err != nil {
return errors.WithMessage(err, "emit change active config event")
}
return nil
}
func (c Config) DeleteConfig(ctx context.Context, configId string) error {
deleted, err := c.configRepo.DeleteNonActiveById(ctx, configId)
if err != nil {
return errors.WithMessage(err, "delete config")
}
if !deleted {
return entity.ErrConfigNotFoundOrActive
}
return nil
}
func (c Config) UpdateConfigName(ctx context.Context, req domain.UpdateConfigNameRequest) error {
exist, err := c.configRepo.UpdateConfigName(ctx, req)
if err != nil {
return errors.WithMessage(err, "update config name")
}
if !exist {
return entity.ErrConfigNotFound
}
return nil
}
func (c Config) SyncConfig(ctx context.Context, moduleName string) error {
modules, err := c.moduleRepo.GetByNames(ctx, []string{moduleName})
if err != nil {
return errors.WithMessage(err, "get config by module name")
}
if len(modules) == 0 {
return entity.ErrModuleNotFound
}
moduleId := modules[0].Id
err = c.emitChangeActiveConfigEvent(ctx, moduleId)
if err != nil {
return errors.WithMessage(err, "emit change active config event")
}
return nil
}
func (c Config) insertNewConfig(ctx context.Context, adminId int, req domain.CreateUpdateConfigRequest) (domain.Config, error) {
config := entity.Config{
Id: uuid.NewString(),
@@ -333,21 +297,15 @@ func (c Config) insertNewConfig(ctx context.Context, adminId int, req domain.Cre
Active: false,
AdminId: adminId,
}
err := c.moduleService.FilterSecretParams(ctx, req.Data, req.ModuleId)
err := c.configRepo.Insert(ctx, config)
if err != nil {
return domain.Config{}, errors.WithMessage(err, "filter secret params")
return domain.Config{}, errors.WithMessage(err, "insert new config")
}
// Check variables before insert so a config with missing variables is never persisted without links.
extractResult, err := c.extractAndCheckVariables(ctx, config.Id, config.Data)
if err != nil {
return domain.Config{}, err
}
err = c.configRepo.Insert(ctx, config)
if err != nil {
return domain.Config{}, errors.WithMessage(err, "insert new config")
}
err = c.variableService.SaveVariableLinks(ctx, config.Id, extractResult.VariableLinks)
if err != nil {
return domain.Config{}, errors.WithMessage(err, "save variable links")
@@ -367,7 +325,7 @@ func (c Config) extractAndCheckVariables(ctx context.Context, configId string, i
for _, variable := range variableExtractionResult.AbsentVariables {
details[variable] = "variable is not defined"
}
return nil, errors.WithMessage(domain.NewConfigValidationError(details), "config validation")
return nil, domain.NewConfigValidationError(details)
}
return variableExtractionResult, nil
}
@@ -389,7 +347,7 @@ func (c Config) validateConfigUpdate(ctx context.Context, moduleId string, confi
return nil
}
return errors.WithMessage(domain.NewConfigValidationError(details), "config validation")
return domain.NewConfigValidationError(details)
}
func (c Config) emitChangeActiveConfigEvent(ctx context.Context, moduleId string) error {
+1 -2
View File
@@ -11,7 +11,7 @@ import (
"isp-config-service/domain"
"isp-config-service/entity"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
)
type ConfigHistoryRepo interface {
@@ -134,7 +134,6 @@ func (s ConfigHistory) OnUpdateConfig(ctx context.Context, oldConfig entity.Conf
return nil
}
// nolint:gosec
go func() {
deletedCount, err := s.repo.DeleteOld(context.Background(), oldConfig.Id, s.keepVersions)
if err != nil {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"isp-config-service/domain"
"isp-config-service/entity"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
)
type ConfigSchema struct {
+4 -94
View File
@@ -6,7 +6,7 @@ import (
"slices"
"time"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/json"
"golang.org/x/sync/errgroup"
"isp-config-service/domain"
@@ -58,26 +58,17 @@ func (s Module) Status(ctx context.Context) ([]domain.ModuleInfo, error) {
group.Go(func() error {
var err error
modules, err = s.moduleRepo.All(ctx)
if err != nil {
return errors.WithMessage(err, "get all modules")
}
return nil
return errors.WithMessage(err, "get all modules")
})
group.Go(func() error {
var err error
backends, err = s.backendsRepo.All(ctx)
if err != nil {
return errors.WithMessage(err, "get all backends")
}
return nil
return errors.WithMessage(err, "get all backends")
})
group.Go(func() error {
var err error
schemas, err = s.schemaRepo.All(ctx)
if err != nil {
return errors.WithMessage(err, "get all schemas")
}
return nil
return errors.WithMessage(err, "get all schemas")
})
err := group.Wait()
if err != nil {
@@ -116,52 +107,6 @@ func (s Module) Status(ctx context.Context) ([]domain.ModuleInfo, error) {
return moduleInfos, nil
}
func (s Module) RequiredModules(ctx context.Context) ([]domain.ModuleRelation, error) {
var (
modules []entity.Module
backends []entity.Backend
)
group, groupCtx := errgroup.WithContext(ctx)
group.Go(func() error {
var err error
modules, err = s.moduleRepo.All(groupCtx)
if err != nil {
return errors.WithMessage(err, "get all modules")
}
return nil
})
group.Go(func() error {
var err error
backends, err = s.backendsRepo.All(groupCtx)
if err != nil {
return errors.WithMessage(err, "get all backends")
}
return nil
})
err := group.Wait()
if err != nil {
return nil, errors.WithMessage(err, "wait")
}
moduleIdsByName := make(map[string]string, len(modules))
for _, module := range modules {
moduleIdsByName[module.Name] = module.Id
}
requiredNamesByModuleId := requiredModuleNamesByModuleId(backends)
result := make([]domain.ModuleRelation, 0, len(modules))
for _, module := range modules {
result = append(result, domain.ModuleRelation{
Id: module.Id,
Name: module.Name,
RequiredModules: toRequiredModuleTypes(requiredNamesByModuleId[module.Id], moduleIdsByName),
})
}
return result, nil
}
func (s Module) Delete(ctx context.Context, id string) error {
err := s.moduleRepo.Delete(ctx, id)
if err != nil {
@@ -226,38 +171,3 @@ func (s Module) backendToDto(backend entity.Backend) (domain.Connection, error)
return conn, nil
}
func requiredModuleNamesByModuleId(backends []entity.Backend) map[string]map[string]struct{} {
result := make(map[string]map[string]struct{})
for _, backend := range backends {
_, ok := result[backend.ModuleId]
if !ok {
result[backend.ModuleId] = make(map[string]struct{})
}
for _, dep := range backend.RequiredModules.Value {
result[backend.ModuleId][dep.Name] = struct{}{}
}
}
return result
}
func toRequiredModuleTypes(requiredNames map[string]struct{}, moduleIdsByName map[string]string) []domain.RequiredModuleType {
requiredModules := make([]domain.RequiredModuleType, 0, len(requiredNames))
for requiredName := range requiredNames {
requiredModules = append(
requiredModules,
domain.RequiredModuleType{
Id: moduleIdsByName[requiredName],
Name: requiredName,
})
}
slices.SortFunc(requiredModules, func(a, b domain.RequiredModuleType) int {
return cmp.Compare(a.Name, b.Name)
})
return requiredModules
}
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt"
"time"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/log"
"isp-config-service/entity/xtypes"
)
+2 -1
View File
@@ -16,7 +16,8 @@ func NewCompactor() Compactor {
func (c Compactor) Compact(events []entity.Event) []entity.Event {
uniqueEvents := make([]entity.Event, 0, len(events))
uniqueEventKeys := make(map[string]bool, len(events))
for _, event := range slices.Backward(events) {
for i := len(events) - 1; i >= 0; i-- {
event := events[i]
key := event.Key()
if uniqueEventKeys[key] {
continue
+1 -1
View File
@@ -3,7 +3,7 @@ package event
import (
"context"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/log"
"isp-config-service/entity"
)
+1 -1
View File
@@ -3,7 +3,7 @@ package event
import (
"context"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/log"
"isp-config-service/entity"
"isp-config-service/entity/xtypes"
+1 -1
View File
@@ -3,7 +3,7 @@ package metrics
import (
"context"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"isp-config-service/domain"
"isp-config-service/entity"
)
+3 -3
View File
@@ -8,14 +8,14 @@ import (
"isp-config-service/entity"
"isp-config-service/entity/xtypes"
"github.com/pkg/errors"
"github.com/txix-open/etp/v4"
"github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/log"
)
type Repo interface {
Upsert(ctx context.Context, backend entity.Backend) error
Insert(ctx context.Context, backend entity.Backend) error
DeleteByWsConnectionIds(ctx context.Context, wsConnIds []string) error
GetByConfigServiceNodeId(ctx context.Context, configServiceNodeId string) ([]entity.Backend, error)
DeleteByConfigServiceNodeId(ctx context.Context, configServiceNodeId string) (int, error)
@@ -86,7 +86,7 @@ func (s Backend) Connect(
MetricsAutodiscovery: metricsAd,
}
err := s.backendRepo.Upsert(ctx, backend)
err := s.backendRepo.Insert(ctx, backend)
if err != nil {
return nil, errors.WithMessage(err, "upsert backend in store")
}
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/log"
)
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"github.com/txix-open/etp/v4"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/log"
"isp-config-service/helpers"
)
+45 -269
View File
@@ -4,25 +4,18 @@ import (
"context"
"crypto/sha256"
"encoding/hex"
"fmt"
"strings"
"github.com/google/uuid"
"github.com/pkg/errors"
"github.com/txix-open/etp/v4"
"github.com/txix-open/etp/v4/store"
"github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/log"
"isp-config-service/domain"
"isp-config-service/entity"
"isp-config-service/entity/xtypes"
"isp-config-service/helpers"
"maps"
"sort"
"strings"
"github.com/txix-open/isp-kit/json"
"github.com/txix-open/isp-kit/rc"
"github.com/txix-open/isp-kit/rc/schema"
"github.com/google/uuid"
"github.com/txix-open/etp/v4"
"github.com/txix-open/etp/v4/store"
"github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/log"
)
const (
@@ -45,7 +38,6 @@ type BackendService interface {
type ConfigSchemaRepo interface {
Upsert(ctx context.Context, schema entity.ConfigSchema) error
GetByModuleId(ctx context.Context, moduleId string) (*entity.ConfigSchema, error)
}
type ConfigRepo interface {
@@ -53,12 +45,8 @@ type ConfigRepo interface {
GetActive(ctx context.Context, moduleId string) (*entity.Config, error)
}
type VariableRepo interface {
GetVariablesByName(ctx context.Context, names map[string]struct{}) ([]entity.Variable, error)
}
type VariableService interface {
RenderConfig(ctx context.Context, moduleId string, input []byte) ([]byte, error)
RenderConfig(ctx context.Context, input []byte) ([]byte, error)
ExtractVariables(ctx context.Context, configId string, input []byte) (*domain.VariableExtractionResult, error)
SaveVariableLinks(ctx context.Context, configId string, links []entity.ConfigHasVariable) error
}
@@ -77,8 +65,6 @@ type Service struct {
subscriptionService SubscriptionService
emitter Emitter
variableService VariableService
variableRepo VariableRepo
configWriteDeny bool
logger log.Logger
}
@@ -90,8 +76,6 @@ func NewService(
subscriptionService SubscriptionService,
emitter Emitter,
variableService VariableService,
variableRepo VariableRepo,
configWriteDeny bool,
logger log.Logger,
) Service {
return Service{
@@ -102,8 +86,6 @@ func NewService(
subscriptionService: subscriptionService,
emitter: emitter,
variableService: variableService,
variableRepo: variableRepo,
configWriteDeny: configWriteDeny,
logger: logger,
}
}
@@ -230,6 +212,42 @@ func (s Service) OnModuleConfigSchema(
if err != nil {
return errors.WithMessage(err, "get active config")
}
if config == nil {
initialConfig := entity.Config{
Id: idByKey(moduleId),
Name: helpers.ModuleName(conn),
ModuleId: moduleId,
Data: data.Config,
Version: 1,
Active: xtypes.Bool(true),
}
err := s.configRepo.Insert(ctx, initialConfig)
if err != nil {
return errors.WithMessage(err, "insert config in store")
}
result, err := s.variableService.ExtractVariables(ctx, initialConfig.Id, initialConfig.Data)
if err != nil {
return errors.WithMessage(err, "extract and save variable links in store")
}
if len(result.AbsentVariables) > 0 {
return errors.Errorf("missing variables in initial config: [%s]", strings.Join(result.AbsentVariables, ","))
}
err = s.variableService.SaveVariableLinks(ctx, initialConfig.Id, result.VariableLinks)
if err != nil {
return errors.WithMessage(err, "save variable links in store")
}
config = &initialConfig
}
configData, err := s.variableService.RenderConfig(ctx, config.Data)
if err != nil {
return errors.WithMessage(err, "render config")
}
s.emitter.Emit(ctx, conn, cluster.ConfigSendConfigWhenConnected, configData)
s.subscriptionService.SubscribeToConfigChanges(conn, moduleId)
configSchema := entity.ConfigSchema{
Id: uuid.NewString(),
@@ -242,21 +260,6 @@ func (s Service) OnModuleConfigSchema(
return errors.WithMessage(err, "upsert config schema in store")
}
if config == nil {
config, err = s.storeInitialConfig(ctx, conn, moduleId, data)
if err != nil {
return err
}
}
configData, err := s.variableService.RenderConfig(ctx, moduleId, config.Data)
if err != nil {
return errors.WithMessage(err, "render config")
}
s.emitter.Emit(ctx, conn, cluster.ConfigSendConfigWhenConnected, configData)
s.subscriptionService.SubscribeToConfigChanges(conn, moduleId)
return nil
}
@@ -264,230 +267,3 @@ func idByKey(key string) string {
hash := sha256.Sum256([]byte(key))
return hex.EncodeToString(hash[:])
}
// FilterSecretParams checks the config against the secret write policy:
// ui-exposed fields must not reference SECRET variables, and sensitive fields
// must hold only a single reference to a SECRET variable. A no-op when the
// config write policy is disabled.
func (s Service) FilterSecretParams(ctx context.Context, config json.RawMessage, moduleId string) error {
if !s.configWriteDeny {
return nil
}
moduleSchema, err := s.configSchemaRepo.GetByModuleId(ctx, moduleId)
if err != nil {
return errors.WithMessage(err, "find module schema")
}
if moduleSchema == nil {
return nil
}
uiPaths, sensitivePaths, err := policyPaths(moduleSchema.Data)
if err != nil {
return err
}
if len(uiPaths) == 0 && len(sensitivePaths) == 0 {
return nil
}
placeholders, err := rc.PlaceHolderReader(config)
if err != nil {
return errors.WithMessage(err, "read config placeholders")
}
refsByPath, names, sensitiveSet := policyRefs(placeholders, uiPaths, sensitivePaths)
variableTypes, err := s.referencedVariableTypes(ctx, names)
if err != nil {
return err
}
errorDetails := uiExposedViolations(refsByPath, variableTypes)
if len(sensitivePaths) > 0 {
sensitiveDetails, err := sensitiveViolations(config, sensitiveSet, sensitivePaths, variableTypes)
if err != nil {
return err
}
maps.Copy(errorDetails, sensitiveDetails)
}
if len(errorDetails) == 0 {
return nil
}
return errors.WithMessage(domain.NewConfigValidationError(errorDetails), "config violates the secret policy")
}
// storeInitialConfig checks the secret write policy and persists the module's
// initial config with its variable links. A violating default config is never
// persisted on the first module connection.
func (s Service) storeInitialConfig(ctx context.Context, conn *etp.Conn, moduleId string, data cluster.ConfigData) (*entity.Config, error) {
err := s.FilterSecretParams(ctx, data.Config, moduleId)
if err != nil {
return nil, errors.WithMessage(err, "filter secret params in store")
}
initialConfig := entity.Config{
Id: idByKey(moduleId),
Name: helpers.ModuleName(conn),
ModuleId: moduleId,
Data: data.Config,
Version: 1,
Active: xtypes.Bool(true),
}
result, err := s.variableService.ExtractVariables(ctx, initialConfig.Id, initialConfig.Data)
if err != nil {
return nil, errors.WithMessage(err, "extract variables from initial config")
}
if len(result.AbsentVariables) > 0 {
return nil, errors.Errorf("missing variables in initial config: [%s]", strings.Join(result.AbsentVariables, ","))
}
err = s.configRepo.Insert(ctx, initialConfig)
if err != nil {
return nil, errors.WithMessage(err, "insert config in store")
}
err = s.variableService.SaveVariableLinks(ctx, initialConfig.Id, result.VariableLinks)
if err != nil {
return nil, errors.WithMessage(err, "save variable links in store")
}
return &initialConfig, nil
}
// referencedVariableTypes resolves the types of the variables referenced on
// the policy paths.
func (s Service) referencedVariableTypes(ctx context.Context, names map[string]struct{}) (map[string]entity.VariableType, error) {
variableTypes := make(map[string]entity.VariableType, len(names))
if len(names) == 0 {
return variableTypes, nil
}
variables, err := s.variableRepo.GetVariablesByName(ctx, names)
if err != nil {
return nil, errors.WithMessage(err, "get variables")
}
for _, variable := range variables {
variableTypes[variable.Name] = variable.Type
}
return variableTypes, nil
}
// policyPaths reads the ui-exposed and sensitive leaf paths from the schema.
func policyPaths(schemaData []byte) ([]string, []string, error) {
uiPaths, err := schema.UIExposedPaths(schemaData)
if err != nil {
return nil, nil, errors.WithMessage(err, "read schema params")
}
sensitivePaths, err := schema.SensitivePaths(schemaData)
if err != nil {
return nil, nil, errors.WithMessage(err, "read schema params")
}
return uiPaths, sensitivePaths, nil
}
// policyRefs collects the ui-exposed references (kept per path for the
// report), the set of all referenced variable names and the sensitive paths.
func policyRefs(placeholders map[string][]string, uiPaths, sensitivePaths []string) (map[string][]string, map[string]struct{}, map[string]struct{}) {
refsByPath := make(map[string][]string)
names := make(map[string]struct{})
sensitiveSet := make(map[string]struct{}, len(sensitivePaths))
for _, path := range uiPaths {
for _, name := range placeholders[path] {
names[name] = struct{}{}
refsByPath[path] = append(refsByPath[path], name)
}
}
for _, path := range sensitivePaths {
sensitiveSet[path] = struct{}{}
for _, name := range placeholders[path] {
names[name] = struct{}{}
}
}
return refsByPath, names, sensitiveSet
}
// uiExposedViolations reports the ui-exposed paths that reference SECRET
// variables.
func uiExposedViolations(refsByPath map[string][]string, variableTypes map[string]entity.VariableType) map[string]string {
details := make(map[string]string)
for path, refs := range refsByPath {
secrets := make([]string, 0, len(refs))
for _, name := range refs {
if variableTypes[name] == entity.SecretType {
secrets = append(secrets, name)
}
}
if len(secrets) == 0 {
continue
}
sort.Strings(secrets)
plural := "переменную"
if len(secrets) > 1 {
plural = "переменные"
}
message := fmt.Sprintf("UI-экспортируемое поле не должно ссылаться на %s с типом SECRET: %s", plural, strings.Join(secrets, ", "))
details[policyFieldPath(path)] = message
}
return details
}
// sensitiveViolations reports the sensitive paths whose value is not a single
// reference to a SECRET variable. Composite JSON strings are report-only and
// never rejected.
func sensitiveViolations(
config json.RawMessage,
sensitiveSet map[string]struct{},
sensitivePaths []string,
variableTypes map[string]entity.VariableType,
) (map[string]string, error) {
details := make(map[string]string)
values, err := leafValuesAt(config, sensitiveSet)
if err != nil {
return nil, err
}
for _, path := range sensitivePaths {
value, exists := values[path]
if !exists || value == "" {
continue
}
if rc.IsCompositeJSONString(value) {
continue
}
if name, ok := rc.SingleVariableRef(value); ok {
if t, known := variableTypes[name]; known && t != entity.SecretType {
message := fmt.Sprintf("sensitive-поле должно ссылаться только на переменные с типом SECRET: переменная %s имеет тип %s", name, t)
details[policyFieldPath(path)] = message
}
continue
}
details[policyFieldPath(path)] = "plain value in sensitive field"
}
return details, nil
}
// leafValuesAt collects the raw values of the config's string leaves located
// at the given canonical paths.
func leafValuesAt(data []byte, paths map[string]struct{}) (map[string]string, error) {
values := make(map[string]string, len(paths))
_, err := rc.TransformStringLeaves(data, func(path, value string) string {
if _, want := paths[path]; want {
values[path] = value
}
return value
})
if err != nil {
return nil, errors.WithMessage(err, "read config leaf values")
}
return values, nil
}
func policyFieldPath(canonical string) string {
path := strings.TrimPrefix(canonical, "$.")
return strings.ReplaceAll(path, "[]", ".0")
}
-244
View File
@@ -1,244 +0,0 @@
package module_test
import (
"context"
"encoding/json"
"errors"
"reflect"
"testing"
"isp-config-service/domain"
"isp-config-service/entity"
"isp-config-service/service/module"
kitjson "github.com/txix-open/isp-kit/json"
)
type fakeSchemaRepo struct {
schema *entity.ConfigSchema
}
func (r fakeSchemaRepo) Upsert(ctx context.Context, schema entity.ConfigSchema) error {
return nil
}
func (r fakeSchemaRepo) GetByModuleId(ctx context.Context, moduleId string) (*entity.ConfigSchema, error) {
return r.schema, nil
}
type fakeVariableRepo struct {
variables []entity.Variable
}
func (r fakeVariableRepo) GetVariablesByName(ctx context.Context, names map[string]struct{}) ([]entity.Variable, error) {
out := make([]entity.Variable, 0, len(names))
for _, variable := range r.variables {
if _, ok := names[variable.Name]; ok {
out = append(out, variable)
}
}
return out, nil
}
// policyService builds a module Service wired with the policy dependencies;
// the remaining dependencies are unused by FilterSecretParams and left nil.
func policyService(schema *entity.ConfigSchema, varRepo fakeVariableRepo, deny bool) module.Service {
return module.NewService(nil, nil, nil, fakeSchemaRepo{schema: schema}, nil, module.NewEmitter(nil), nil, varRepo, deny, nil)
}
func policyTestSchema(t *testing.T) []byte {
t.Helper()
schemaData, err := json.Marshal(map[string]any{
"type": "object",
"properties": map[string]any{
"secrets": map[string]any{"type": "string", "x-ui-exposed": true},
"token": map[string]any{"type": "string", "x-sensitive": true},
"arr": map[string]any{
"type": "array",
"items": map[string]any{"type": "string", "x-sensitive": true},
},
},
})
if err != nil {
t.Fatalf("marshal schema: %v", err)
}
return schemaData
}
type policyTestCase struct {
name string
config string
wantErr bool
wantDetails map[string]string
}
func policyTestCases() []policyTestCase {
return []policyTestCase{
{
name: "ui-exposed secret reference",
config: `{"secrets": "_Var(sec_var)"}`,
wantErr: true,
wantDetails: map[string]string{ //nolint:gosec // test fixture, not credentials
"secrets": "UI-экспортируемое поле не должно ссылаться на переменную с типом SECRET: sec_var",
},
},
{
name: "ui-exposed multiple secret references",
config: `{"secrets": "_Var(sec_var) _Var(sec_var2)"}`,
wantErr: true,
wantDetails: map[string]string{ //nolint:gosec // test fixture, not credentials
"secrets": "UI-экспортируемое поле не должно ссылаться на переменные с типом SECRET: sec_var, sec_var2",
},
},
{
name: "sensitive literal without any references",
config: `{"token": "plain-pass"}`,
wantErr: true,
wantDetails: map[string]string{ //nolint:gosec // test fixture, not credentials
"token": "plain value in sensitive field",
},
},
{
name: "sensitive non-secret reference",
config: `{"token": "_Var(txt_var)"}`,
wantErr: true,
wantDetails: map[string]string{ //nolint:gosec // test fixture, not credentials
"token": "sensitive-поле должно ссылаться только на переменные с типом SECRET: переменная txt_var имеет тип TEXT",
},
},
{
name: "sensitive secret reference",
config: `{"token": "_Var(sec_var)"}`,
},
{
name: "sensitive empty value",
config: `{"token": ""}`,
},
{
name: "sensitive field absent",
config: `{"secrets": "_Var(txt_var)"}`,
},
{
name: "sensitive composite json string is report-only",
config: `{"token": "{\"a\": 1}"}`,
},
{
name: "sensitive mixed value",
config: `{"token": "prefix _Var(sec_var)"}`,
wantErr: true,
wantDetails: map[string]string{ //nolint:gosec // test fixture, not credentials
"token": "plain value in sensitive field",
},
},
{
name: "sensitive unknown reference is left to the absent-variable check",
config: `{"token": "_Var(ghost)"}`,
},
{
name: "sensitive array item literal",
config: `{"arr": ["plain-pass"]}`,
wantErr: true,
wantDetails: map[string]string{
"arr.0": "plain value in sensitive field",
},
},
{
name: "both violations at once",
config: `{"secrets": "_Var(sec_var)", "token": "plain-pass"}`,
wantErr: true,
wantDetails: map[string]string{ //nolint:gosec // test fixture, not credentials
"secrets": "UI-экспортируемое поле не должно ссылаться на переменную с типом SECRET: sec_var",
"token": "plain value in sensitive field",
},
},
{
name: "compliant config",
config: `{"secrets": "_Var(txt_var)", "token": "_Var(sec_var)"}`,
},
}
}
func TestFilterSecretParams(t *testing.T) {
t.Parallel()
const moduleId = "m1"
varRepo := fakeVariableRepo{variables: []entity.Variable{
{Name: "sec_var", Type: entity.SecretType},
{Name: "sec_var2", Type: entity.SecretType},
{Name: "txt_var", Type: entity.TextType},
}}
s := policyService(
&entity.ConfigSchema{Id: "s1", ModuleId: moduleId, Data: policyTestSchema(t)},
varRepo,
true,
)
for _, test := range policyTestCases() {
t.Run(test.name, func(t *testing.T) {
t.Parallel()
err := s.FilterSecretParams(context.Background(), kitjson.RawMessage(test.config), moduleId)
if !test.wantErr {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
return
}
var validation domain.ConfigValidationError
if !errors.As(err, &validation) {
t.Fatalf("error = %v, want ConfigValidationError", err)
}
if !reflect.DeepEqual(validation.Details, test.wantDetails) {
t.Fatalf("details = %v, want %v", validation.Details, test.wantDetails)
}
})
}
}
func TestFilterSecretParamsDisabled(t *testing.T) {
t.Parallel()
s := policyService(
&entity.ConfigSchema{Id: "s1", ModuleId: "m1", Data: policyTestSchema(t)},
fakeVariableRepo{},
false,
)
err := s.FilterSecretParams(context.Background(), kitjson.RawMessage(`{"secrets": "_Var(sec_var)", "token": "plain-pass"}`), "m1")
if err != nil {
t.Fatalf("expected no error with the policy disabled, got: %v", err)
}
}
func TestFilterSecretParamsWithoutSchema(t *testing.T) {
t.Parallel()
s := policyService(nil, fakeVariableRepo{}, true)
err := s.FilterSecretParams(context.Background(), kitjson.RawMessage(`{"token": "plain-pass"}`), "m1")
if err != nil {
t.Fatalf("expected no error without a schema, got: %v", err)
}
}
func TestFilterSecretParamsSchemaWithoutPolicyPaths(t *testing.T) {
t.Parallel()
schemaData, err := json.Marshal(map[string]any{
"type": "object",
"properties": map[string]any{"plain": map[string]any{"type": "string"}},
})
if err != nil {
t.Fatalf("marshal schema: %v", err)
}
s := policyService(
&entity.ConfigSchema{Id: "s1", ModuleId: "m1", Data: schemaData},
fakeVariableRepo{},
true,
)
err = s.FilterSecretParams(context.Background(), kitjson.RawMessage(`{"plain": "any value"}`), "m1")
if err != nil {
t.Fatalf("expected no error for a schema without policy paths, got: %v", err)
}
}
+1 -4
View File
@@ -13,7 +13,7 @@ import (
"strings"
"time"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
)
// Config represents the configuration as set by command-line flags.
@@ -78,9 +78,6 @@ type Config struct {
// If NoNodeVerify is true this field is ignored.
NodeVerifyServerName string
// NodeVerifyCommonName is the CommonName to verify as on the certificates returned by a node.
NodeVerifyCommonName string
// NodeID is the Raft ID for the node.
NodeID string
+2 -2
View File
@@ -3,8 +3,8 @@ package rqlite
import (
"bytes"
"github.com/rqlite/rqlite/v10/auth"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
"github.com/rqlite/rqlite/v9/auth"
"github.com/txix-open/isp-kit/json"
)
+1 -7
View File
@@ -4,8 +4,8 @@ import (
"context"
"database/sql"
"github.com/pkg/errors"
"github.com/tidwall/gjson"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/http/httpcli"
"github.com/txix-open/isp-kit/json"
)
@@ -148,12 +148,6 @@ func (d Adapter) exec(ctx context.Context, inTx bool, requests [][]any) ([]sql.R
results := make([]sql.Result, 0, len(requests))
for _, result := range resp.Results {
// rqlite reports per-statement failures in individual results with HTTP 200,
// and aborts the whole transaction on the first failed statement.
err := catchError(nil, result)
if err != nil {
return nil, errors.WithMessagef(err, "exec transaction on statement: %v", requests[min(len(results), len(requests)-1)])
}
results = append(results, result)
}
-1
View File
@@ -81,7 +81,6 @@ func ParseFlags(name, desc string, build *BuildInfo) (*Config, error) {
fs.BoolVar(&config.NoNodeVerify, "node-no-verify", false, "Skip verification of any node-node certificate")
fs.BoolVar(&config.NodeVerifyClient, "node-verify-client", false, "Enable mutual TLS for node-to-node communication")
fs.StringVar(&config.NodeVerifyServerName, "node-verify-server-name", "", "Hostname to verify on certificate returned by a node")
fs.StringVar(&config.NodeVerifyCommonName, "node-verify-common-name", "", "CommonName to verify on certificate returned by a node")
fs.StringVar(&config.AuthFile, "auth", "", "Path to authentication and authorization file. If not set, not enabled")
fs.StringVar(&config.AutoBackupFile, "auto-backup", "", "Path to automatic backup configuration file. If not set, not enabled")
fs.StringVar(&config.AutoRestoreFile, "auto-restore", "", "Path to automatic restore configuration file. If not set, not enabled")
+1 -1
View File
@@ -6,8 +6,8 @@ import (
"isp-config-service/repository"
"github.com/pkg/errors"
"github.com/pressly/goose/v3/database"
"github.com/txix-open/isp-kit/errors"
)
type Store struct {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"crypto/x509"
"os"
"github.com/txix-open/isp-kit/errors"
"github.com/pkg/errors"
)
// MTLSState indicates whether mutual TLS is enabled or disabled.
+21 -23
View File
@@ -19,21 +19,19 @@ import (
"isp-config-service/service/rqlite/internal/rarchive"
"isp-config-service/service/rqlite/internal/rtls"
"github.com/pkg/errors"
"github.com/rqlite/rqlite-disco-clients/dns"
"github.com/rqlite/rqlite-disco-clients/dnssrv"
"github.com/rqlite/rqlite/v10/auth"
"github.com/rqlite/rqlite/v10/auto/backup"
"github.com/rqlite/rqlite/v10/cluster"
"github.com/rqlite/rqlite/v10/cmd"
cmdpkg "github.com/rqlite/rqlite/v10/command"
"github.com/rqlite/rqlite/v10/db"
"github.com/rqlite/rqlite/v10/db/extensions"
httpd "github.com/rqlite/rqlite/v10/http"
"github.com/rqlite/rqlite/v10/proxy"
"github.com/rqlite/rqlite/v10/store"
"github.com/rqlite/rqlite/v10/tcp"
"github.com/rqlite/rqlite/v9/auth"
"github.com/rqlite/rqlite/v9/auto/backup"
"github.com/rqlite/rqlite/v9/cluster"
"github.com/rqlite/rqlite/v9/cmd"
"github.com/rqlite/rqlite/v9/db"
"github.com/rqlite/rqlite/v9/db/extensions"
httpd "github.com/rqlite/rqlite/v9/http"
"github.com/rqlite/rqlite/v9/store"
"github.com/rqlite/rqlite/v9/tcp"
"github.com/txix-open/isp-kit/config"
"github.com/txix-open/isp-kit/errors"
)
const name = `rqlite`
@@ -59,6 +57,7 @@ func main(ctx context.Context, r *Rqlite) error {
cfg, err := ParseFlags(name, desc, &BuildInfo{
Version: cmd.Version,
Commit: cmd.Commit,
Branch: cmd.Branch,
SQLiteVersion: db.DBVersion,
})
if err != nil {
@@ -83,8 +82,8 @@ func main(ctx context.Context, r *Rqlite) error {
r.localHttpAddr = cfg.HTTPAddr
// Configure logging and pump out initial message.
log.Printf("%s starting, version %s, SQLite %s, commit %s, compiler (toolchain) %s, compiler (command) %s",
name, cmd.Version, db.DBVersion, cmd.Commit, runtime.Compiler, cmd.CompilerCommand)
log.Printf("%s starting, version %s, SQLite %s, commit %s, branch %s, compiler (toolchain) %s, compiler (command) %s",
name, cmd.Version, db.DBVersion, cmd.Commit, cmd.Branch, runtime.Compiler, cmd.CompilerCommand)
log.Printf("%s, target architecture is %s, operating system target is %s", runtime.Version(),
runtime.GOARCH, runtime.GOOS)
log.Printf("launch command: %s", strings.Join(os.Args, " "))
@@ -151,10 +150,7 @@ func main(ctx context.Context, r *Rqlite) error {
if err != nil {
log.Fatalf("failed to create cluster client: %s", err.Error())
}
pxy := proxy.New(str, clstrClient)
pxy.SetAPIAddr(cfg.HTTPAdv)
httpServ, err := startHTTPService(cfg, str, clstrClient, credStr, pxy)
httpServ, err := startHTTPService(cfg, str, clstrClient, credStr)
if err != nil {
log.Fatalf("failed to start HTTP server: %s", err.Error())
}
@@ -213,7 +209,7 @@ func main(ctx context.Context, r *Rqlite) error {
remover := cluster.NewRemover(clstrClient, 5*time.Second, str)
remover.SetCredentials(cluster.CredentialsFor(credStr, cfg.JoinAs))
log.Printf("initiating removal of this node from cluster before shutdown")
if err := remover.Do(mainCtx, cfg.NodeID, true); err != nil {
if err := remover.Do(cfg.NodeID, true); err != nil {
log.Fatalf("failed to remove this node from cluster before shutdown: %s", err.Error())
}
log.Printf("removed this node successfully from cluster before shutdown")
@@ -322,6 +318,7 @@ func createExtensionsStore(cfg *Config) (*extensions.Store, error) {
func createStore(cfg *Config, ln *tcp.Layer, extensions []string) (*store.Store, error) {
dbConf := store.NewDBConfig()
dbConf.OnDiskPath = cfg.OnDiskPath
dbConf.FKConstraints = cfg.FKConstraints
dbConf.Extensions = extensions
@@ -356,9 +353,9 @@ func createStore(cfg *Config, ln *tcp.Layer, extensions []string) (*store.Store,
return str, nil
}
func startHTTPService(cfg *Config, str *store.Store, cltr *cluster.Client, credStr *auth.CredentialsStore, pxy *proxy.Proxy) (*httpd.Service, error) {
func startHTTPService(cfg *Config, str *store.Store, cltr *cluster.Client, credStr *auth.CredentialsStore) (*httpd.Service, error) {
// Create HTTP server and load authentication information.
s := httpd.New(cfg.HTTPAddr, str, cltr, pxy, credStr)
s := httpd.New(cfg.HTTPAddr, str, cltr, credStr)
s.CACertFile = cfg.HTTPx509CACert
s.CertFile = cfg.HTTPx509Cert
@@ -370,6 +367,7 @@ func startHTTPService(cfg *Config, str *store.Store, cltr *cluster.Client, credS
s.DefaultQueueTx = cfg.WriteQueueTx
s.BuildInfo = map[string]interface{}{
"commit": cmd.Commit,
"branch": cmd.Branch,
"version": cmd.Version,
"compiler_toolchain": runtime.Compiler,
"compiler_command": cmd.CompilerCommand,
@@ -397,7 +395,7 @@ func startNodeMux(cfg *Config, ln net.Listener) (*tcp.Mux, error) {
}
if cfg.NodeVerifyClient {
b.WriteString(", mutual TLS enabled")
mux, err = tcp.NewMutualTLSMux(ln, adv, cfg.NodeX509Cert, cfg.NodeX509Key, cfg.NodeX509CACert, cfg.NodeVerifyCommonName)
mux, err = tcp.NewMutualTLSMux(ln, adv, cfg.NodeX509Cert, cfg.NodeX509Key, cfg.NodeX509CACert)
} else {
b.WriteString(", mutual TLS disabled")
mux, err = tcp.NewTLSMux(ln, adv, cfg.NodeX509Cert, cfg.NodeX509Key)
@@ -472,7 +470,7 @@ func createCluster(ctx context.Context, cfg *Config, hasPeers bool, client *clus
leader, _ := str.LeaderAddr()
return leader != ""
}
clusterSuf := cmdpkg.SuffrageNonVoterFromBool(cfg.RaftNonVoter)
clusterSuf := cluster.VoterSuffrage(!cfg.RaftNonVoter)
joiner := cluster.NewJoiner(client, cfg.JoinAttempts, cfg.JoinInterval)
joiner.SetCredentials(cluster.CredentialsFor(credStr, cfg.JoinAs))
+3 -3
View File
@@ -7,13 +7,13 @@ import (
"sync/atomic"
"time"
"github.com/rqlite/rqlite/v10/auth"
"github.com/rqlite/rqlite/v9/auth"
"github.com/txix-open/isp-kit/http/httpcli"
"github.com/pkg/errors"
_ "github.com/rqlite/gorqlite/stdlib"
"github.com/rqlite/rqlite/v10/store"
"github.com/rqlite/rqlite/v9/store"
"github.com/txix-open/isp-kit/config"
"github.com/txix-open/isp-kit/errors"
)
var (
+1 -1
View File
@@ -12,12 +12,12 @@ import (
"isp-config-service/service/rqlite/db"
"isp-config-service/service/rqlite/goose_store"
"github.com/pkg/errors"
"github.com/pressly/goose/v3"
"github.com/txix-open/isp-kit/app"
"github.com/txix-open/isp-kit/bootstrap"
"github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/dbx/migration"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/grpc"
"github.com/txix-open/isp-kit/http"
"github.com/txix-open/isp-kit/http/httpcli"
+3 -3
View File
@@ -5,8 +5,8 @@ import (
"github.com/txix-open/etp/v4"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/json"
"github.com/txix-open/isp-kit/log"
"isp-config-service/entity"
@@ -29,7 +29,7 @@ type ConfigRepo interface {
}
type VariableService interface {
RenderConfig(ctx context.Context, moduleId string, input []byte) ([]byte, error)
RenderConfig(ctx context.Context, input []byte) ([]byte, error)
}
type Emitter interface {
@@ -81,7 +81,7 @@ func (s Service) NotifyConfigChanged(ctx context.Context, moduleId string) error
if err != nil {
return errors.WithMessage(err, "get active config")
}
configData, err := s.variableService.RenderConfig(ctx, moduleId, config.Data)
configData, err := s.variableService.RenderConfig(ctx, config.Data)
if err != nil {
return errors.WithMessage(err, "render config")
}
-74
View File
@@ -1,74 +0,0 @@
package variable
import (
"regexp"
"isp-config-service/entity"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/rc"
)
var (
variableRefPattern = regexp.MustCompile(`_Var\((.*?)\)`)
stringToIntPattern = regexp.MustCompile(`"_ToInt\((\d+)\)"`)
)
// skippedRef names a UI-exposed path and a SECRET variable left unrendered there.
type skippedRef struct {
Path string
Variable string
}
// Render substitutes _Var(name) references in the config's string leaves.
// On UI-exposed paths (uiPaths) references to SECRET variables are left as
// literals and reported in skipped; every other reference is substituted.
// Composite JSON string leaves are report-only (see rc.VariableRefReport):
// the secret policy does not apply to them, so every known reference is
// substituted. References to unknown variables are collected in undefined.
// The document is re-assembled into JSON and _ToInt is applied to the
// assembled bytes, as before; object key order is not preserved.
func Render(input []byte, uiPaths []string, vars map[string]entity.Variable) ([]byte, []skippedRef, []string, error) {
uiSet := make(map[string]struct{}, len(uiPaths))
for _, path := range uiPaths {
uiSet[path] = struct{}{}
}
skipped := make([]skippedRef, 0)
skippedSeen := make(map[string]struct{})
undefined := make([]string, 0)
substitute := func(path, value string, policyActive bool) string {
return variableRefPattern.ReplaceAllStringFunc(value, func(match string) string {
name := variableRefPattern.FindStringSubmatch(match)[1]
variable, ok := vars[name]
if !ok {
undefined = append(undefined, name)
return match
}
if policyActive && variable.Type == entity.SecretType {
if _, isUI := uiSet[path]; isUI {
key := path + "\x00" + name
if _, dup := skippedSeen[key]; !dup {
skippedSeen[key] = struct{}{}
skipped = append(skipped, skippedRef{Path: path, Variable: name})
}
return match
}
}
return variable.Value
})
}
out, err := rc.TransformStringLeaves(input, func(path, value string) string {
if rc.IsCompositeJSONString(value) {
return substitute(path, value, false)
}
return substitute(path, value, true)
})
if err != nil {
return nil, nil, nil, errors.WithMessage(err, "transform config leaves")
}
return stringToIntPattern.ReplaceAll(out, []byte("$1")), skipped, undefined, nil
}
-387
View File
@@ -1,387 +0,0 @@
package variable_test
import (
"encoding/json"
"strings"
"testing"
"isp-config-service/entity"
"isp-config-service/service/variable"
)
func textVar(name, value string) entity.Variable {
return entity.Variable{Name: name, Type: entity.TextType, Value: value}
}
// secretVar builds a SECRET variable named "s1" (the name is fixed for all
// the render cases below).
func secretVar(value string) entity.Variable {
return entity.Variable{Name: "s1", Type: entity.SecretType, Value: value}
}
func TestRenderSubstitutesNonUI(t *testing.T) {
t.Parallel()
out, skipped, undefined, err := variable.Render(
[]byte(`{"a":"_Var(v1)"}`),
nil,
map[string]entity.Variable{"v1": textVar("v1", "x")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"a":"x"}` {
t.Fatalf("out = %s, want %s", out, `{"a":"x"}`)
}
if len(skipped) != 0 || len(undefined) != 0 {
t.Fatalf("skipped = %v, undefined = %v, want both empty", skipped, undefined)
}
}
func TestRenderKeepsSecretInUI(t *testing.T) {
t.Parallel()
out, skipped, undefined, err := variable.Render(
[]byte(`{"a":"_Var(s1)"}`),
[]string{"$.a"},
map[string]entity.Variable{"s1": secretVar("top")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"a":"_Var(s1)"}` {
t.Fatalf("out = %s, want the literal placeholder", out)
}
if strings.Contains(string(out), "top") {
t.Fatalf("the secret value leaked into the output: %s", out)
}
if len(skipped) != 1 || skipped[0].Path != "$.a" || skipped[0].Variable != "s1" {
t.Fatalf("skipped = %v, want [{$.a s1}]", skipped)
}
if len(undefined) != 0 {
t.Fatalf("undefined = %v, want empty", undefined)
}
}
func TestRenderSameVarUINonUI(t *testing.T) {
t.Parallel()
out, skipped, _, err := variable.Render(
[]byte(`{"ui":"_Var(s1)","plain":"_Var(s1)"}`),
[]string{"$.ui"},
map[string]entity.Variable{"s1": secretVar("top")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"plain":"top","ui":"_Var(s1)"}` {
t.Fatalf("out = %s, want the non-UI leaf substituted and the UI leaf left as a literal", out)
}
if len(skipped) != 1 || skipped[0].Path != "$.ui" {
t.Fatalf("skipped = %v, want [{$.ui s1}]", skipped)
}
}
func TestRenderMixedUILeaf(t *testing.T) {
t.Parallel()
out, skipped, _, err := variable.Render(
[]byte(`{"a":"p/_Var(t1)/_Var(s1)"}`),
[]string{"$.a"},
map[string]entity.Variable{"t1": textVar("t1", "tv"), "s1": secretVar("top")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"a":"p/tv/_Var(s1)"}` {
t.Fatalf("out = %s, want %s", out, `{"a":"p/tv/_Var(s1)"}`)
}
if len(skipped) != 1 || skipped[0].Variable != "s1" {
t.Fatalf("skipped = %v, want [{$.a s1}]", skipped)
}
}
func TestRenderSecretOutsideUI(t *testing.T) {
t.Parallel()
out, skipped, _, err := variable.Render(
[]byte(`{"a":"_Var(s1)"}`),
nil,
map[string]entity.Variable{"s1": secretVar("top")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"a":"top"}` {
t.Fatalf("out = %s, want %s", out, `{"a":"top"}`)
}
if len(skipped) != 0 {
t.Fatalf("skipped = %v, want empty", skipped)
}
}
func TestRenderArrayPath(t *testing.T) {
t.Parallel()
out, skipped, _, err := variable.Render(
[]byte(`{"oauth":{"clients":[{"e":"_Var(s1)"},{"e":"x"}]}}`),
[]string{"$.oauth.clients[].e"},
map[string]entity.Variable{"s1": secretVar("top")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"oauth":{"clients":[{"e":"_Var(s1)"},{"e":"x"}]}}` {
t.Fatalf("out = %s, want the literal in the UI array leaf", out)
}
if len(skipped) != 1 || skipped[0].Path != "$.oauth.clients[].e" || skipped[0].Variable != "s1" {
t.Fatalf("skipped = %v, want [{$.oauth.clients[].e s1}]", skipped)
}
}
func TestRenderUndefined(t *testing.T) {
t.Parallel()
out, skipped, undefined, err := variable.Render(
[]byte(`{"a":"_Var(ghost)"}`),
nil,
map[string]entity.Variable{},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if len(undefined) != 1 || undefined[0] != "ghost" {
t.Fatalf("undefined = %v, want [ghost]", undefined)
}
if len(skipped) != 0 {
t.Fatalf("skipped = %v, want empty", skipped)
}
if string(out) != `{"a":"_Var(ghost)"}` {
t.Fatalf("out = %s, the unknown reference is left as-is", out)
}
}
func TestRenderUndefinedInUI(t *testing.T) {
t.Parallel()
// A variable that does not exist cannot be proven SECRET, so it is
// reported undefined instead of silently kept as a literal.
_, skipped, undefined, err := variable.Render(
[]byte(`{"a":"_Var(ghost)"}`),
[]string{"$.a"},
map[string]entity.Variable{},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if len(undefined) != 1 || undefined[0] != "ghost" {
t.Fatalf("undefined = %v, want [ghost]", undefined)
}
if len(skipped) != 0 {
t.Fatalf("skipped = %v, want empty", skipped)
}
}
func TestRenderToInt(t *testing.T) {
t.Parallel()
out, _, _, err := variable.Render(
[]byte(`{"n":"_ToInt(_Var(n1))"}`),
nil,
map[string]entity.Variable{"n1": textVar("n1", "42")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"n":42}` {
t.Fatalf("out = %s, want the number 42", out)
}
}
func TestRenderToIntSecretInUI(t *testing.T) {
t.Parallel()
out, skipped, _, err := variable.Render(
[]byte(`{"n":"_ToInt(_Var(s1))"}`),
[]string{"$.n"},
map[string]entity.Variable{"s1": secretVar("42")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"n":"_ToInt(_Var(s1))"}` {
t.Fatalf("out = %s, the _ToInt wrapper must not break the literal", out)
}
if len(skipped) != 1 || skipped[0].Variable != "s1" {
t.Fatalf("skipped = %v, want [{$.n s1}]", skipped)
}
}
func TestRenderKeysUntouched(t *testing.T) {
t.Parallel()
out, _, _, err := variable.Render(
[]byte(`{"_Var(k)":"_Var(v1)"}`),
nil,
map[string]entity.Variable{"v1": textVar("v1", "x")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"_Var(k)":"x"}` {
t.Fatalf("out = %s, JSON keys must not be substituted", out)
}
}
func TestRenderSkippedDeduped(t *testing.T) {
t.Parallel()
_, skipped, _, err := variable.Render(
[]byte(`{"a":"_Var(s1)_Var(s1)"}`),
[]string{"$.a"},
map[string]entity.Variable{"s1": secretVar("top")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if len(skipped) != 1 {
t.Fatalf("skipped = %v, want a single entry", skipped)
}
}
func TestRenderNonStringUILeaf(t *testing.T) {
t.Parallel()
out, skipped, _, err := variable.Render(
[]byte(`{"n":5}`),
[]string{"$.n"},
map[string]entity.Variable{},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"n":5}` {
t.Fatalf("out = %s, non-string leaves are untouched", out)
}
if len(skipped) != 0 {
t.Fatalf("skipped = %v, want empty", skipped)
}
}
func TestRenderInvalidJSON(t *testing.T) {
t.Parallel()
out, skipped, undefined, err := variable.Render(
[]byte(`{"a":`),
nil,
map[string]entity.Variable{},
)
if err == nil {
t.Fatal("Render: want an error for invalid JSON")
}
if out != nil || len(skipped) != 0 || len(undefined) != 0 {
t.Fatalf("out = %s, skipped = %v, undefined = %v, want all empty", out, skipped, undefined)
}
}
func TestRenderEscapes(t *testing.T) {
t.Parallel()
out, _, _, err := variable.Render(
[]byte(`{"a":"line1\nline2 _Var(v1)"}`),
nil,
map[string]entity.Variable{"v1": textVar("v1", "x")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
if string(out) != `{"a":"line1\nline2 x"}` {
t.Fatalf("out = %s, JSON escapes must survive the re-serialization", out)
}
}
func TestRenderCompositeInUISubstituted(t *testing.T) {
t.Parallel()
// a composite JSON string on a UI path is report-only: references are
// substituted, the secret policy does not apply
composite, err := json.Marshal(map[string]any{"a": "_Var(s1)"})
if err != nil {
t.Fatalf("marshal composite: %v", err)
}
doc, err := json.Marshal(map[string]any{
"secrets": string(composite),
"plain": "_Var(s1)",
})
if err != nil {
t.Fatalf("marshal document: %v", err)
}
out, skipped, undefined, err := variable.Render(
doc,
[]string{"$.secrets", "$.plain"},
map[string]entity.Variable{"s1": secretVar("top")},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
var m map[string]any
err = json.Unmarshal(out, &m)
if err != nil {
t.Fatalf("unmarshal output: %v", err)
}
got, ok := m["secrets"].(string)
if !ok {
t.Fatalf("$.secrets is not a string: %v", m["secrets"])
}
if !strings.Contains(got, "top") {
t.Fatalf("$.secrets = %s, want the secret value substituted", got)
}
// the simple leaf on a UI path still follows the policy
if got := m["plain"]; got != "_Var(s1)" {
t.Fatalf("$.plain = %v, want the literal placeholder", got)
}
if len(skipped) != 1 || skipped[0].Path != "$.plain" || skipped[0].Variable != "s1" {
t.Fatalf("skipped = %v, want [{$.plain s1}]", skipped)
}
if len(undefined) != 0 {
t.Fatalf("undefined = %v, want empty", undefined)
}
}
func TestRenderCompositeUndefinedCollected(t *testing.T) {
t.Parallel()
composite, err := json.Marshal([]any{"_Var(ghost)"})
if err != nil {
t.Fatalf("marshal composite: %v", err)
}
doc, err := json.Marshal(map[string]any{"secrets": string(composite)})
if err != nil {
t.Fatalf("marshal document: %v", err)
}
out, skipped, undefined, err := variable.Render(
doc,
[]string{"$.secrets"},
map[string]entity.Variable{},
)
if err != nil {
t.Fatalf("Render: %v", err)
}
var m map[string]any
err = json.Unmarshal(out, &m)
if err != nil {
t.Fatalf("unmarshal output: %v", err)
}
if got, want := m["secrets"], string(composite); got != want {
t.Fatalf("$.secrets = %v, want %s (the unknown reference stays a literal)", got, want)
}
if len(skipped) != 0 {
t.Fatalf("skipped = %v, want empty", skipped)
}
if len(undefined) != 1 || undefined[0] != "ghost" {
t.Fatalf("undefined = %v, want [ghost]", undefined)
}
}
+38 -109
View File
@@ -2,19 +2,13 @@ package variable
import (
"context"
"strings"
"sync"
"time"
"github.com/pkg/errors"
"isp-config-service/domain"
"isp-config-service/entity"
"isp-config-service/entity/xtypes"
"github.com/prometheus/client_golang/prometheus"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/log"
"github.com/txix-open/isp-kit/metrics"
"github.com/txix-open/isp-kit/rc/schema"
"regexp"
"strings"
"time"
)
type Repo interface {
@@ -35,56 +29,28 @@ type EventRepo interface {
Insert(ctx context.Context, event entity.Event) error
}
type SchemaRepo interface {
GetByModuleId(ctx context.Context, moduleId string) (*entity.ConfigSchema, error)
}
type Service struct {
repo Repo
configRepo ConfigRepo
eventRepo EventRepo
schemaRepo SchemaRepo
logger log.Logger
secretSkipped *prometheus.CounterVec
uiPathsCache *uiPathsCache
repo Repo
configRepo ConfigRepo
eventRepo EventRepo
stringToIntRegexp *regexp.Regexp
variableRegexp *regexp.Regexp
}
func NewService(
repo Repo,
configRepo ConfigRepo,
eventRepo EventRepo,
schemaRepo SchemaRepo,
logger log.Logger,
) Service {
return Service{
repo: repo,
configRepo: configRepo,
eventRepo: eventRepo,
schemaRepo: schemaRepo,
logger: logger,
secretSkipped: metrics.GetOrRegister(metrics.DefaultRegistry,
prometheus.NewCounterVec(prometheus.CounterOpts{
Subsystem: "config",
Name: "render_secret_skipped_total",
Help: "Secret variables left unrendered in UI-exposed config leaves",
}, []string{"module", "variable"}),
),
uiPathsCache: &uiPathsCache{entries: make(map[string]cachedUIPaths)},
repo: repo,
configRepo: configRepo,
eventRepo: eventRepo,
stringToIntRegexp: regexp.MustCompile(`"_ToInt\((\d+)\)"`),
variableRegexp: regexp.MustCompile(`_Var\((.*?)\)`),
}
}
// cachedUIPaths is the module's ui-exposed leaf paths for a schema version.
type cachedUIPaths struct {
version string
paths []string
}
// uiPathsCache caches ui-exposed paths per module, invalidated on schema version change.
type uiPathsCache struct {
mu sync.Mutex
entries map[string]cachedUIPaths
}
func (s Service) All(ctx context.Context) ([]domain.Variable, error) {
variables, err := s.repo.All(ctx)
if err != nil {
@@ -125,7 +91,8 @@ func (s Service) GetByName(ctx context.Context, name string) (*domain.Variable,
return nil, errors.WithMessage(err, "get meta by variables")
}
return new(s.toDto(*variable, metaByVariables)), nil
result := s.toDto(*variable, metaByVariables)
return &result, nil
}
func (s Service) Create(ctx context.Context, req domain.CreateVariableRequest) error {
@@ -213,7 +180,7 @@ func (s Service) Delete(ctx context.Context, name string) error {
}
//nolint:funlen
func (s Service) RenderConfig(ctx context.Context, moduleId string, input []byte) ([]byte, error) {
func (s Service) RenderConfig(ctx context.Context, input []byte) ([]byte, error) {
variables, err := s.repo.All(ctx)
if err != nil {
return nil, errors.WithMessage(err, "get all variables")
@@ -221,47 +188,36 @@ func (s Service) RenderConfig(ctx context.Context, moduleId string, input []byte
if len(variables) == 0 {
return input, nil
}
varsMap := make(map[string]entity.Variable, len(variables))
varsMap := make(map[string]string, len(variables))
for _, variable := range variables {
varsMap[variable.Name] = variable
varsMap[variable.Name] = variable.Value
}
uiPaths, err := s.uiPaths(ctx, moduleId)
if err != nil {
return nil, err
undefinedVariables := make([]string, 0)
withReplacedVars := s.variableRegexp.ReplaceAllStringFunc(string(input), func(group string) string {
varName := s.variableRegexp.FindStringSubmatch(group)[1]
value, ok := varsMap[varName]
if !ok {
undefinedVariables = append(undefinedVariables, varName)
return varName
}
return value
})
if len(undefinedVariables) > 0 {
return nil, errors.Errorf("undefined variables: [%s]", strings.Join(undefinedVariables, ", "))
}
out, skipped, undefined, err := Render(input, uiPaths, varsMap)
if err != nil {
return nil, errors.WithMessage(err, "render config")
}
if len(undefined) > 0 {
return nil, errors.Errorf("undefined variables: [%s]", strings.Join(undefined, ", "))
}
result := s.stringToIntRegexp.ReplaceAll([]byte(withReplacedVars), []byte("$1"))
for _, ref := range skipped {
s.logger.Error(ctx, "secret variable not substituted in ui-exposed field",
log.String("moduleId", moduleId),
log.String("path", ref.Path),
log.String("variable", ref.Variable),
)
s.secretSkipped.WithLabelValues(moduleId, ref.Variable).Inc()
}
return out, nil
return result, nil
}
func (s Service) ExtractVariables(ctx context.Context, configId string, input []byte) (*domain.VariableExtractionResult, error) {
matches := variableRefPattern.FindAllStringSubmatch(string(input), -1)
seen := make(map[string]bool, len(matches))
varNames := make([]string, 0, len(matches))
for _, match := range matches {
name := match[1]
if seen[name] {
continue
}
seen[name] = true
varNames = append(varNames, name)
matches := s.variableRegexp.FindAllStringSubmatch(string(input), -1)
varNames := make([]string, len(matches))
for i, match := range matches {
varNames[i] = match[1]
}
if len(varNames) == 0 {
return &domain.VariableExtractionResult{
@@ -307,33 +263,6 @@ func (s Service) SaveVariableLinks(ctx context.Context, configId string, links [
return nil
}
// uiPaths returns the canonical paths of the module's ui-exposed leaves,
// cached per module and schema version. A module without a schema (or with a
// schema without the keyword) yields an empty set, so rendering behaves as
// before.
func (s Service) uiPaths(ctx context.Context, moduleId string) ([]string, error) {
schemaRow, err := s.schemaRepo.GetByModuleId(ctx, moduleId)
if err != nil {
return nil, errors.WithMessage(err, "find module schema")
}
if schemaRow == nil {
return nil, nil
}
s.uiPathsCache.mu.Lock()
defer s.uiPathsCache.mu.Unlock()
if cached, ok := s.uiPathsCache.entries[moduleId]; ok && cached.version == schemaRow.ModuleVersion {
return cached.paths, nil
}
paths, err := schema.UIExposedPaths(schemaRow.Data)
if err != nil {
return nil, errors.WithMessage(err, "read ui-exposed paths")
}
s.uiPathsCache.entries[moduleId] = cachedUIPaths{version: schemaRow.ModuleVersion, paths: paths}
return paths, nil
}
func (s Service) toDto(variable entity.Variable, metaByVariables map[string][]entity.ConfigMetaWithVariable) domain.Variable {
value := variable.Value
if variable.Type == "SECRET" {
+1 -2
View File
@@ -153,7 +153,7 @@ func newClusterClientWith(
IP: host,
Port: "9999",
},
EndpointsResolver: cluster.StaticEndpointResolver{},
Endpoints: nil,
MetricsAutodiscovery: metricsAd,
}, cluster.ConfigData{
Version: "1.0.0",
@@ -177,7 +177,6 @@ func setupTest(t *testing.T) log.Logger {
dataPath := dataDir(t)
boot.App.Config().Set("rqlite.DataPath", dataPath)
boot.App.Config().Set("backup.Enable", false)
boot.App.Config().Set("configWriteDeny", true)
logger := boot.App.Logger()
startup, err := startup.New(boot)
-1
View File
@@ -97,7 +97,6 @@ func setupTestWithAppRun(t *testing.T) (*require.Assertions, log.Logger) {
dataPath := dataDir(t)
boot.App.Config().Set("rqlite.DataPath", dataPath)
boot.App.Config().Set("backup.Enable", false)
boot.App.Config().Set("configWriteDeny", true)
logger := boot.App.Logger()
startup, err := startup.New(boot)
-100
View File
@@ -1,100 +0,0 @@
package tests_test
import (
"fmt"
"net/http"
"net/http/httptest"
"testing"
"time"
"isp-config-service/domain"
"github.com/stretchr/testify/require"
"github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/grpc/client"
"github.com/txix-open/isp-kit/json"
"github.com/txix-open/isp-kit/metrics"
)
// renderPolicyConfig has one ui-exposed leaf and one plain leaf.
type renderPolicyConfig struct {
Exposed string `schemaGen:"uiExposed"`
Plain string
}
//nolint:funlen,paralleltest,noctx
func TestRenderSecretSkip(t *testing.T) {
require := require.New(t)
logger := setupTest(t)
apiCli, err := client.Default()
require.NoError(err)
apiCli.Upgrade([]string{"127.0.0.1:9002"})
err = apiCli.Invoke("config/variable/upsert").
JsonRequestBody([]domain.UpsertVariableRequest{{
Name: "rdVar",
Description: "test",
Type: "TEXT",
Value: "render-visible",
}}).
Do(t.Context())
require.NoError(err)
eventHandler := newClusterEventHandler()
renderCli := newClusterClientWith(
t,
"RenderPolicy",
"10.2.9.41",
renderPolicyConfig{},
[]byte(`{"exposed":"_Var(rdVar)","plain":"_Var(rdVar)"}`),
nil,
logger,
)
go func() {
handler := cluster.NewEventHandler().RemoteConfigReceiver(eventHandler)
err := renderCli.Run(t.Context(), handler)
require.NoError(err) //nolint:testifylint
}()
time.Sleep(3 * time.Second)
active := domain.Config{}
err = apiCli.Invoke("config/config/get_active_config_by_module_name").
JsonRequestBody(domain.GetByModuleNameRequest{ModuleName: "RenderPolicy"}).
JsonResponseBody(&active).
Do(t.Context())
require.NoError(err)
require.NotEmpty(active.ModuleId)
first := renderPolicyConfig{}
err = json.Unmarshal(eventHandler.ReceivedConfigs()[0], &first)
require.NoError(err)
require.Equal("render-visible", first.Exposed)
require.Equal("render-visible", first.Plain)
// Legacy regime: the variable referenced by the stored config becomes SECRET.
err = apiCli.Invoke("config/variable/upsert").
JsonRequestBody([]domain.UpsertVariableRequest{{
Name: "rdVar",
Description: "test",
Type: "SECRET",
Value: "render-secret-value",
}}).
Do(t.Context())
require.NoError(err)
time.Sleep(3 * time.Second)
last := renderPolicyConfig{}
err = json.Unmarshal(eventHandler.ReceivedConfigs()[len(eventHandler.ReceivedConfigs())-1], &last)
require.NoError(err)
require.Equal("_Var(rdVar)", last.Exposed, "the secret reference must stay a literal in the ui-exposed leaf")
require.Equal("render-secret-value", last.Plain)
// The skip is observable: a positive counter for the module and the variable.
recorder := httptest.NewRecorder()
metrics.DefaultRegistry.MetricsHandler().ServeHTTP(recorder, httptest.NewRequestWithContext(t.Context(), http.MethodGet, "/internal/metrics", nil))
require.Regexp(
fmt.Sprintf(`render_secret_skipped[^\n]*module=%q[^\n]*variable="rdVar"[^\n]* [1-9]`, active.ModuleId),
recorder.Body.String(),
)
}
-308
View File
@@ -1,308 +0,0 @@
package tests_test
import (
"encoding/json"
"testing"
"time"
"isp-config-service/domain"
"github.com/stretchr/testify/require"
"github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/grpc/client"
"github.com/txix-open/isp-kit/grpc/isp"
"google.golang.org/grpc/status"
)
type secretPolicyOauthClient struct {
ClientId string
LoginEndpoint string `schemaGen:"uiExposed"`
}
type secretPolicyOauth struct {
Clients []secretPolicyOauthClient
}
type secretPolicyConfig struct {
Secrets string `schemaGen:"uiExposed"`
Plain string
Oauth secretPolicyOauth
}
type businessError struct {
ErrorCode int `json:"errorCode"`
ErrorMessage string `json:"errorMessage"`
Details map[string]any `json:"details"`
}
// requireBusinessError decodes the business error carried in the gRPC status
// details and asserts its error code.
func requireBusinessError(require *require.Assertions, err error, code int) businessError {
require.Error(err)
st, ok := status.FromError(err)
require.True(ok, "expected a gRPC status error, got: %v", err)
for _, detail := range st.Details() {
if msg, ok := detail.(*isp.Message); ok {
body, ok := msg.GetBody().(*isp.Message_BytesBody)
require.True(ok, "expected a bytes body, got: %T", msg.GetBody())
var be businessError
require.NoError(json.Unmarshal(body.BytesBody, &be))
require.Equal(code, be.ErrorCode, "unexpected error code: %s", body.BytesBody)
return be
}
}
require.Failf("business error not found in status details", "details: %+v", st.Details())
return businessError{}
}
//nolint:funlen,paralleltest,testifylint
func TestSecretPolicy(t *testing.T) {
require := require.New(t)
logger := setupTest(t)
apiCli, err := client.Default()
require.NoError(err)
apiCli.Upgrade([]string{"127.0.0.1:9002"})
// Variables: one SECRET, one TEXT.
err = apiCli.Invoke("config/variable/upsert").
JsonRequestBody([]domain.UpsertVariableRequest{
{Name: "polSecret", Description: "test", Type: "SECRET", Value: "top-secret"},
{Name: "polText", Description: "test", Type: "TEXT", Value: "visible"},
}).
Do(t.Context())
require.NoError(err)
// Module A: the default config references only the TEXT variable, so the
// initial config is persisted on the first connection.
eventHandler := newClusterEventHandler()
clientA := newClusterClientWith(
t,
"SecretPolicyA",
"10.2.9.31",
secretPolicyConfig{},
[]byte(`{"secrets":"_Var(polText)","plain":"p","oauth":{"clients":[{"clientId":"a","loginEndpoint":"_Var(polText)"}]}}`),
nil,
logger,
)
go func() {
handler := cluster.NewEventHandler().RemoteConfigReceiver(eventHandler)
err := clientA.Run(t.Context(), handler)
require.NoError(err) //nolint:testifylint
}()
time.Sleep(3 * time.Second)
active := domain.Config{}
err = apiCli.Invoke("config/config/get_active_config_by_module_name").
JsonRequestBody(domain.GetByModuleNameRequest{ModuleName: "SecretPolicyA"}).
JsonResponseBody(&active).
Do(t.Context())
require.NoError(err)
require.NotEmpty(active.Id)
// 1) Update: a SECRET variable in a UI-exposed field is rejected with a
// per-path detail, and the config is not changed.
be := requireBusinessError(require,
apiCli.Invoke("config/config/create_update_config").
JsonRequestBody(domain.CreateUpdateConfigRequest{
Id: active.Id,
Name: active.Name,
ModuleId: active.ModuleId,
Version: active.Version,
Data: []byte(`{"secrets":"_Var(polSecret)","plain":"p","oauth":{"clients":[{"clientId":"a","loginEndpoint":"_Var(polText)"}]}}`),
}).
Do(t.Context()),
domain.ErrorCodeInvalidConfig)
require.Equal("UI-экспортируемое поле не должно ссылаться на переменную с типом SECRET: polSecret", be.Details["secrets"])
err = apiCli.Invoke("config/config/get_active_config_by_module_name").
JsonRequestBody(domain.GetByModuleNameRequest{ModuleName: "SecretPolicyA"}).
JsonResponseBody(&active).
Do(t.Context())
require.NoError(err)
require.JSONEq(
`{"secrets":"_Var(polText)","plain":"p","oauth":{"clients":[{"clientId":"a","loginEndpoint":"_Var(polText)"}]}}`,
string(active.Data))
// 2) unsafe=true does not bypass the policy.
be = requireBusinessError(require,
apiCli.Invoke("config/config/create_update_config").
JsonRequestBody(domain.CreateUpdateConfigRequest{
Id: active.Id,
Name: active.Name,
ModuleId: active.ModuleId,
Version: active.Version,
Data: []byte(`{"secrets":"_Var(polSecret)","plain":"p"}`),
Unsafe: true,
}).
Do(t.Context()),
domain.ErrorCodeInvalidConfig)
require.Equal("UI-экспортируемое поле не должно ссылаться на переменную с типом SECRET: polSecret", be.Details["secrets"])
// 3) Insert path (empty Id): the new config is not created.
be = requireBusinessError(require,
apiCli.Invoke("config/config/create_update_config").
JsonRequestBody(domain.CreateUpdateConfigRequest{
Name: "policy-insert",
ModuleId: active.ModuleId,
Data: []byte(`{"secrets":"_Var(polSecret)"}`),
}).
Do(t.Context()),
domain.ErrorCodeInvalidConfig)
require.Equal("UI-экспортируемое поле не должно ссылаться на переменную с типом SECRET: polSecret", be.Details["secrets"])
// 4) Nested array path: the detail key matches the gojsonschema field
// format used by schema validation errors.
be = requireBusinessError(require,
apiCli.Invoke("config/config/create_update_config").
JsonRequestBody(domain.CreateUpdateConfigRequest{
Id: active.Id,
Name: active.Name,
ModuleId: active.ModuleId,
Version: active.Version,
Data: []byte(`{"secrets":"s","plain":"p","oauth":{"clients":[{"clientId":"a","loginEndpoint":"_Var(polSecret)"}]}}`),
}).
Do(t.Context()),
domain.ErrorCodeInvalidConfig)
require.Equal("UI-экспортируемое поле не должно ссылаться на переменную с типом SECRET: polSecret", be.Details["oauth.clients.0.loginEndpoint"])
// 5) A SECRET variable outside a UI-exposed field is allowed.
err = apiCli.Invoke("config/config/create_update_config").
JsonRequestBody(domain.CreateUpdateConfigRequest{
Id: active.Id,
Name: active.Name,
ModuleId: active.ModuleId,
Version: active.Version,
Data: []byte(`{"secrets":"s","plain":"_Var(polSecret)","oauth":{"clients":[{"clientId":"a","loginEndpoint":"x"}]}}`),
}).
Do(t.Context())
require.NoError(err)
// Restore the original data for the sync checks below.
active = domain.Config{}
err = apiCli.Invoke("config/config/get_active_config_by_module_name").
JsonRequestBody(domain.GetByModuleNameRequest{ModuleName: "SecretPolicyA"}).
JsonResponseBody(&active).
Do(t.Context())
require.NoError(err)
err = apiCli.Invoke("config/config/create_update_config").
JsonRequestBody(domain.CreateUpdateConfigRequest{
Id: active.Id,
Name: active.Name,
ModuleId: active.ModuleId,
Version: active.Version,
Data: []byte(`{"secrets":"_Var(polText)","plain":"p","oauth":{"clients":[{"clientId":"a","loginEndpoint":"_Var(polText)"}]}}`),
}).
Do(t.Context())
require.NoError(err)
// 6) Sync with a compliant active config succeeds and re-pushes it.
err = apiCli.Invoke("config/config/sync").
JsonRequestBody(domain.SyncConfigRequest{ModuleName: "SecretPolicyA"}).
Do(t.Context())
require.NoError(err)
time.Sleep(3 * time.Second)
require.GreaterOrEqual(len(eventHandler.ReceivedConfigs()), 2)
pushedBefore := len(eventHandler.ReceivedConfigs())
// 7) The variable referenced by the stored config becomes SECRET (the
// legacy regime): sync is rejected with per-path details and nothing is
// re-pushed.
err = apiCli.Invoke("config/variable/upsert").
JsonRequestBody([]domain.UpsertVariableRequest{{
Name: "polText", Description: "test", Type: "SECRET", Value: "now-secret",
}}).
Do(t.Context())
require.NoError(err)
time.Sleep(3 * time.Second)
// The variable change itself triggers a re-render push.
require.Greater(len(eventHandler.ReceivedConfigs()), pushedBefore)
be = requireBusinessError(require,
apiCli.Invoke("config/config/sync").
JsonRequestBody(domain.SyncConfigRequest{ModuleName: "SecretPolicyA"}).
Do(t.Context()),
domain.ErrorCodeInvalidConfig)
require.Equal("UI-экспортируемое поле не должно ссылаться на переменную с типом SECRET: polText", be.Details["secrets"])
require.Equal("UI-экспортируемое поле не должно ссылаться на переменную с типом SECRET: polText", be.Details["oauth.clients.0.loginEndpoint"])
time.Sleep(3 * time.Second)
// No extra push: the rejected sync did not emit a change event.
require.Len(eventHandler.ReceivedConfigs(), pushedBefore+1)
// 8) First connection of module B: the default config references a SECRET
// variable in a UI-exposed field, so the initial config is not persisted.
clientB := newClusterClientWith(
t,
"SecretPolicyB",
"10.2.9.32",
secretPolicyConfig{},
[]byte(`{"secrets":"_Var(polSecret)","plain":"p","oauth":{"clients":[]}}`),
nil,
logger,
)
go func() {
handler := cluster.NewEventHandler()
err := clientB.Run(t.Context(), handler)
_ = err // the connection is rejected by the write policy
}()
time.Sleep(3 * time.Second)
requireBusinessError(require,
apiCli.Invoke("config/config/get_active_config_by_module_name").
JsonRequestBody(domain.GetByModuleNameRequest{ModuleName: "SecretPolicyB"}).
Do(t.Context()),
domain.ErrorCodeConfigNotFound)
// 9) Unknown module id (no schema row at all): the write policy must not
// panic on the missing schema — the request fails with the regular
// schema-not-found error, not an internal one.
be = requireBusinessError(require,
apiCli.Invoke("config/config/create_update_config").
JsonRequestBody(domain.CreateUpdateConfigRequest{
Name: "policy-no-schema",
ModuleId: "00000000-0000-0000-0000-000000000000",
Data: []byte(`{"secrets":"_Var(polSecret)"}`),
}).
Do(t.Context()),
domain.ErrorCodeSchemaNotFound)
require.Empty(be.Details)
// 10) mark_config_as_active: the active config of module A now violates
// the policy (its referenced variable became SECRET after the config was
// saved — the legacy regime). Activating a saved config must pass the
// policy, so rolling back to the violating config is rejected with
// per-path details and the active config is not switched.
var marked domain.CreateUpdateConfigResponse
err = apiCli.Invoke("config/config/create_update_config").
JsonRequestBody(domain.CreateUpdateConfigRequest{
Name: "policy-mark",
ModuleId: active.ModuleId,
Data: []byte(`{"secrets":"s","plain":"p","oauth":{"clients":[{"clientId":"a","loginEndpoint":"x"}]}}`),
}).
JsonResponseBody(&marked).
Do(t.Context())
require.NoError(err)
require.NotEmpty(marked.Id)
err = apiCli.Invoke("config/config/mark_config_as_active").
JsonRequestBody(domain.IdRequest{Id: marked.Id}).
Do(t.Context())
require.NoError(err)
be = requireBusinessError(require,
apiCli.Invoke("config/config/mark_config_as_active").
JsonRequestBody(domain.IdRequest{Id: active.Id}).
Do(t.Context()),
domain.ErrorCodeInvalidConfig)
require.Equal("UI-экспортируемое поле не должно ссылаться на переменную с типом SECRET: polText", be.Details["secrets"])
require.Equal("UI-экспортируемое поле не должно ссылаться на переменную с типом SECRET: polText", be.Details["oauth.clients.0.loginEndpoint"])
fetched := domain.Config{}
err = apiCli.Invoke("config/config/get_active_config_by_module_name").
JsonRequestBody(domain.GetByModuleNameRequest{ModuleName: "SecretPolicyA"}).
JsonResponseBody(&fetched).
Do(t.Context())
require.NoError(err)
require.Equal(marked.Id, fetched.Id)
}
-89
View File
@@ -124,95 +124,6 @@ func TestVariableAcceptance(t *testing.T) {
require.Empty(allResponse[1].Value) // secret
}
//nolint:funlen,paralleltest
func TestVariableLinksAfterConfigUpdate(t *testing.T) {
require := require.New(t)
logger := setupTest(t)
apiCli, err := client.Default()
require.NoError(err)
apiCli.Upgrade([]string{"127.0.0.1:9002"})
err = apiCli.Invoke("config/variable/create").
JsonRequestBody(domain.CreateVariableRequest{
Name: "linkVar",
Description: "test",
Type: "TEXT",
Value: fake.It[string](),
}).
Do(t.Context())
require.NoError(err)
type linkTestConfig struct {
Addr string
Alias string
}
clientC := newClusterClientWith(
t,
"LinkTestModule",
"10.2.9.77",
linkTestConfig{},
[]byte(`{"addr":"init","alias":"init"}`),
nil,
logger,
)
go func() {
handler := cluster.NewEventHandler()
err := clientC.Run(t.Context(), handler)
require.NoError(err) //nolint:testifylint
}()
time.Sleep(2 * time.Second)
activeConfig := domain.Config{}
err = apiCli.Invoke("config/config/get_active_config_by_module_name").
JsonRequestBody(domain.GetByModuleNameRequest{ModuleName: "LinkTestModule"}).
JsonResponseBody(&activeConfig).
Do(t.Context())
require.NoError(err)
// The same variable is referenced twice in the config data.
err = apiCli.Invoke("config/config/create_update_config").
JsonRequestBody(domain.CreateUpdateConfigRequest{
Id: activeConfig.Id,
Name: activeConfig.Name,
ModuleId: activeConfig.ModuleId,
Version: activeConfig.Version,
Data: []byte(`{"addr":"_Var(linkVar)","alias":"prefix/_Var(linkVar)"}`),
}).
Do(t.Context())
require.NoError(err)
varResponse := []domain.Variable{}
err = apiCli.Invoke("config/variable/all").
JsonResponseBody(&varResponse).
Do(t.Context())
require.NoError(err)
require.Len(varResponse, 1)
require.Equal("linkVar", varResponse[0].Name)
require.Len(varResponse[0].ContainsInConfigs, 1)
require.Equal(activeConfig.Id, varResponse[0].ContainsInConfigs[0].Id)
// Re-saving identical config data must keep the links.
err = apiCli.Invoke("config/config/create_update_config").
JsonRequestBody(domain.CreateUpdateConfigRequest{
Id: activeConfig.Id,
Name: activeConfig.Name,
ModuleId: activeConfig.ModuleId,
Version: activeConfig.Version,
Data: []byte(`{"alias":"prefix/_Var(linkVar)","addr":"_Var(linkVar)"}`),
}).
Do(t.Context())
require.NoError(err)
varResponse = []domain.Variable{}
err = apiCli.Invoke("config/variable/all").
JsonResponseBody(&varResponse).
Do(t.Context())
require.NoError(err)
require.Len(varResponse[0].ContainsInConfigs, 1)
require.Equal(activeConfig.Id, varResponse[0].ContainsInConfigs[0].Id)
}
func unmarshalConfig(require *require.Assertions, configData []byte) configWithVars {
firstConfig := configWithVars{}
err := json.Unmarshal(configData, &firstConfig)