Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f88738f78 | ||
|
|
a637d56ea7 | ||
|
|
a841cd082b | ||
|
|
9b18fe7351 | ||
|
|
f3c801e4a4 | ||
|
|
ee13991d87 | ||
|
|
d4846359e4 | ||
|
|
13cf0075f6 | ||
|
|
135e551473 | ||
|
|
689f730a3e | ||
|
|
a30582fa38 |
No files matched your search
@@ -18,6 +18,7 @@ linters:
|
|||||||
- testpackage
|
- testpackage
|
||||||
- varnamelen # очень индивидуально (db)
|
- varnamelen # очень индивидуально (db)
|
||||||
- wsl # расставление пробелов очень индивидуально
|
- wsl # расставление пробелов очень индивидуально
|
||||||
|
- wsl_v5 # расставление пробелов очень индивидуально
|
||||||
settings:
|
settings:
|
||||||
cyclop:
|
cyclop:
|
||||||
max-complexity: 15 # по умолчанию 10 мало
|
max-complexity: 15 # по умолчанию 10 мало
|
||||||
|
|||||||
@@ -1,3 +1,24 @@
|
|||||||
|
### v5.6.2
|
||||||
|
* Обновлено заполнение заголовка `x-application-name` для поддержки кириллических символов
|
||||||
|
### v5.6.1
|
||||||
|
* Добавлен проброс заголовка `x-application-name`
|
||||||
|
### v5.6.0
|
||||||
|
* Добавлена поддержка метрик для http запросов
|
||||||
|
### v5.5.1
|
||||||
|
* повышен приоритет `x-application-token` над basic-auth, при поиске в запросе токена приложения
|
||||||
|
### v5.5.0
|
||||||
|
* Добавлена поддержка basic-auth, где `username` - название приложения, `password` - токен приложения
|
||||||
|
### v5.4.1
|
||||||
|
* Оптимизация очистки тела запроса от экранирования unicode символов для корректного логирования
|
||||||
|
### v5.4.0
|
||||||
|
* Добавлена настройка `forwardReqIdClientSettings` для разрешения прокидывания `requestId` определённым приложениям по их идентификаторам (`requestId` клиента прокидывается если в `forwardReqIdClientSettings` для приложения включено прокидывание или включен глобальный флаг `enableClientRequestIdForwarding`)
|
||||||
|
* Обновлена версия go до 1.25
|
||||||
|
### v5.3.0
|
||||||
|
* обновлены зависимости
|
||||||
|
### v5.2.10
|
||||||
|
* добавлен контекст ошибки для grpc
|
||||||
|
### v5.2.9
|
||||||
|
* взаимодействие напрямую с `redis` заменено на взаимодействие с `isp-lock-service`
|
||||||
### v5.2.8
|
### v5.2.8
|
||||||
* добавлена обработка эндпоинта в двух форматах: с `/` в начале и без
|
* добавлена обработка эндпоинта в двух форматах: с `/` в начале и без
|
||||||
* обновлены зависимости
|
* обновлены зависимости
|
||||||
|
|||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
FROM golang:1.24-alpine as builder
|
|
||||||
WORKDIR /build
|
|
||||||
ARG version
|
|
||||||
ENV version_env=$version
|
|
||||||
ARG app_name
|
|
||||||
ENV app_name_env=$app_name
|
|
||||||
COPY . .
|
|
||||||
RUN --mount=type=cache,target=/go/pkg/mod/ \
|
|
||||||
--mount=type=bind,source=go.sum,target=go.sum \
|
|
||||||
--mount=type=bind,source=go.mod,target=go.mod \
|
|
||||||
go mod download -x
|
|
||||||
RUN --mount=type=cache,target=/go/pkg/mod/ \
|
|
||||||
--mount=type=bind,target=. \
|
|
||||||
go build -ldflags="-X 'main.version=$version_env'" -o /main .
|
|
||||||
|
|
||||||
FROM alpine:3.21
|
|
||||||
|
|
||||||
RUN apk add --no-cache tzdata
|
|
||||||
RUN cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime
|
|
||||||
RUN echo "Europe/Moscow" > /etc/timezone
|
|
||||||
|
|
||||||
ARG UID=10001
|
|
||||||
RUN adduser \
|
|
||||||
--disabled-password \
|
|
||||||
--gecos "" \
|
|
||||||
--home "/nonexistent" \
|
|
||||||
--shell "/sbin/nologin" \
|
|
||||||
--no-create-home \
|
|
||||||
--uid "${UID}" \
|
|
||||||
appuser
|
|
||||||
|
|
||||||
RUN mkdir -p /app/data
|
|
||||||
RUN chown appuser:appuser /app/data
|
|
||||||
VOLUME /app/data
|
|
||||||
|
|
||||||
USER appuser
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ARG app_name
|
|
||||||
ENV app_name_env=$app_name
|
|
||||||
COPY --from=builder main /app/$app_name_env
|
|
||||||
COPY /conf/config.yml /app/config.yml
|
|
||||||
COPY /conf/default_remote_config.json* /app/default_remote_config.json
|
|
||||||
|
|
||||||
ENTRYPOINT /app/$app_name_env
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
FROM dockerhub.mos.ru/mosos/arbat:15.5 as builder
|
|
||||||
RUN zypper --no-gpg-checks update -y && zypper --no-gpg-checks install -y go1.24 git
|
|
||||||
WORKDIR /build
|
|
||||||
ARG version
|
|
||||||
ENV version_env=$version
|
|
||||||
ARG app_name
|
|
||||||
ENV app_name_env=$app_name
|
|
||||||
COPY . .
|
|
||||||
ENV GOPROXY=https://repo-mirror.mos.ru/repository/go-public
|
|
||||||
RUN go build -ldflags="-X 'main.version=$version_env'" -o /main .
|
|
||||||
|
|
||||||
FROM dockerhub.mos.ru/mosos/arbat:15.5
|
|
||||||
|
|
||||||
RUN cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime
|
|
||||||
RUN echo "Europe/Moscow" > /etc/timezone
|
|
||||||
|
|
||||||
ARG UID=10001
|
|
||||||
RUN useradd \
|
|
||||||
--home "/nonexistent" \
|
|
||||||
--shell "/sbin/nologin" \
|
|
||||||
--no-create-home \
|
|
||||||
--uid "${UID}" \
|
|
||||||
--user-group \
|
|
||||||
appuser
|
|
||||||
|
|
||||||
RUN mkdir -p /app/data
|
|
||||||
RUN chown appuser:appuser /app/data
|
|
||||||
VOLUME /app/data
|
|
||||||
|
|
||||||
USER appuser
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ARG app_name
|
|
||||||
ENV app_name_env=$app_name
|
|
||||||
COPY --from=builder main /app/$app_name_env
|
|
||||||
COPY /conf/config.yml /app/config.yml
|
|
||||||
COPY /conf/default_remote_config.json* /app/default_remote_config.json
|
|
||||||
COPY /migrations /app/migrations
|
|
||||||
|
|
||||||
ENTRYPOINT /app/$app_name_env
|
|
||||||
+18
-47
@@ -3,7 +3,6 @@ package assembly
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
|
||||||
"isp-gate-service/conf"
|
"isp-gate-service/conf"
|
||||||
"isp-gate-service/routes"
|
"isp-gate-service/routes"
|
||||||
|
|
||||||
@@ -22,9 +21,9 @@ type Assembly struct {
|
|||||||
server *http.Server
|
server *http.Server
|
||||||
logger *log.Adapter
|
logger *log.Adapter
|
||||||
routes *routes.Routes
|
routes *routes.Routes
|
||||||
redisCli redis.UniversalClient
|
|
||||||
systemCli *client.Client
|
systemCli *client.Client
|
||||||
adminCli *client.Client
|
adminCli *client.Client
|
||||||
|
lockerCli *client.Client
|
||||||
|
|
||||||
locations []conf.Location
|
locations []conf.Location
|
||||||
grpcClientByModuleName map[string]*client.Client
|
grpcClientByModuleName map[string]*client.Client
|
||||||
@@ -62,11 +61,14 @@ func New(boot *bootstrap.Bootstrap) (*Assembly, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.WithMessage(err, "create system cli")
|
return nil, errors.WithMessage(err, "create system cli")
|
||||||
}
|
}
|
||||||
|
|
||||||
adminCli, err := client.Default()
|
adminCli, err := client.Default()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.WithMessage(err, "create admin cli")
|
return nil, errors.WithMessage(err, "create admin cli")
|
||||||
}
|
}
|
||||||
|
lockerCli, err := client.Default()
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.WithMessage(err, "create isp-lock-service client")
|
||||||
|
}
|
||||||
|
|
||||||
return &Assembly{
|
return &Assembly{
|
||||||
boot: boot,
|
boot: boot,
|
||||||
@@ -78,6 +80,7 @@ func New(boot *bootstrap.Bootstrap) (*Assembly, error) {
|
|||||||
httpHostManagerByModuleName: httpHostManagerByModuleName,
|
httpHostManagerByModuleName: httpHostManagerByModuleName,
|
||||||
systemCli: systemCli,
|
systemCli: systemCli,
|
||||||
adminCli: adminCli,
|
adminCli: adminCli,
|
||||||
|
lockerCli: lockerCli,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,32 +93,24 @@ func (a *Assembly) ReceiveConfig(ctx context.Context, remoteConfig []byte) error
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
a.logger.Fatal(ctx, errors.WithMessage(err, "upgrade remote config"))
|
a.logger.Fatal(ctx, errors.WithMessage(err, "upgrade remote config"))
|
||||||
}
|
}
|
||||||
err = newCfg.Validate()
|
|
||||||
if err != nil {
|
|
||||||
a.logger.Fatal(ctx, errors.WithMessage(err, "invalid remote config"))
|
|
||||||
}
|
|
||||||
|
|
||||||
a.logger.SetLevel(newCfg.Logging.LogLevel)
|
a.logger.SetLevel(newCfg.Logging.LogLevel)
|
||||||
|
|
||||||
var newRedisCli redis.UniversalClient
|
locator := NewLocator(
|
||||||
if newCfg.Redis != nil {
|
a.logger,
|
||||||
newRedisCli = a.redisClient(*newCfg.Redis)
|
a.grpcClientByModuleName,
|
||||||
}
|
a.httpHostManagerByModuleName,
|
||||||
|
a.routes,
|
||||||
locator := NewLocator(a.logger, a.grpcClientByModuleName, a.httpHostManagerByModuleName, a.routes, a.systemCli, a.adminCli)
|
a.systemCli,
|
||||||
|
a.adminCli,
|
||||||
handler, err := locator.Handler(newCfg, a.locations, newRedisCli)
|
a.lockerCli,
|
||||||
|
)
|
||||||
|
handler, err := locator.Handler(newCfg, a.locations)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.WithMessage(err, "locator handler")
|
return errors.WithMessage(err, "locator handler")
|
||||||
}
|
}
|
||||||
|
|
||||||
a.server.Upgrade(handler)
|
a.server.Upgrade(handler)
|
||||||
|
|
||||||
if a.redisCli != nil {
|
|
||||||
_ = a.redisCli.Close()
|
|
||||||
a.redisCli = newRedisCli
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,9 +125,9 @@ func (a *Assembly) Runners() []app.Runner {
|
|||||||
for moduleName, upgrader := range a.httpHostManagerByModuleName {
|
for moduleName, upgrader := range a.httpHostManagerByModuleName {
|
||||||
eventHandler.RequireModule(moduleName, upgrader)
|
eventHandler.RequireModule(moduleName, upgrader)
|
||||||
}
|
}
|
||||||
|
|
||||||
eventHandler.RequireModule("isp-system-service", a.systemCli)
|
eventHandler.RequireModule("isp-system-service", a.systemCli)
|
||||||
eventHandler.RequireModule("msp-admin-service", a.adminCli)
|
eventHandler.RequireModule("msp-admin-service", a.adminCli)
|
||||||
|
eventHandler.RequireModule("isp-lock-service", a.lockerCli)
|
||||||
|
|
||||||
return []app.Runner{
|
return []app.Runner{
|
||||||
app.RunnerFunc(func(ctx context.Context) error {
|
app.RunnerFunc(func(ctx context.Context) error {
|
||||||
@@ -154,31 +149,7 @@ func (a *Assembly) Closers() []app.Closer {
|
|||||||
for _, cliCloser := range a.grpcClientByModuleName {
|
for _, cliCloser := range a.grpcClientByModuleName {
|
||||||
closers = append(closers, cliCloser)
|
closers = append(closers, cliCloser)
|
||||||
}
|
}
|
||||||
closers = append(closers, a.systemCli, a.adminCli, app.CloserFunc(func() error {
|
closers = append(closers, a.systemCli, a.adminCli, a.lockerCli)
|
||||||
if a.redisCli != nil {
|
|
||||||
return a.redisCli.Close()
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}))
|
|
||||||
|
|
||||||
return closers
|
return closers
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint:ireturn
|
|
||||||
func (a *Assembly) redisClient(config conf.Redis) redis.UniversalClient {
|
|
||||||
if config.Sentinel != nil {
|
|
||||||
return redis.NewFailoverClient(&redis.FailoverOptions{
|
|
||||||
MasterName: config.Sentinel.MasterName,
|
|
||||||
SentinelAddrs: config.Sentinel.Addresses,
|
|
||||||
SentinelUsername: config.Sentinel.Username,
|
|
||||||
SentinelPassword: config.Sentinel.Password,
|
|
||||||
Username: config.Username,
|
|
||||||
Password: config.Password,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return redis.NewClient(&redis.Options{
|
|
||||||
Addr: config.Address,
|
|
||||||
Username: config.Username,
|
|
||||||
Password: config.Password,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
+20
-10
@@ -1,6 +1,8 @@
|
|||||||
package assembly
|
package assembly
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/txix-open/isp-kit/metrics"
|
||||||
|
"github.com/txix-open/isp-kit/metrics/http_metrics"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -12,8 +14,6 @@ import (
|
|||||||
"isp-gate-service/service"
|
"isp-gate-service/service"
|
||||||
|
|
||||||
mux2 "github.com/gorilla/mux"
|
mux2 "github.com/gorilla/mux"
|
||||||
"github.com/redis/go-redis/v9"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/txix-open/isp-kit/grpc/client"
|
"github.com/txix-open/isp-kit/grpc/client"
|
||||||
"github.com/txix-open/isp-kit/lb"
|
"github.com/txix-open/isp-kit/lb"
|
||||||
@@ -27,6 +27,7 @@ type Locator struct {
|
|||||||
routes *routes.Routes
|
routes *routes.Routes
|
||||||
systemCli *client.Client
|
systemCli *client.Client
|
||||||
adminCli *client.Client
|
adminCli *client.Client
|
||||||
|
lockerCli *client.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewLocator(
|
func NewLocator(
|
||||||
@@ -36,6 +37,7 @@ func NewLocator(
|
|||||||
routes *routes.Routes,
|
routes *routes.Routes,
|
||||||
systemCli *client.Client,
|
systemCli *client.Client,
|
||||||
adminCli *client.Client,
|
adminCli *client.Client,
|
||||||
|
lockerCli *client.Client,
|
||||||
) Locator {
|
) Locator {
|
||||||
return Locator{
|
return Locator{
|
||||||
logger: logger,
|
logger: logger,
|
||||||
@@ -44,10 +46,11 @@ func NewLocator(
|
|||||||
routes: routes,
|
routes: routes,
|
||||||
systemCli: systemCli,
|
systemCli: systemCli,
|
||||||
adminCli: adminCli,
|
adminCli: adminCli,
|
||||||
|
lockerCli: lockerCli,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l Locator) Handler(config conf.Remote, locations []conf.Location, redisCli redis.UniversalClient) (http.Handler, error) { // nolint:funlen
|
func (l Locator) Handler(config conf.Remote, locations []conf.Location) (http.Handler, error) { // nolint:funlen
|
||||||
systemRepo := repository.NewSystem(l.systemCli)
|
systemRepo := repository.NewSystem(l.systemCli)
|
||||||
adminRepo := repository.NewAdmin(l.adminCli)
|
adminRepo := repository.NewAdmin(l.adminCli)
|
||||||
|
|
||||||
@@ -64,11 +67,9 @@ func (l Locator) Handler(config conf.Remote, locations []conf.Location, redisCli
|
|||||||
systemRepo,
|
systemRepo,
|
||||||
)
|
)
|
||||||
|
|
||||||
dailyLimitRepo := repository.NewDailyLimit(redisCli)
|
lockRepo := repository.NewLocker(l.lockerCli)
|
||||||
dailyLimitService := service.NewDailyLimit(dailyLimitRepo, config.DailyLimits)
|
dailyLimitService := service.NewDailyLimit(lockRepo, config.DailyLimits)
|
||||||
|
throttlingService := service.NewThrottling(lockRepo, config.Throttling)
|
||||||
throttlingRepo := repository.NewThrottling(redisCli)
|
|
||||||
throttlingService := service.NewThrottling(throttlingRepo, config.Throttling)
|
|
||||||
|
|
||||||
mux := mux2.NewRouter()
|
mux := mux2.NewRouter()
|
||||||
for _, location := range locations {
|
for _, location := range locations {
|
||||||
@@ -90,9 +91,15 @@ func (l Locator) Handler(config conf.Remote, locations []conf.Location, redisCli
|
|||||||
return nil, errors.Errorf("not supported protocol %s", location.Protocol)
|
return nil, errors.Errorf("not supported protocol %s", location.Protocol)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
forwardReqIdByAppId := make(map[int]bool, len(config.ForwardReqIdClientSettings))
|
||||||
|
for _, setting := range config.ForwardReqIdClientSettings {
|
||||||
|
forwardReqIdByAppId[setting.ApplicationId] = setting.ForwardRequestId
|
||||||
|
}
|
||||||
|
|
||||||
|
metricsStorage := http_metrics.NewServerStorage(metrics.DefaultRegistry)
|
||||||
|
|
||||||
handler := middleware.Chain(
|
handler := middleware.Chain(
|
||||||
proxyFunc,
|
proxyFunc,
|
||||||
middleware.RequestId(config.EnableClientRequestIdForwarding),
|
|
||||||
middleware.Logger(
|
middleware.Logger(
|
||||||
l.logger, config.Logging.RequestLogEnable,
|
l.logger, config.Logging.RequestLogEnable,
|
||||||
enableBodyLog,
|
enableBodyLog,
|
||||||
@@ -106,17 +113,20 @@ func (l Locator) Handler(config conf.Remote, locations []conf.Location, redisCli
|
|||||||
middleware.AdminAuthorize(l.routes, adminService),
|
middleware.AdminAuthorize(l.routes, adminService),
|
||||||
middleware.Throttling(throttlingService),
|
middleware.Throttling(throttlingService),
|
||||||
middleware.DailyLimit(dailyLimitService),
|
middleware.DailyLimit(dailyLimitService),
|
||||||
|
middleware.RequestId(config.EnableClientRequestIdForwarding, forwardReqIdByAppId),
|
||||||
|
middleware.Metrics(metricsStorage),
|
||||||
)
|
)
|
||||||
if location.SkipAuth {
|
if location.SkipAuth {
|
||||||
handler = middleware.Chain(
|
handler = middleware.Chain(
|
||||||
proxyFunc,
|
proxyFunc,
|
||||||
middleware.RequestId(config.EnableClientRequestIdForwarding),
|
|
||||||
middleware.Logger(l.logger, config.Logging.RequestLogEnable,
|
middleware.Logger(l.logger, config.Logging.RequestLogEnable,
|
||||||
enableBodyLog,
|
enableBodyLog,
|
||||||
config.Logging.SkipBodyLoggingEndpointPrefixes,
|
config.Logging.SkipBodyLoggingEndpointPrefixes,
|
||||||
config.Logging.EnableForceUnescapingUnicode,
|
config.Logging.EnableForceUnescapingUnicode,
|
||||||
),
|
),
|
||||||
middleware.ErrorHandler(l.logger),
|
middleware.ErrorHandler(l.logger),
|
||||||
|
middleware.RequestId(config.EnableClientRequestIdForwarding, forwardReqIdByAppId),
|
||||||
|
middleware.Metrics(metricsStorage),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
entrypoint := middleware.Entrypoint(
|
entrypoint := middleware.Entrypoint(
|
||||||
|
|||||||
+12
-32
@@ -4,7 +4,6 @@ package conf
|
|||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
"github.com/txix-open/isp-kit/log"
|
"github.com/txix-open/isp-kit/log"
|
||||||
"github.com/txix-open/isp-kit/rc/schema"
|
"github.com/txix-open/isp-kit/rc/schema"
|
||||||
"github.com/txix-open/jsonschema"
|
"github.com/txix-open/jsonschema"
|
||||||
@@ -18,13 +17,18 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Remote struct {
|
type Remote struct {
|
||||||
Redis *Redis `schema:"Настройки Redis,обязательно, если используется механизм суточных ограничений или ограничений пропускной способности"`
|
Http Http `schema:"Настройки HTTP"`
|
||||||
Http Http `schema:"Настройки HTTP"`
|
Logging Logging `schema:"Настройки логирования"`
|
||||||
Logging Logging `schema:"Настройки логирования"`
|
Caching Caching `schema:"Настройки кеширования"`
|
||||||
Caching Caching `schema:"Настройки кеширования"`
|
DailyLimits []DailyLimit `schema:"Настройки суточных ограничений,сбрасываются раз в сутки в 00:00"`
|
||||||
DailyLimits []DailyLimit `schema:"Настройки суточных ограничений,сбрасываются раз в сутки в 00:00"`
|
Throttling []Throttling `schema:"Настройки пропускной способности"`
|
||||||
Throttling []Throttling `schema:"Настройки пропускной способности"`
|
EnableClientRequestIdForwarding bool `schema:"Включить проброс requestId из заголовка запроса"`
|
||||||
EnableClientRequestIdForwarding bool `schema:"Включить проброс requestId из заголовка запроса"`
|
ForwardReqIdClientSettings []ForwardReqIdClientSettings `schema:"Настройки проброcа requestId для приложений"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ForwardReqIdClientSettings struct {
|
||||||
|
ApplicationId int `schema:"Идентификатор приложения"`
|
||||||
|
ForwardRequestId bool `schema:"Включить проброс requestId из заголовка запроса"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Http struct {
|
type Http struct {
|
||||||
@@ -54,27 +58,3 @@ type Throttling struct {
|
|||||||
ApplicationId int `validate:"required" schema:"ID приложения"`
|
ApplicationId int `validate:"required" schema:"ID приложения"`
|
||||||
RequestsPerSeconds int `validate:"required,min=1,max=1000" schema:"Запросов в секунду,не конфликтует с суточными ограничениями, алгоритм не работает на значениях больше 1000"`
|
RequestsPerSeconds int `validate:"required,min=1,max=1000" schema:"Запросов в секунду,не конфликтует с суточными ограничениями, алгоритм не работает на значениях больше 1000"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Redis struct {
|
|
||||||
Address string `schema:"Адрес,обязателено, если sentinel не указан"`
|
|
||||||
Username string `schema:"Имя пользовтаеля"`
|
|
||||||
Password string `schema:"Пароль"`
|
|
||||||
Sentinel *RedisSentinel `schema:"Настройки sentinel,обязательно, если address не указан"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type RedisSentinel struct {
|
|
||||||
Addresses []string `validate:"required" schema:"Адреса нод в кластере"`
|
|
||||||
MasterName string `validate:"required" schema:"Имя мастера"`
|
|
||||||
Username string `schema:"Имя пользовтаеля в sentinel"`
|
|
||||||
Password string `schema:"Пароль в sentinel"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r Remote) Validate() error {
|
|
||||||
if (len(r.Throttling) > 0 || len(r.DailyLimits) > 0) && r.Redis == nil {
|
|
||||||
return errors.New("redis is required if dailyLimits or throttling were specified")
|
|
||||||
}
|
|
||||||
if r.Redis != nil && r.Redis.Sentinel == nil && r.Redis.Address == "" {
|
|
||||||
return errors.New("invalid redis config. sentinel or address are required")
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package domain
|
package domain
|
||||||
|
|
||||||
type AuthData struct {
|
type AuthData struct {
|
||||||
|
AppName string
|
||||||
SystemId int
|
SystemId int
|
||||||
DomainId int
|
DomainId int
|
||||||
ServiceId int
|
ServiceId int
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package entity
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type IncrementRequest struct {
|
||||||
|
Key string
|
||||||
|
Today time.Time
|
||||||
|
}
|
||||||
|
|
||||||
|
type IncrementResponse struct {
|
||||||
|
Value uint64
|
||||||
|
}
|
||||||
|
|
||||||
|
type RateLimiterRequest struct {
|
||||||
|
Key string
|
||||||
|
MaxRps int
|
||||||
|
}
|
||||||
|
|
||||||
|
type RateLimiterResponse struct {
|
||||||
|
Allow bool
|
||||||
|
Remaining int
|
||||||
|
RetryAfter time.Duration
|
||||||
|
}
|
||||||
@@ -1,27 +1,27 @@
|
|||||||
module isp-gate-service
|
module isp-gate-service
|
||||||
|
|
||||||
go 1.24
|
go 1.25
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/go-redis/redis_rate/v10 v10.0.1
|
|
||||||
github.com/google/uuid v1.6.0
|
github.com/google/uuid v1.6.0
|
||||||
github.com/gorilla/mux v1.8.1
|
github.com/gorilla/mux v1.8.1
|
||||||
github.com/gorilla/websocket v1.5.3
|
github.com/gorilla/websocket v1.5.3
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/redis/go-redis/v9 v9.11.0
|
github.com/redis/go-redis/v9 v9.11.0
|
||||||
github.com/stretchr/testify v1.10.0
|
github.com/stretchr/testify v1.11.1
|
||||||
github.com/tomakado/websocketproxy v0.1.0
|
github.com/tomakado/websocketproxy v0.1.0
|
||||||
github.com/txix-open/isp-kit v1.52.1
|
github.com/txix-open/isp-kit v1.64.4
|
||||||
github.com/txix-open/jsonschema v1.3.0
|
github.com/txix-open/jsonschema v1.3.0
|
||||||
golang.org/x/net v0.41.0
|
golang.org/x/net v0.47.0
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090
|
||||||
google.golang.org/grpc v1.73.0
|
google.golang.org/grpc v1.75.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
|
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||||
github.com/txix-open/etp/v4 v4.0.1 // indirect
|
github.com/txix-open/etp/v4 v4.0.1 // indirect
|
||||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
go.opentelemetry.io/auto/sdk v1.2.0 // indirect
|
||||||
|
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
@@ -29,16 +29,16 @@ require (
|
|||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/buger/jsonparser v1.1.1 // indirect
|
github.com/buger/jsonparser v1.1.1 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||||
github.com/coder/websocket v1.8.13 // indirect
|
github.com/coder/websocket v1.8.14 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||||
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
|
github.com/gabriel-vasile/mimetype v1.4.10 // indirect
|
||||||
github.com/getsentry/sentry-go v0.33.0 // indirect
|
github.com/getsentry/sentry-go v0.35.2 // indirect
|
||||||
github.com/go-logr/logr v1.4.3 // indirect
|
github.com/go-logr/logr v1.4.3 // indirect
|
||||||
github.com/go-logr/stdr v1.2.2 // indirect
|
github.com/go-logr/stdr v1.2.2 // indirect
|
||||||
github.com/go-playground/locales v0.14.1 // indirect
|
github.com/go-playground/locales v0.14.1 // indirect
|
||||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
|
||||||
github.com/json-iterator/go v1.1.12 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/julienschmidt/httprouter v1.3.0 // indirect
|
github.com/julienschmidt/httprouter v1.3.0 // indirect
|
||||||
github.com/leodido/go-urn v1.4.0 // indirect
|
github.com/leodido/go-urn v1.4.0 // indirect
|
||||||
@@ -48,10 +48,10 @@ require (
|
|||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/prometheus/client_golang v1.22.0 // indirect
|
github.com/prometheus/client_golang v1.23.2 // indirect
|
||||||
github.com/prometheus/client_model v0.6.2 // indirect
|
github.com/prometheus/client_model v0.6.2 // indirect
|
||||||
github.com/prometheus/common v0.64.0 // indirect
|
github.com/prometheus/common v0.66.1 // indirect
|
||||||
github.com/prometheus/procfs v0.16.1 // indirect
|
github.com/prometheus/procfs v0.17.0 // indirect
|
||||||
github.com/txix-open/bellows v1.2.0 // indirect
|
github.com/txix-open/bellows v1.2.0 // indirect
|
||||||
github.com/txix-open/etp/v3 v3.2.0
|
github.com/txix-open/etp/v3 v3.2.0
|
||||||
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb // indirect
|
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb // indirect
|
||||||
@@ -59,21 +59,21 @@ require (
|
|||||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||||
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0 // indirect
|
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 // indirect
|
||||||
go.opentelemetry.io/otel v1.36.0 // indirect
|
go.opentelemetry.io/otel v1.38.0 // indirect
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0 // indirect
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect
|
||||||
go.opentelemetry.io/otel/metric v1.36.0 // indirect
|
go.opentelemetry.io/otel/metric v1.38.0 // indirect
|
||||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
|
||||||
go.opentelemetry.io/otel/trace v1.36.0 // indirect
|
go.opentelemetry.io/otel/trace v1.38.0 // indirect
|
||||||
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
|
go.opentelemetry.io/proto/otlp v1.8.0 // indirect
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
go.uber.org/zap v1.27.0 // indirect
|
go.uber.org/zap v1.27.0 // indirect
|
||||||
golang.org/x/crypto v0.39.0 // indirect
|
golang.org/x/crypto v0.45.0 // indirect
|
||||||
golang.org/x/sys v0.33.0 // indirect
|
golang.org/x/sys v0.38.0 // indirect
|
||||||
golang.org/x/text v0.26.0 // indirect
|
golang.org/x/text v0.31.0 // indirect
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
|
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 // indirect
|
||||||
google.golang.org/protobuf v1.36.6 // indirect
|
google.golang.org/protobuf v1.36.9 // indirect
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
@@ -12,12 +12,12 @@ github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMU
|
|||||||
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
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 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
|
||||||
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
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 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/coder/websocket v1.8.13 h1:f3QZdXy7uGVz+4uCJy2nTZyM0yTBj8yANEHhqlXZ9FE=
|
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
|
||||||
github.com/coder/websocket v1.8.13/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
|
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.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -25,12 +25,14 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r
|
|||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||||
github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY=
|
github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0=
|
||||||
github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok=
|
github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
|
||||||
github.com/getsentry/sentry-go v0.33.0 h1:YWyDii0KGVov3xOaamOnF0mjOrqSjBqwv48UEzn7QFg=
|
github.com/getsentry/sentry-go v0.35.2 h1:jKuujpRwa8FFRYMIwwZpu83Xh0voll9bmvyc6310WBM=
|
||||||
github.com/getsentry/sentry-go v0.33.0/go.mod h1:C55omcY9ChRQIUcVcGcs+Zdy4ZpQGvNJ7JYHIoSWOtE=
|
github.com/getsentry/sentry-go v0.35.2/go.mod h1:mdL49ixwT2yi57k5eh7mpnDyPybixPzlzEJFu0Z76QA=
|
||||||
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
|
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-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||||
|
github.com/go-faker/faker/v4 v4.6.1 h1:xUyVpAjEtB04l6XFY0V/29oR332rOSPWV4lU8RwDt4k=
|
||||||
|
github.com/go-faker/faker/v4 v4.6.1/go.mod h1:arSdxNCSt7mOhdk8tEolvHeIJ7eX4OX80wXjKKvkKBY=
|
||||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
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 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||||
@@ -42,8 +44,6 @@ 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/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 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||||
github.com/go-redis/redis_rate/v10 v10.0.1 h1:calPxi7tVlxojKunJwQ72kwfozdy25RjA0bCj1h0MUo=
|
|
||||||
github.com/go-redis/redis_rate/v10 v10.0.1/go.mod h1:EMiuO9+cjRkR7UvdvwMO7vbgqJkltQHtwbdIQvaBKIU=
|
|
||||||
github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM=
|
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-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA=
|
||||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||||
@@ -57,14 +57,14 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
|||||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU=
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs=
|
||||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
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/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 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
|
||||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||||
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co=
|
||||||
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
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 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
@@ -90,20 +90,20 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
|||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
|
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
|
||||||
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
|
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
|
||||||
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
|
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/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
|
||||||
github.com/prometheus/common v0.64.0 h1:pdZeA+g617P7oGv1CzdTzyeShxAGrTBsolKNOLQPGO4=
|
github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs=
|
||||||
github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
|
github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=
|
||||||
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
|
github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0=
|
||||||
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
|
github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
|
||||||
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
|
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/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
|
||||||
github.com/redis/go-redis/v9 v9.11.0 h1:E3S08Gl/nJNn5vkxd2i78wZxWAPNZgUNTp8WIJUAiIs=
|
github.com/redis/go-redis/v9 v9.11.0 h1:E3S08Gl/nJNn5vkxd2i78wZxWAPNZgUNTp8WIJUAiIs=
|
||||||
github.com/redis/go-redis/v9 v9.11.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=
|
github.com/redis/go-redis/v9 v9.11.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=
|
||||||
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
|
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||||
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
|
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
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=
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||||
@@ -113,8 +113,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
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.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.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||||
github.com/tomakado/websocketproxy v0.1.0 h1:e037TLXDvEYYHlxHE5pqmj/DytFKm2NRn7i4wbVzIyE=
|
github.com/tomakado/websocketproxy v0.1.0 h1:e037TLXDvEYYHlxHE5pqmj/DytFKm2NRn7i4wbVzIyE=
|
||||||
github.com/tomakado/websocketproxy v0.1.0/go.mod h1:EXg/3jcTJYZ04Hsf93RpY90FYA9lj1Sl+VM7lZI6xpM=
|
github.com/tomakado/websocketproxy v0.1.0/go.mod h1:EXg/3jcTJYZ04Hsf93RpY90FYA9lj1Sl+VM7lZI6xpM=
|
||||||
github.com/txix-open/bellows v1.2.0 h1:CXv8nQaZtB/micraeRilYyj/gtfv+bqBgP5aPYQgjeY=
|
github.com/txix-open/bellows v1.2.0 h1:CXv8nQaZtB/micraeRilYyj/gtfv+bqBgP5aPYQgjeY=
|
||||||
@@ -123,10 +123,10 @@ github.com/txix-open/etp/v3 v3.2.0 h1:EgTchT8VtCYV1iEo/y4jII3/NybrXiQDE0y6pmS350
|
|||||||
github.com/txix-open/etp/v3 v3.2.0/go.mod h1:lgen0TJmiturgBhvlxH1/PQ7iLL/OebKbxPAQYkuKI0=
|
github.com/txix-open/etp/v3 v3.2.0/go.mod h1:lgen0TJmiturgBhvlxH1/PQ7iLL/OebKbxPAQYkuKI0=
|
||||||
github.com/txix-open/etp/v4 v4.0.1 h1:5VSYgGsvnMz0tvUHsjVWFETI0qWBTCF1O3ARCHaCIgA=
|
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/etp/v4 v4.0.1/go.mod h1:FIu7TUDdwcgmtmF6tFTV1bGA2fRY/iVaPQdsGzvqYc8=
|
||||||
github.com/txix-open/grmq v1.8.1 h1:bcPLuYZXJ+1h9D3w7JYzUTypnQsw9XAT0Ftl/Fu+cZA=
|
github.com/txix-open/grmq v1.9.0 h1:ArDbJJcFX9zXKEcPf49rp9nYiRyGMJxGKJAxdbSsfaM=
|
||||||
github.com/txix-open/grmq v1.8.1/go.mod h1:EyFOP17KrwEFOUjR+PH8iH3LCtiN9TSQ8t0ysyk62po=
|
github.com/txix-open/grmq v1.9.0/go.mod h1:EyFOP17KrwEFOUjR+PH8iH3LCtiN9TSQ8t0ysyk62po=
|
||||||
github.com/txix-open/isp-kit v1.52.1 h1:OjwfUNL50RyhEedFc7ZI+X6YXg47yF88bQyfghbbyag=
|
github.com/txix-open/isp-kit v1.64.4 h1:Z8YuaAhfJnvTdHAZB03GY5Kgnz7RyxWh1i3mALmj7A8=
|
||||||
github.com/txix-open/isp-kit v1.52.1/go.mod h1:OkscabRkpFGjUOFrbPM7yTKD/Br2/iv5/PWr/T2Jtd4=
|
github.com/txix-open/isp-kit v1.64.4/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 h1:XGuOTg22G7PdqfKypjajM20/i5FyGfFYsJKmheebKi4=
|
||||||
github.com/txix-open/jsonschema v1.3.0/go.mod h1:l8YDZ1nvJrw6uxWowSVOxCV/ebiMJyapffW87ZEqH00=
|
github.com/txix-open/jsonschema v1.3.0/go.mod h1:l8YDZ1nvJrw6uxWowSVOxCV/ebiMJyapffW87ZEqH00=
|
||||||
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 h1:UJgT4u/QMv5QHKOQeJ7igShHa36c2/vIRqJiRLdDlf0=
|
||||||
@@ -140,52 +140,56 @@ 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/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 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
|
||||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
go.opentelemetry.io/auto/sdk v1.2.0 h1:YpRtUFjvhSymycLS2T81lT6IGhcUP+LUPtv0iv1N8bM=
|
||||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
go.opentelemetry.io/auto/sdk v1.2.0/go.mod h1:1deq2zL7rwjwC8mR7XgY2N+tlIl6pjmEUoLDENMEzwk=
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0 h1:0tY123n7CdWMem7MOVdKOt0YfshufLCwfE5Bob+hQuM=
|
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.60.0/go.mod h1:CosX/aS4eHnG9D7nESYpV753l4j9q5j3SL/PUYd2lR8=
|
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.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU=
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ=
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
|
||||||
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
|
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
||||||
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
|
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 h1:dNzwXjZKpMpE2JhmO+9HsPl42NIXFIFSUSSs0fiqra0=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0/go.mod h1:90PoxvaEB5n6AOdZvi+yWJQoE95U8Dhhw2bSyRqnTD0=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0 h1:nRVXXvf78e00EwY6Wp0YII8ww2JVWshZ20HfTlE11AM=
|
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.36.0/go.mod h1:r49hO7CgrxY9Voaj3Xe8pANWtr0Oq916d0XAmOoCZAQ=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4=
|
||||||
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
|
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
|
||||||
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
|
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
|
||||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
|
||||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
|
||||||
go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
|
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
|
||||||
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
|
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
|
||||||
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
|
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
|
||||||
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
|
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
|
||||||
go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os=
|
go.opentelemetry.io/proto/otlp v1.8.0 h1:fRAZQDcAFHySxpJ1TwlA1cJ4tvcrw7nXl9xWWC8N5CE=
|
||||||
go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo=
|
go.opentelemetry.io/proto/otlp v1.8.0/go.mod h1:tIeYOeNBU4cvmPqpaji1P+KbB4Oloai8wN4rWzRrFF0=
|
||||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
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/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 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||||
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
|
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
|
||||||
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
|
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
|
||||||
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
|
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
|
||||||
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
|
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
|
||||||
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
|
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||||
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||||
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||||
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||||
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
|
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||||
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
|
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 h1:oWVWY3NzT7KJppx2UKhKmzPq4SRe0LdCijVRwvGeikY=
|
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822/go.mod h1:h3c4v36UTKzUiuaOKQ6gr3S+0hovBtUrXzTG/i3+XEc=
|
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE=
|
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
|
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
||||||
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
|
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 h1:d8Nakh1G+ur7+P3GcMjpRDEkoLUcLW2iU92XVqR+XMQ=
|
||||||
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
|
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090/go.mod h1:U8EXRNSd8sUYyDfs/It7KVWodQr+Hf9xtxyxWudSwEw=
|
||||||
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090 h1:/OQuEa4YWtDt7uQWHd3q3sUMb+QOLQUg1xa8CEsRv5w=
|
||||||
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090/go.mod h1:GmFNa4BdJZ2a8G+wCe9Bg3wwThLrJun751XstdJt5Og=
|
||||||
|
google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI=
|
||||||
|
google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
|
||||||
|
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
|
||||||
|
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||||
|
|||||||
@@ -0,0 +1,402 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1977-02-22\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"38924\",\"flat\":\"185\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Сергей\",\"middleName\":\"Петрович\",\"birthDay\":\"1977-02-22\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"38924\",\"flat\":\"185\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1950-08-18\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"63988\",\"flat\":\"78\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Петров\",\"firstName\":\"Иван\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1950-08-18\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"63988\",\"flat\":\"78\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1991-01-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"07460\",\"flat\":\"39\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Сергей\",\"middleName\":\"Козлович\",\"birthDay\":\"1991-01-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"07460\",\"flat\":\"39\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1982-05-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"31319\",\"flat\":\"191\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Иван\",\"middleName\":\"Петрович\",\"birthDay\":\"1982-05-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"31319\",\"flat\":\"191\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1993-01-13\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"70892\",\"flat\":\"51\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Алексей\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1993-01-13\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"70892\",\"flat\":\"51\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1963-10-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"64647\",\"flat\":\"176\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Петров\",\"firstName\":\"Петр\",\"middleName\":\"Михайлович\",\"birthDay\":\"1963-10-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"64647\",\"flat\":\"176\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1997-01-27\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"05466\",\"flat\":\"101\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Петров\",\"firstName\":\"Алексей\",\"middleName\":\"Козлович\",\"birthDay\":\"1997-01-27\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"05466\",\"flat\":\"101\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1985-06-07\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"62526\",\"flat\":\"40\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Петр\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1985-06-07\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"62526\",\"flat\":\"40\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1964-02-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"67088\",\"flat\":\"111\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Иван\",\"middleName\":\"Петрович\",\"birthDay\":\"1964-02-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"67088\",\"flat\":\"111\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1985-11-07\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"59230\",\"flat\":\"143\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Михаил\",\"middleName\":\"Козлович\",\"birthDay\":\"1985-11-07\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"59230\",\"flat\":\"143\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1988-10-25\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"03392\",\"flat\":\"180\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Сергей\",\"middleName\":\"Козлович\",\"birthDay\":\"1988-10-25\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"03392\",\"flat\":\"180\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1977-06-16\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"20665\",\"flat\":\"166\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Алексей\",\"middleName\":\"Козлович\",\"birthDay\":\"1977-06-16\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"20665\",\"flat\":\"166\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1987-12-12\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"66035\",\"flat\":\"90\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Сергей\",\"middleName\":\"Козлович\",\"birthDay\":\"1987-12-12\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"66035\",\"flat\":\"90\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1974-02-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"39439\",\"flat\":\"148\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Алексей\",\"middleName\":\"Петрович\",\"birthDay\":\"1974-02-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"39439\",\"flat\":\"148\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1989-02-21\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"01481\",\"flat\":\"147\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Сергей\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1989-02-21\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"01481\",\"flat\":\"147\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1952-11-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"54019\",\"flat\":\"67\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Петр\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1952-11-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"54019\",\"flat\":\"67\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1967-04-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"80312\",\"flat\":\"79\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Сергей\",\"middleName\":\"Иванович\",\"birthDay\":\"1967-04-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"80312\",\"flat\":\"79\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1951-12-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"60752\",\"flat\":\"136\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Иван\",\"middleName\":\"Козлович\",\"birthDay\":\"1951-12-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"60752\",\"flat\":\"136\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1989-07-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"52236\",\"flat\":\"49\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Петров\",\"firstName\":\"Михаил\",\"middleName\":\"Козлович\",\"birthDay\":\"1989-07-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"52236\",\"flat\":\"49\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1961-06-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"48602\",\"flat\":\"159\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Петр\",\"middleName\":\"Козлович\",\"birthDay\":\"1961-06-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"48602\",\"flat\":\"159\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1966-11-11\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"30072\",\"flat\":\"58\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Сергей\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1966-11-11\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"30072\",\"flat\":\"58\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1974-08-21\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"22508\",\"flat\":\"80\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Михаил\",\"middleName\":\"Петрович\",\"birthDay\":\"1974-08-21\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"22508\",\"flat\":\"80\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1993-04-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"31222\",\"flat\":\"130\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Михаил\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1993-04-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"31222\",\"flat\":\"130\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1969-11-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"43510\",\"flat\":\"98\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Петр\",\"middleName\":\"Петрович\",\"birthDay\":\"1969-11-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"43510\",\"flat\":\"98\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1965-04-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"93733\",\"flat\":\"39\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Алексей\",\"middleName\":\"Петрович\",\"birthDay\":\"1965-04-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"93733\",\"flat\":\"39\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1969-05-28\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"87093\",\"flat\":\"167\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Алексей\",\"middleName\":\"Михайлович\",\"birthDay\":\"1969-05-28\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"87093\",\"flat\":\"167\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1951-12-24\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"27732\",\"flat\":\"112\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Сергей\",\"middleName\":\"Михайлович\",\"birthDay\":\"1951-12-24\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"27732\",\"flat\":\"112\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1989-07-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"31765\",\"flat\":\"51\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Михаил\",\"middleName\":\"Михайлович\",\"birthDay\":\"1989-07-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"31765\",\"flat\":\"51\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1978-05-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"96998\",\"flat\":\"180\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Алексей\",\"middleName\":\"Иванович\",\"birthDay\":\"1978-05-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"96998\",\"flat\":\"180\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1993-10-12\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"01064\",\"flat\":\"100\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Михаил\",\"middleName\":\"Михайлович\",\"birthDay\":\"1993-10-12\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"01064\",\"flat\":\"100\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1993-04-19\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"45967\",\"flat\":\"82\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Петр\",\"middleName\":\"Иванович\",\"birthDay\":\"1993-04-19\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"45967\",\"flat\":\"82\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1981-08-21\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"74957\",\"flat\":\"64\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Петров\",\"firstName\":\"Петр\",\"middleName\":\"Михайлович\",\"birthDay\":\"1981-08-21\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"74957\",\"flat\":\"64\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1993-01-10\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"19023\",\"flat\":\"22\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Алексей\",\"middleName\":\"Михайлович\",\"birthDay\":\"1993-01-10\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"19023\",\"flat\":\"22\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1962-01-27\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"73929\",\"flat\":\"198\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Сергей\",\"middleName\":\"Козлович\",\"birthDay\":\"1962-01-27\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"73929\",\"flat\":\"198\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1956-08-03\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"46793\",\"flat\":\"83\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Петр\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1956-08-03\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"46793\",\"flat\":\"83\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1954-04-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"22410\",\"flat\":\"162\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Сергей\",\"middleName\":\"Петрович\",\"birthDay\":\"1954-04-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"22410\",\"flat\":\"162\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1991-12-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"92089\",\"flat\":\"62\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Петров\",\"firstName\":\"Иван\",\"middleName\":\"Петрович\",\"birthDay\":\"1991-12-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"92089\",\"flat\":\"62\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1970-10-10\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"91849\",\"flat\":\"22\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Иван\",\"middleName\":\"Иванович\",\"birthDay\":\"1970-10-10\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"91849\",\"flat\":\"22\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1952-07-25\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"49639\",\"flat\":\"87\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Сергей\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1952-07-25\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"49639\",\"flat\":\"87\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1967-03-09\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"43225\",\"flat\":\"165\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Иван\",\"middleName\":\"Петрович\",\"birthDay\":\"1967-03-09\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"43225\",\"flat\":\"165\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1969-05-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"90629\",\"flat\":\"102\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Алексей\",\"middleName\":\"Иванович\",\"birthDay\":\"1969-05-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"90629\",\"flat\":\"102\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1989-07-13\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"14363\",\"flat\":\"38\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Михаил\",\"middleName\":\"Козлович\",\"birthDay\":\"1989-07-13\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"14363\",\"flat\":\"38\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1992-12-26\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"80159\",\"flat\":\"66\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Алексей\",\"middleName\":\"Козлович\",\"birthDay\":\"1992-12-26\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"80159\",\"flat\":\"66\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1982-05-14\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"76418\",\"flat\":\"69\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Сергей\",\"middleName\":\"Михайлович\",\"birthDay\":\"1982-05-14\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"76418\",\"flat\":\"69\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1966-08-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"63785\",\"flat\":\"185\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Михаил\",\"middleName\":\"Петрович\",\"birthDay\":\"1966-08-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"63785\",\"flat\":\"185\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1985-06-22\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"35007\",\"flat\":\"72\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Иван\",\"middleName\":\"Михайлович\",\"birthDay\":\"1985-06-22\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"35007\",\"flat\":\"72\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1966-07-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"78468\",\"flat\":\"85\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Алексей\",\"middleName\":\"Козлович\",\"birthDay\":\"1966-07-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"78468\",\"flat\":\"85\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1959-10-28\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"40385\",\"flat\":\"40\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Михаил\",\"middleName\":\"Михайлович\",\"birthDay\":\"1959-10-28\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"40385\",\"flat\":\"40\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1982-07-15\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"20633\",\"flat\":\"74\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Алексей\",\"middleName\":\"Козлович\",\"birthDay\":\"1982-07-15\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"20633\",\"flat\":\"74\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1983-11-27\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"61366\",\"flat\":\"140\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Иван\",\"middleName\":\"Петрович\",\"birthDay\":\"1983-11-27\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"61366\",\"flat\":\"140\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1991-10-02\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"05236\",\"flat\":\"4\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Сергей\",\"middleName\":\"Михайлович\",\"birthDay\":\"1991-10-02\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"05236\",\"flat\":\"4\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1960-08-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"01631\",\"flat\":\"93\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Петров\",\"firstName\":\"Петр\",\"middleName\":\"Козлович\",\"birthDay\":\"1960-08-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"01631\",\"flat\":\"93\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1999-09-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"76893\",\"flat\":\"170\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Сергей\",\"middleName\":\"Козлович\",\"birthDay\":\"1999-09-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"76893\",\"flat\":\"170\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1966-01-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"72424\",\"flat\":\"98\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Алексей\",\"middleName\":\"Козлович\",\"birthDay\":\"1966-01-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"72424\",\"flat\":\"98\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1977-06-24\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"04063\",\"flat\":\"82\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Михаил\",\"middleName\":\"Петрович\",\"birthDay\":\"1977-06-24\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"04063\",\"flat\":\"82\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1969-04-13\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"43443\",\"flat\":\"80\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Сергей\",\"middleName\":\"Петрович\",\"birthDay\":\"1969-04-13\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"43443\",\"flat\":\"80\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1950-11-03\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"83732\",\"flat\":\"46\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Иван\",\"middleName\":\"Иванович\",\"birthDay\":\"1950-11-03\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"83732\",\"flat\":\"46\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1958-04-03\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"91863\",\"flat\":\"47\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Иван\",\"middleName\":\"Михайлович\",\"birthDay\":\"1958-04-03\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"91863\",\"flat\":\"47\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1953-10-26\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"67751\",\"flat\":\"61\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Алексей\",\"middleName\":\"Иванович\",\"birthDay\":\"1953-10-26\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"67751\",\"flat\":\"61\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1988-01-28\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"14661\",\"flat\":\"58\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Михаил\",\"middleName\":\"Козлович\",\"birthDay\":\"1988-01-28\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"14661\",\"flat\":\"58\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1981-12-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"10812\",\"flat\":\"57\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Алексей\",\"middleName\":\"Козлович\",\"birthDay\":\"1981-12-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"10812\",\"flat\":\"57\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1970-01-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"87418\",\"flat\":\"150\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Михаил\",\"middleName\":\"Иванович\",\"birthDay\":\"1970-01-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"87418\",\"flat\":\"150\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1952-02-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"71225\",\"flat\":\"39\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Иван\",\"middleName\":\"Иванович\",\"birthDay\":\"1952-02-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"71225\",\"flat\":\"39\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1993-08-15\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"80780\",\"flat\":\"188\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Иван\",\"middleName\":\"Михайлович\",\"birthDay\":\"1993-08-15\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"80780\",\"flat\":\"188\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1981-07-07\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"17884\",\"flat\":\"138\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Петр\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1981-07-07\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"17884\",\"flat\":\"138\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1963-01-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"75966\",\"flat\":\"12\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Петр\",\"middleName\":\"Михайлович\",\"birthDay\":\"1963-01-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"75966\",\"flat\":\"12\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1962-11-13\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"80065\",\"flat\":\"79\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Михаил\",\"middleName\":\"Иванович\",\"birthDay\":\"1962-11-13\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"80065\",\"flat\":\"79\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1963-07-18\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"42476\",\"flat\":\"4\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Алексей\",\"middleName\":\"Иванович\",\"birthDay\":\"1963-07-18\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"42476\",\"flat\":\"4\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1961-12-18\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"34741\",\"flat\":\"200\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Иван\",\"middleName\":\"Козлович\",\"birthDay\":\"1961-12-18\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"34741\",\"flat\":\"200\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1998-06-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"46796\",\"flat\":\"144\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Петр\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1998-06-17\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"46796\",\"flat\":\"144\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1965-07-24\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"98293\",\"flat\":\"188\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Михаил\",\"middleName\":\"Козлович\",\"birthDay\":\"1965-07-24\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"98293\",\"flat\":\"188\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1980-12-27\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"67475\",\"flat\":\"122\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Петров\",\"firstName\":\"Иван\",\"middleName\":\"Петрович\",\"birthDay\":\"1980-12-27\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"67475\",\"flat\":\"122\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1981-02-25\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"90604\",\"flat\":\"63\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Иван\",\"middleName\":\"Козлович\",\"birthDay\":\"1981-02-25\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"90604\",\"flat\":\"63\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1954-05-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"37669\",\"flat\":\"28\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Алексей\",\"middleName\":\"Козлович\",\"birthDay\":\"1954-05-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"37669\",\"flat\":\"28\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1981-09-22\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"32425\",\"flat\":\"25\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Петров\",\"firstName\":\"Иван\",\"middleName\":\"Козлович\",\"birthDay\":\"1981-09-22\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"32425\",\"flat\":\"25\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1964-11-16\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"41589\",\"flat\":\"105\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Иван\",\"middleName\":\"Михайлович\",\"birthDay\":\"1964-11-16\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"41589\",\"flat\":\"105\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1969-12-25\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"06495\",\"flat\":\"32\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Петров\",\"firstName\":\"Петр\",\"middleName\":\"Петрович\",\"birthDay\":\"1969-12-25\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"06495\",\"flat\":\"32\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1969-01-19\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"58569\",\"flat\":\"79\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Петр\",\"middleName\":\"Иванович\",\"birthDay\":\"1969-01-19\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"58569\",\"flat\":\"79\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1983-01-11\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"39765\",\"flat\":\"162\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Алексей\",\"middleName\":\"Козлович\",\"birthDay\":\"1983-01-11\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"39765\",\"flat\":\"162\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1956-07-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"24412\",\"flat\":\"118\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Петр\",\"middleName\":\"Михайлович\",\"birthDay\":\"1956-07-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"24412\",\"flat\":\"118\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1981-08-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"45511\",\"flat\":\"88\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Михаил\",\"middleName\":\"Иванович\",\"birthDay\":\"1981-08-20\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"45511\",\"flat\":\"88\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1951-12-02\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"19511\",\"flat\":\"53\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Сергей\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1951-12-02\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"19511\",\"flat\":\"53\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1963-06-22\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"17982\",\"flat\":\"62\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Иван\",\"middleName\":\"Михайлович\",\"birthDay\":\"1963-06-22\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"17982\",\"flat\":\"62\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1960-11-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"52978\",\"flat\":\"30\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Алексей\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1960-11-06\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"52978\",\"flat\":\"30\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1966-01-25\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"75948\",\"flat\":\"49\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Михаил\",\"middleName\":\"Иванович\",\"birthDay\":\"1966-01-25\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"75948\",\"flat\":\"49\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1986-06-02\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"23634\",\"flat\":\"64\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Сергей\",\"middleName\":\"Иванович\",\"birthDay\":\"1986-06-02\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"23634\",\"flat\":\"64\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1969-11-07\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"26792\",\"flat\":\"87\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Михаил\",\"middleName\":\"Иванович\",\"birthDay\":\"1969-11-07\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"26792\",\"flat\":\"87\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1956-09-07\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"70768\",\"flat\":\"108\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Иван\",\"middleName\":\"Петрович\",\"birthDay\":\"1956-09-07\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"70768\",\"flat\":\"108\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0410\\u043B\\u0435\\u043A\\u0441\\u0435\\u0439\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1998-07-14\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"18771\",\"flat\":\"178\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Алексей\",\"middleName\":\"Михайлович\",\"birthDay\":\"1998-07-14\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"18771\",\"flat\":\"178\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1999-02-19\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"01147\",\"flat\":\"162\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Михаил\",\"middleName\":\"Петрович\",\"birthDay\":\"1999-02-19\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"01147\",\"flat\":\"162\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1959-02-10\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"45931\",\"flat\":\"179\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Иван\",\"middleName\":\"Михайлович\",\"birthDay\":\"1959-02-10\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"45931\",\"flat\":\"179\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0421\\u0438\\u0434\\u043E\\u0440\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1967-07-19\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"42295\",\"flat\":\"130\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Сидоров\",\"firstName\":\"Михаил\",\"middleName\":\"Петрович\",\"birthDay\":\"1967-07-19\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"42295\",\"flat\":\"130\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1961-11-21\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"14998\",\"flat\":\"185\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Сергей\",\"middleName\":\"Иванович\",\"birthDay\":\"1961-11-21\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"14998\",\"flat\":\"185\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041C\\u0438\\u0445\\u0430\\u0438\\u043B\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1963-08-11\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"31521\",\"flat\":\"198\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Михаил\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1963-08-11\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"31521\",\"flat\":\"198\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1965-09-26\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"50495\",\"flat\":\"67\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Сергей\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1965-09-26\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"50495\",\"flat\":\"67\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0418\\u0432\\u0430\\u043D\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1950-05-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"96951\",\"flat\":\"179\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Иван\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1950-05-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"96951\",\"flat\":\"179\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1998-01-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"59966\",\"flat\":\"108\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Петр\",\"middleName\":\"Козлович\",\"birthDay\":\"1998-01-23\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"59966\",\"flat\":\"108\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u0418\\u0432\\u0430\\u043D\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1981-02-14\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"49056\",\"flat\":\"113\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Иванов\",\"firstName\":\"Сергей\",\"middleName\":\"Петрович\",\"birthDay\":\"1981-02-14\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"49056\",\"flat\":\"113\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041A\\u043E\\u0437\\u043B\\u043E\\u0432\",\"firstName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0439\",\"middleName\":\"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432\\u0438\\u0447\",\"birthDay\":\"1995-08-26\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"27045\",\"flat\":\"107\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Козлов\",\"firstName\":\"Сергей\",\"middleName\":\"Петрович\",\"birthDay\":\"1995-08-26\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"27045\",\"flat\":\"107\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"raw": "{\"fiodr\":{\"lastName\":\"\\u041C\\u0438\\u0445\\u0430\\u0439\\u043B\\u043E\\u0432\",\"firstName\":\"\\u041F\\u0435\\u0442\\u0440\",\"middleName\":\"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447\",\"birthDay\":\"1958-07-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"35022\",\"flat\":\"180\"}}",
|
||||||
|
"expected": "{\"fiodr\":{\"lastName\":\"Михайлов\",\"firstName\":\"Петр\",\"middleName\":\"Сергеевич\",\"birthDay\":\"1958-07-05\"},\"objectType\":\"addresses.addr_registration\",\"params\":{\"unom\":\"35022\",\"flat\":\"180\"}}"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
// nolint:mnd
|
||||||
|
package helpers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"unsafe"
|
||||||
|
|
||||||
|
"github.com/txix-open/isp-kit/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
func UnescapeUnicodeJson(data []byte) []byte {
|
||||||
|
var body any
|
||||||
|
err := json.Unmarshal(data, &body)
|
||||||
|
if err != nil {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
newData, err := json.Marshal(body)
|
||||||
|
if err != nil {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
return newData
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnescapeUnicode(data []byte) []byte {
|
||||||
|
n := len(data)
|
||||||
|
out := make([]byte, len(data)) // максимально возможный размер
|
||||||
|
j := 0 // индекс записи
|
||||||
|
|
||||||
|
for i := 0; i < n; {
|
||||||
|
if data[i] != '\\' {
|
||||||
|
// копируем весь блок до следующего '\'
|
||||||
|
start := i
|
||||||
|
for i < n && data[i] != '\\' {
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
j += copy(out[j:], data[start:i])
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if isUnicodeEscape(data, i) {
|
||||||
|
r, consumed := decodeUnicodeEscape(data[i:])
|
||||||
|
if r >= 0 {
|
||||||
|
j = appendRuneAt(out, j, uint32(r))
|
||||||
|
i += consumed
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// обычный байт (одиночный '\')
|
||||||
|
out[j] = data[i]
|
||||||
|
j++
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
|
||||||
|
return out[:j]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Проверяет, начинается ли здесь \uXXXX
|
||||||
|
func isUnicodeEscape(data []byte, i int) bool {
|
||||||
|
return i+5 < len(data) && data[i] == '\\' && data[i+1] == 'u'
|
||||||
|
}
|
||||||
|
|
||||||
|
// Декодирует \uXXXX, учитывая суррогатную пару.
|
||||||
|
// Возвращает руну и сколько байт было прочитано.
|
||||||
|
func decodeUnicodeEscape(data []byte) (rune, int) {
|
||||||
|
v1, ok := parseHex4(data[2:6])
|
||||||
|
if !ok {
|
||||||
|
return -1, 1
|
||||||
|
}
|
||||||
|
|
||||||
|
// Проверка суррогатной пары
|
||||||
|
if 0xD800 <= v1 && v1 <= 0xDBFF && isUnicodeEscape(data, 6) {
|
||||||
|
v2, ok2 := parseHex4(data[8:12])
|
||||||
|
if ok2 && 0xDC00 <= v2 && v2 <= 0xDFFF {
|
||||||
|
r := 0x10000 + ((uint32(v1)-0xD800)<<10 | (uint32(v2) - 0xDC00))
|
||||||
|
return rune(r), 12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return rune(v1), 6
|
||||||
|
}
|
||||||
|
|
||||||
|
// Парсим 4 hex-символа через hexValue
|
||||||
|
func parseHex4(b []byte) (uint16, bool) {
|
||||||
|
v := uint16(0)
|
||||||
|
for _, c := range b {
|
||||||
|
h, ok := hexValue(c)
|
||||||
|
if !ok {
|
||||||
|
return 0, false
|
||||||
|
}
|
||||||
|
v = v<<4 | h
|
||||||
|
}
|
||||||
|
return v, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func hexValue(b byte) (uint16, bool) {
|
||||||
|
switch {
|
||||||
|
case '0' <= b && b <= '9':
|
||||||
|
return uint16(b - '0'), true
|
||||||
|
case 'a' <= b && b <= 'f':
|
||||||
|
return uint16(b - 'a' + 10), true
|
||||||
|
case 'A' <= b && b <= 'F':
|
||||||
|
return uint16(b - 'A' + 10), true
|
||||||
|
default:
|
||||||
|
return 0, false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// appendRune добавляет руну в UTF-8
|
||||||
|
func appendRuneAt(buf []byte, j int, r uint32) int {
|
||||||
|
p := (*[4]byte)(unsafe.Pointer(&buf[j]))
|
||||||
|
switch {
|
||||||
|
case r < 0x80:
|
||||||
|
p[0] = byte(r)
|
||||||
|
return j + 1
|
||||||
|
case r < 0x800:
|
||||||
|
p[0] = 0xC0 | byte(r>>6)
|
||||||
|
p[1] = 0x80 | byte(r&0x3F)
|
||||||
|
return j + 2
|
||||||
|
case r < 0x10000:
|
||||||
|
p[0] = 0xE0 | byte(r>>12)
|
||||||
|
p[1] = 0x80 | byte((r>>6)&0x3F)
|
||||||
|
p[2] = 0x80 | byte(r&0x3F)
|
||||||
|
return j + 3
|
||||||
|
default:
|
||||||
|
p[0] = 0xF0 | byte(r>>18)
|
||||||
|
p[1] = 0x80 | byte((r>>12)&0x3F)
|
||||||
|
p[2] = 0x80 | byte((r>>6)&0x3F)
|
||||||
|
p[3] = 0x80 | byte(r&0x3F)
|
||||||
|
return j + 4
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package helpers_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"isp-gate-service/helpers"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// nolint:gochecknoglobals,lll
|
||||||
|
var (
|
||||||
|
rawUnicode = []byte(`{"fiodr":{"lastName":"\\u041F\\u0435\\u0442\\u0440\\u043E\\u0432","firstName":"\\u0418\\u0432\\u0430\\u043D","middleName":"\\u0421\\u0435\\u0440\\u0433\\u0435\\u0435\\u0432\\u0438\\u0447","birthDay":"1950-08-18"},"objectType":"addresses.addr_registration","params":{"unom":"63988","flat":"78"}}`)
|
||||||
|
rawAscii = []byte(`{"fiodr":{"lastName":"Петров","firstName":"Иван","middleName":"Сергеевич","birthDay":"1950-08-18"},"objectType":"addresses.addr_registration","params":{"unom":"63988","flat":"78"}}`)
|
||||||
|
)
|
||||||
|
|
||||||
|
func Benchmark_UnescapeUnicodeJson_Unicode(b *testing.B) {
|
||||||
|
for b.Loop() {
|
||||||
|
_ = helpers.UnescapeUnicodeJson(rawUnicode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func Benchmark_UnescapeUnicodeJson_Anscii(b *testing.B) {
|
||||||
|
for b.Loop() {
|
||||||
|
_ = helpers.UnescapeUnicodeJson(rawAscii)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func Benchmark_UnescapeUnicode_Unicode(b *testing.B) {
|
||||||
|
for b.Loop() {
|
||||||
|
_ = helpers.UnescapeUnicode(rawUnicode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func Benchmark_UnescapeUnicode_Anscii(b *testing.B) {
|
||||||
|
for b.Loop() {
|
||||||
|
_ = helpers.UnescapeUnicode(rawAscii)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package helpers_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"isp-gate-service/helpers"
|
||||||
|
"os"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/txix-open/isp-kit/json"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestForceUnescapingUnicode(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
|
type testCase struct {
|
||||||
|
Raw string
|
||||||
|
Expected string
|
||||||
|
}
|
||||||
|
|
||||||
|
data, err := os.ReadFile("./test_data/json_cases.json")
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
var testCases []testCase
|
||||||
|
require.NoError(t, json.Unmarshal(data, &testCases))
|
||||||
|
|
||||||
|
for i, tt := range testCases {
|
||||||
|
t.Run(fmt.Sprintf("case_%d", i), func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
|
out := helpers.UnescapeUnicode([]byte(tt.Raw))
|
||||||
|
require.JSONEq(t, tt.Expected, string(out))
|
||||||
|
|
||||||
|
jsonOut := helpers.UnescapeUnicodeJson([]byte(tt.Raw))
|
||||||
|
require.JSONEq(t, tt.Expected, string(jsonOut))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,10 +4,11 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
"isp-gate-service/domain"
|
"isp-gate-service/domain"
|
||||||
"isp-gate-service/httperrors"
|
"isp-gate-service/httperrors"
|
||||||
"isp-gate-service/request"
|
"isp-gate-service/request"
|
||||||
|
|
||||||
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -21,7 +22,10 @@ type Authenticator interface {
|
|||||||
func Authenticate(authenticator Authenticator) Middleware {
|
func Authenticate(authenticator Authenticator) Middleware {
|
||||||
return func(next Handler) Handler {
|
return func(next Handler) Handler {
|
||||||
return HandlerFunc(func(ctx *request.Context) error {
|
return HandlerFunc(func(ctx *request.Context) error {
|
||||||
token := ctx.Param(applicationTokenHeader)
|
token, appName, err := extractToken(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if token == "" {
|
if token == "" {
|
||||||
return httperrors.New(
|
return httperrors.New(
|
||||||
http.StatusUnauthorized,
|
http.StatusUnauthorized,
|
||||||
@@ -32,18 +36,51 @@ func Authenticate(authenticator Authenticator) Middleware {
|
|||||||
|
|
||||||
resp, err := authenticator.Authenticate(ctx.Context(), token)
|
resp, err := authenticator.Authenticate(ctx.Context(), token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.WithMessagef(err, "authenticate: authenticate")
|
return errors.WithMessage(err, "authenticate: authenticator error")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !resp.Authenticated {
|
if !resp.Authenticated {
|
||||||
return httperrors.New(
|
return httperrors.New(
|
||||||
http.StatusUnauthorized,
|
http.StatusUnauthorized,
|
||||||
"invalid application token",
|
"invalid application token",
|
||||||
errors.WithMessage(errors.New(resp.ErrorReason), "authenticate: authenticate"),
|
errors.Errorf("authenticate: %s", resp.ErrorReason),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
ctx.Authenticate(request.AuthData(*resp.AuthData))
|
|
||||||
|
|
||||||
|
if appName != "" && resp.AuthData.AppName != appName {
|
||||||
|
return httperrors.New(
|
||||||
|
http.StatusUnauthorized,
|
||||||
|
"invalid application token",
|
||||||
|
errors.New("authenticate: application name mismatch"),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.Authenticate(request.AuthData(*resp.AuthData))
|
||||||
return next.Handle(ctx)
|
return next.Handle(ctx)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func extractToken(ctx *request.Context) (string, string, error) {
|
||||||
|
var (
|
||||||
|
appName string
|
||||||
|
token string
|
||||||
|
ok bool
|
||||||
|
)
|
||||||
|
|
||||||
|
token = ctx.Param(applicationTokenHeader)
|
||||||
|
if token != "" {
|
||||||
|
return token, "", nil
|
||||||
|
}
|
||||||
|
|
||||||
|
appName, token, ok = ctx.Request().BasicAuth()
|
||||||
|
if ok && appName == "" {
|
||||||
|
return "", "", httperrors.New(
|
||||||
|
http.StatusUnauthorized,
|
||||||
|
"application name required",
|
||||||
|
errors.New("authenticate: application name required on basic auth"),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return token, appName, nil
|
||||||
|
}
|
||||||
+5
-18
@@ -3,16 +3,17 @@ package middleware
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/txix-open/isp-kit/json"
|
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"isp-gate-service/helpers"
|
||||||
|
"isp-gate-service/request"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/txix-open/isp-kit/http/endpoint/buffer"
|
"github.com/txix-open/isp-kit/http/endpoint/buffer"
|
||||||
"github.com/txix-open/isp-kit/log"
|
"github.com/txix-open/isp-kit/log"
|
||||||
"isp-gate-service/request"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -25,6 +26,7 @@ type scSource interface {
|
|||||||
|
|
||||||
type writerWrapper struct {
|
type writerWrapper struct {
|
||||||
http.ResponseWriter
|
http.ResponseWriter
|
||||||
|
|
||||||
statusCode int
|
statusCode int
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +117,7 @@ func Logger( // nolint:gocognit
|
|||||||
|
|
||||||
if logBodyFromCurrenRequest {
|
if logBodyFromCurrenRequest {
|
||||||
if enableForceUnescapingUnicode && bytes.Contains(buf.RequestBody(), unicodeEscapePrefix) {
|
if enableForceUnescapingUnicode && bytes.Contains(buf.RequestBody(), unicodeEscapePrefix) {
|
||||||
fields = append(fields, log.ByteString("request", forceUnescapingUnicode(buf.RequestBody())))
|
fields = append(fields, log.ByteString("request", helpers.UnescapeUnicode(buf.RequestBody())))
|
||||||
} else {
|
} else {
|
||||||
fields = append(fields, log.ByteString("request", buf.RequestBody()))
|
fields = append(fields, log.ByteString("request", buf.RequestBody()))
|
||||||
}
|
}
|
||||||
@@ -128,18 +130,3 @@ func Logger( // nolint:gocognit
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func forceUnescapingUnicode(data []byte) []byte {
|
|
||||||
var body any
|
|
||||||
err := json.Unmarshal(data, &body)
|
|
||||||
if err != nil {
|
|
||||||
return data
|
|
||||||
}
|
|
||||||
|
|
||||||
newData, err := json.Marshal(body)
|
|
||||||
if err != nil {
|
|
||||||
return data
|
|
||||||
}
|
|
||||||
|
|
||||||
return newData
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package middleware
|
||||||
|
|
||||||
|
import (
|
||||||
|
"isp-gate-service/request"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/txix-open/isp-kit/metrics/http_metrics"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Metrics(storage *http_metrics.ServerStorage) Middleware {
|
||||||
|
return func(next Handler) Handler {
|
||||||
|
return HandlerFunc(func(ctx *request.Context) error {
|
||||||
|
endpoint := ctx.Endpoint()
|
||||||
|
if endpoint == "" {
|
||||||
|
return next.Handle(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
r := ctx.Request()
|
||||||
|
|
||||||
|
start := time.Now()
|
||||||
|
err := next.Handle(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
storage.ObserveDuration(r.Method, endpoint, time.Since(start))
|
||||||
|
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,7 +13,7 @@ const (
|
|||||||
requestIdHeader = "x-request-id"
|
requestIdHeader = "x-request-id"
|
||||||
)
|
)
|
||||||
|
|
||||||
func RequestId(forwardClientRequestId bool) Middleware {
|
func RequestId(forwardClientRequestId bool, forwardReqIdByApp map[int]bool) Middleware {
|
||||||
return func(next Handler) Handler {
|
return func(next Handler) Handler {
|
||||||
return HandlerFunc(func(ctx *request.Context) error {
|
return HandlerFunc(func(ctx *request.Context) error {
|
||||||
requestId := requestid.Next()
|
requestId := requestid.Next()
|
||||||
@@ -22,7 +22,9 @@ func RequestId(forwardClientRequestId bool) Middleware {
|
|||||||
logFields := make([]log.Field, 0)
|
logFields := make([]log.Field, 0)
|
||||||
if clientRequestId != "" {
|
if clientRequestId != "" {
|
||||||
logFields = append(logFields, log.String("clientRequestId", clientRequestId))
|
logFields = append(logFields, log.String("clientRequestId", clientRequestId))
|
||||||
if forwardClientRequestId {
|
|
||||||
|
authData, _ := ctx.GetAuthData()
|
||||||
|
if forwardClientRequestId || forwardReqIdByApp[authData.ApplicationId] {
|
||||||
requestId = clientRequestId
|
requestId = clientRequestId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-3
@@ -3,6 +3,7 @@ package proxy
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/base64"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -83,6 +84,8 @@ func (p Grpc) Handle(ctx *request.Context) error {
|
|||||||
md[grpc.DomainIdHeader] = []string{strconv.Itoa(authData.DomainId)}
|
md[grpc.DomainIdHeader] = []string{strconv.Itoa(authData.DomainId)}
|
||||||
md[grpc.ServiceIdHeader] = []string{strconv.Itoa(authData.ServiceId)}
|
md[grpc.ServiceIdHeader] = []string{strconv.Itoa(authData.ServiceId)}
|
||||||
md[grpc.ApplicationIdHeader] = []string{strconv.Itoa(authData.ApplicationId)}
|
md[grpc.ApplicationIdHeader] = []string{strconv.Itoa(authData.ApplicationId)}
|
||||||
|
encodedAppName := base64.StdEncoding.EncodeToString([]byte(authData.AppName))
|
||||||
|
md[grpc.ApplicationNameHeader] = []string{encodedAppName}
|
||||||
if ctx.IsAdminAuthenticated() {
|
if ctx.IsAdminAuthenticated() {
|
||||||
md[xAdminIdHeader] = []string{strconv.Itoa(ctx.AdminId())}
|
md[xAdminIdHeader] = []string{strconv.Itoa(ctx.AdminId())}
|
||||||
}
|
}
|
||||||
@@ -95,13 +98,13 @@ func (p Grpc) Handle(ctx *request.Context) error {
|
|||||||
Body: &isp.Message_BytesBody{BytesBody: body},
|
Body: &isp.Message_BytesBody{BytesBody: body},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return p.handleError(err, ctx.ResponseWriter())
|
return p.handleError(err, ctx.ResponseWriter(), ctx.Endpoint())
|
||||||
}
|
}
|
||||||
|
|
||||||
return p.writeResponse(http.StatusOK, result.GetBytesBody(), requestId, ctx.ResponseWriter())
|
return p.writeResponse(http.StatusOK, result.GetBytesBody(), requestId, ctx.ResponseWriter())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p Grpc) handleError(err error, w http.ResponseWriter) error {
|
func (p Grpc) handleError(err error, w http.ResponseWriter, endpoint string) error {
|
||||||
status, ok := status.FromError(err)
|
status, ok := status.FromError(err)
|
||||||
if !ok {
|
if !ok {
|
||||||
return httperrors.New(
|
return httperrors.New(
|
||||||
@@ -131,7 +134,7 @@ func (p Grpc) handleError(err error, w http.ResponseWriter) error {
|
|||||||
return httperrors.New(
|
return httperrors.New(
|
||||||
statusCode,
|
statusCode,
|
||||||
status.Message(),
|
status.Message(),
|
||||||
status.Err(),
|
errors.WithMessagef(err, "isp-routing-service: proxy '%s'", endpoint),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package proxy
|
package proxy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -100,6 +101,8 @@ func setHttpHeaders(ctx *request.Context, header http.Header, skipAuth bool) err
|
|||||||
header.Set(grpc.DomainIdHeader, strconv.Itoa(authData.DomainId))
|
header.Set(grpc.DomainIdHeader, strconv.Itoa(authData.DomainId))
|
||||||
header.Set(grpc.ServiceIdHeader, strconv.Itoa(authData.ServiceId))
|
header.Set(grpc.ServiceIdHeader, strconv.Itoa(authData.ServiceId))
|
||||||
header.Set(grpc.ApplicationIdHeader, strconv.Itoa(authData.ApplicationId))
|
header.Set(grpc.ApplicationIdHeader, strconv.Itoa(authData.ApplicationId))
|
||||||
|
encodedAppName := base64.StdEncoding.EncodeToString([]byte(authData.AppName))
|
||||||
|
header.Set(grpc.ApplicationNameHeader, encodedAppName) //nolint:canonicalheader
|
||||||
if ctx.IsAdminAuthenticated() {
|
if ctx.IsAdminAuthenticated() {
|
||||||
header.Set(xAdminIdHeader, strconv.Itoa(ctx.AdminId())) //nolint:canonicalheader
|
header.Set(xAdminIdHeader, strconv.Itoa(ctx.AdminId())) //nolint:canonicalheader
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
package repository
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
"github.com/redis/go-redis/v9"
|
|
||||||
)
|
|
||||||
|
|
||||||
type DailyLimit struct {
|
|
||||||
cli redis.UniversalClient
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewDailyLimit(cli redis.UniversalClient) DailyLimit {
|
|
||||||
return DailyLimit{
|
|
||||||
cli: cli,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r DailyLimit) Increment(ctx context.Context, applicationId int, today time.Time) (int64, error) {
|
|
||||||
key := r.key(applicationId, today)
|
|
||||||
value, err := r.cli.Incr(ctx, key).Result()
|
|
||||||
if err != nil {
|
|
||||||
return 0, errors.WithMessage(err, "incr")
|
|
||||||
}
|
|
||||||
|
|
||||||
if value == 1 {
|
|
||||||
err := r.cli.ExpireNX(ctx, key, 24*time.Hour).Err() //nolint:mnd
|
|
||||||
if err != nil {
|
|
||||||
return 0, errors.WithMessage(err, "expire nx")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return value, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r DailyLimit) key(applicationId int, today time.Time) string {
|
|
||||||
y, m, d := today.Date()
|
|
||||||
return fmt.Sprintf("daily_limit:%d:%d-%d-%d", applicationId, y, m, d)
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package repository
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
"github.com/txix-open/isp-kit/grpc/client"
|
||||||
|
"isp-gate-service/entity"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
incrementEndpoint = "isp-lock-service/daily_limit/increment"
|
||||||
|
rateLimitEndpoint = "isp-lock-service/rate_limit"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Locker struct {
|
||||||
|
cli *client.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewLocker(cli *client.Client) Locker {
|
||||||
|
return Locker{
|
||||||
|
cli: cli,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r Locker) Increment(ctx context.Context, key string, today time.Time) (int64, error) {
|
||||||
|
resp := new(entity.IncrementResponse)
|
||||||
|
err := r.cli.Invoke(incrementEndpoint).
|
||||||
|
JsonRequestBody(entity.IncrementRequest{
|
||||||
|
Key: key,
|
||||||
|
Today: today,
|
||||||
|
}).
|
||||||
|
JsonResponseBody(resp).
|
||||||
|
Do(ctx)
|
||||||
|
switch {
|
||||||
|
case err != nil:
|
||||||
|
return 0, errors.WithMessagef(err, "invoke isp-lock-service: '%s'", incrementEndpoint)
|
||||||
|
default:
|
||||||
|
return int64(resp.Value), nil //nolint:gosec
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r Locker) IsAllowRequestPerSecond(ctx context.Context, key string, rate int) (*entity.RateLimiterResponse, error) {
|
||||||
|
resp := new(entity.RateLimiterResponse)
|
||||||
|
err := r.cli.Invoke(rateLimitEndpoint).
|
||||||
|
JsonRequestBody(entity.RateLimiterRequest{
|
||||||
|
Key: key,
|
||||||
|
MaxRps: rate,
|
||||||
|
}).
|
||||||
|
JsonResponseBody(resp).
|
||||||
|
Do(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.WithMessagef(err, "invoke isp-lock-service: '%s'", rateLimitEndpoint)
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
package repository
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/go-redis/redis_rate/v10"
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
"github.com/redis/go-redis/v9"
|
|
||||||
"isp-gate-service/domain"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Throttling struct {
|
|
||||||
cli *redis_rate.Limiter
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewThrottling(cli redis.UniversalClient) Throttling {
|
|
||||||
return Throttling{
|
|
||||||
cli: redis_rate.NewLimiter(cli),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r Throttling) IsAllowRequestPerSecond(ctx context.Context, applicationId int, rate int) (*domain.RateLimitResult, error) {
|
|
||||||
result, err := r.cli.Allow(ctx, r.key(applicationId), redis_rate.PerSecond(rate))
|
|
||||||
if err != nil {
|
|
||||||
return nil, errors.WithMessage(err, "redis_rate/Allow")
|
|
||||||
}
|
|
||||||
return &domain.RateLimitResult{
|
|
||||||
Allow: result.Allowed > 0,
|
|
||||||
Remaining: result.Remaining,
|
|
||||||
RetryAfter: result.RetryAfter,
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r Throttling) key(applicationId int) string {
|
|
||||||
return fmt.Sprintf("throttling:%d", applicationId)
|
|
||||||
}
|
|
||||||
@@ -13,6 +13,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type AuthData struct {
|
type AuthData struct {
|
||||||
|
AppName string
|
||||||
SystemId int
|
SystemId int
|
||||||
DomainId int
|
DomainId int
|
||||||
ServiceId int
|
ServiceId int
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@@ -9,7 +10,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type DailyLimitRepo interface {
|
type DailyLimitRepo interface {
|
||||||
Increment(ctx context.Context, applicationId int, today time.Time) (int64, error)
|
Increment(ctx context.Context, key string, today time.Time) (int64, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type DailyLimit struct {
|
type DailyLimit struct {
|
||||||
@@ -34,10 +35,16 @@ func (s DailyLimit) IncrementAndCheck(ctx context.Context, applicationId int) (b
|
|||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
newValue, err := s.repo.Increment(ctx, applicationId, time.Now())
|
key := s.key(applicationId, time.Now())
|
||||||
|
newValue, err := s.repo.Increment(ctx, key, time.Now())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, errors.WithMessage(err, "increment")
|
return false, errors.WithMessage(err, "increment")
|
||||||
}
|
}
|
||||||
|
|
||||||
return newValue <= limit, nil
|
return newValue <= limit, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s DailyLimit) key(applicationId int, today time.Time) string {
|
||||||
|
y, m, d := today.Date()
|
||||||
|
return fmt.Sprintf("isp-gate-service::daily-limit::%d:%d-%d-%d", applicationId, y, m, d)
|
||||||
|
}
|
||||||
+17
-6
@@ -2,22 +2,24 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"isp-gate-service/conf"
|
"isp-gate-service/conf"
|
||||||
"isp-gate-service/domain"
|
"isp-gate-service/domain"
|
||||||
|
"isp-gate-service/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ThrottlingRepo interface {
|
type LockRepo interface {
|
||||||
IsAllowRequestPerSecond(ctx context.Context, applicationId int, rate int) (*domain.RateLimitResult, error)
|
IsAllowRequestPerSecond(ctx context.Context, key string, rate int) (*entity.RateLimiterResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Throttling struct {
|
type Throttling struct {
|
||||||
repo ThrottlingRepo
|
repo LockRepo
|
||||||
limits map[int]int
|
limits map[int]int
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewThrottling(repo ThrottlingRepo, configs []conf.Throttling) Throttling {
|
func NewThrottling(repo LockRepo, configs []conf.Throttling) Throttling {
|
||||||
limits := make(map[int]int)
|
limits := make(map[int]int)
|
||||||
for _, config := range configs {
|
for _, config := range configs {
|
||||||
limits[config.ApplicationId] = config.RequestsPerSeconds
|
limits[config.ApplicationId] = config.RequestsPerSeconds
|
||||||
@@ -38,10 +40,19 @@ func (s Throttling) AllowRateLimit(ctx context.Context, applicationId int) (*dom
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
result, err := s.repo.IsAllowRequestPerSecond(ctx, applicationId, rate)
|
key := s.key(applicationId)
|
||||||
|
result, err := s.repo.IsAllowRequestPerSecond(ctx, key, rate)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.WithMessage(err, "is allow request per second")
|
return nil, errors.WithMessage(err, "is allow request per second")
|
||||||
}
|
}
|
||||||
|
|
||||||
return result, nil
|
return &domain.RateLimitResult{
|
||||||
|
Allow: result.Allow,
|
||||||
|
Remaining: result.Remaining,
|
||||||
|
RetryAfter: result.RetryAfter,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s Throttling) key(applicationId int) string {
|
||||||
|
return fmt.Sprintf("isp-gate-service::rate-limit::%d", applicationId)
|
||||||
}
|
}
|
||||||
+20
-35
@@ -3,6 +3,7 @@ package tests
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/base64"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"net/url"
|
"net/url"
|
||||||
@@ -15,9 +16,8 @@ import (
|
|||||||
"isp-gate-service/domain"
|
"isp-gate-service/domain"
|
||||||
"isp-gate-service/routes"
|
"isp-gate-service/routes"
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
etp "github.com/txix-open/etp/v3"
|
"github.com/txix-open/etp/v3"
|
||||||
"github.com/txix-open/etp/v3/msg"
|
"github.com/txix-open/etp/v3/msg"
|
||||||
"github.com/txix-open/isp-kit/cluster"
|
"github.com/txix-open/isp-kit/cluster"
|
||||||
"github.com/txix-open/isp-kit/http/httpcli"
|
"github.com/txix-open/isp-kit/http/httpcli"
|
||||||
@@ -49,7 +49,7 @@ type HappyPathTestSuite struct {
|
|||||||
|
|
||||||
func (s *HappyPathTestSuite) TestGrpcProxy() {
|
func (s *HappyPathTestSuite) TestGrpcProxy() {
|
||||||
test, require := test.New(s.T())
|
test, require := test.New(s.T())
|
||||||
config, redisCli, systemCli, adminCli := s.commonDependencies(test)
|
config, systemCli, adminCli := s.commonDependencies(test)
|
||||||
|
|
||||||
requestId := requestid.Next()
|
requestId := requestid.Next()
|
||||||
targetService, targetCli := grpct.NewMock(test)
|
targetService, targetCli := grpct.NewMock(test)
|
||||||
@@ -86,7 +86,7 @@ func (s *HappyPathTestSuite) TestGrpcProxy() {
|
|||||||
}})
|
}})
|
||||||
require.NoError(err)
|
require.NoError(err)
|
||||||
|
|
||||||
locator := assembly.NewLocator(logger, targetClients, nil, routes, systemCli, adminCli)
|
locator := assembly.NewLocator(logger, targetClients, nil, routes, systemCli, adminCli, nil)
|
||||||
|
|
||||||
locations := []conf.Location{{
|
locations := []conf.Location{{
|
||||||
SkipAuth: false,
|
SkipAuth: false,
|
||||||
@@ -94,7 +94,7 @@ func (s *HappyPathTestSuite) TestGrpcProxy() {
|
|||||||
Protocol: "grpc",
|
Protocol: "grpc",
|
||||||
TargetModule: "target",
|
TargetModule: "target",
|
||||||
}}
|
}}
|
||||||
handler, err := locator.Handler(config, locations, redisCli)
|
handler, err := locator.Handler(config, locations)
|
||||||
require.NoError(err)
|
require.NoError(err)
|
||||||
|
|
||||||
srv := httptest.NewServer(handler)
|
srv := httptest.NewServer(handler)
|
||||||
@@ -115,7 +115,7 @@ func (s *HappyPathTestSuite) TestGrpcProxy() {
|
|||||||
|
|
||||||
func (s *HappyPathTestSuite) TestHttpProxy() {
|
func (s *HappyPathTestSuite) TestHttpProxy() {
|
||||||
test, require := test.New(s.T())
|
test, require := test.New(s.T())
|
||||||
config, redisCli, systemCli, adminCli := s.commonDependencies(test)
|
config, systemCli, adminCli := s.commonDependencies(test)
|
||||||
|
|
||||||
requestId := requestid.Next()
|
requestId := requestid.Next()
|
||||||
targetService := httpt.NewMock(test)
|
targetService := httpt.NewMock(test)
|
||||||
@@ -136,14 +136,14 @@ func (s *HappyPathTestSuite) TestHttpProxy() {
|
|||||||
}})
|
}})
|
||||||
require.NoError(err)
|
require.NoError(err)
|
||||||
|
|
||||||
locator := assembly.NewLocator(test.Logger(), nil, targetClients, routes, systemCli, adminCli)
|
locator := assembly.NewLocator(test.Logger(), nil, targetClients, routes, systemCli, adminCli, nil)
|
||||||
locations := []conf.Location{{
|
locations := []conf.Location{{
|
||||||
SkipAuth: false,
|
SkipAuth: false,
|
||||||
PathPrefix: "/api",
|
PathPrefix: "/api",
|
||||||
Protocol: "http",
|
Protocol: "http",
|
||||||
TargetModule: "target",
|
TargetModule: "target",
|
||||||
}}
|
}}
|
||||||
handler, err := locator.Handler(config, locations, redisCli)
|
handler, err := locator.Handler(config, locations)
|
||||||
require.NoError(err)
|
require.NoError(err)
|
||||||
|
|
||||||
srv := httptest.NewServer(handler)
|
srv := httptest.NewServer(handler)
|
||||||
@@ -164,7 +164,7 @@ func (s *HappyPathTestSuite) TestHttpProxy() {
|
|||||||
|
|
||||||
func (s *HappyPathTestSuite) TestWsProxy() { // nolint: funlen
|
func (s *HappyPathTestSuite) TestWsProxy() { // nolint: funlen
|
||||||
test, require := test.New(s.T())
|
test, require := test.New(s.T())
|
||||||
config, redisCli, systemCli, adminCli := s.commonDependencies(test)
|
config, systemCli, adminCli := s.commonDependencies(test)
|
||||||
|
|
||||||
requestId := requestid.Next()
|
requestId := requestid.Next()
|
||||||
wsServer := etp.NewServer(etp.WithServerReadLimit(2048))
|
wsServer := etp.NewServer(etp.WithServerReadLimit(2048))
|
||||||
@@ -192,14 +192,14 @@ func (s *HappyPathTestSuite) TestWsProxy() { // nolint: funlen
|
|||||||
}})
|
}})
|
||||||
require.NoError(err)
|
require.NoError(err)
|
||||||
|
|
||||||
locator := assembly.NewLocator(test.Logger(), nil, targetClients, routes, systemCli, adminCli)
|
locator := assembly.NewLocator(test.Logger(), nil, targetClients, routes, systemCli, adminCli, nil)
|
||||||
locations := []conf.Location{{
|
locations := []conf.Location{{
|
||||||
SkipAuth: false,
|
SkipAuth: false,
|
||||||
PathPrefix: "/ws",
|
PathPrefix: "/ws",
|
||||||
Protocol: "ws",
|
Protocol: "ws",
|
||||||
TargetModule: "target",
|
TargetModule: "target",
|
||||||
}}
|
}}
|
||||||
handler, err := locator.Handler(config, locations, redisCli)
|
handler, err := locator.Handler(config, locations)
|
||||||
require.NoError(err)
|
require.NoError(err)
|
||||||
srv := httptest.NewServer(handler)
|
srv := httptest.NewServer(handler)
|
||||||
|
|
||||||
@@ -242,7 +242,7 @@ func (s wsEventHandlerMock) Handle(_ context.Context, conn *etp.Conn, event msg.
|
|||||||
|
|
||||||
func (s *HappyPathTestSuite) TestAdminAuthorization() {
|
func (s *HappyPathTestSuite) TestAdminAuthorization() {
|
||||||
test, require := test.New(s.T())
|
test, require := test.New(s.T())
|
||||||
config, redisCli, systemCli, adminCli := s.commonDependencies(test)
|
config, systemCli, adminCli := s.commonDependencies(test)
|
||||||
|
|
||||||
targetService, targetCli := grpct.NewMock(test)
|
targetService, targetCli := grpct.NewMock(test)
|
||||||
targetService.Mock("endpoint", func(ctx context.Context, authData grpc.AuthData, req request) response {
|
targetService.Mock("endpoint", func(ctx context.Context, authData grpc.AuthData, req request) response {
|
||||||
@@ -252,7 +252,7 @@ func (s *HappyPathTestSuite) TestAdminAuthorization() {
|
|||||||
logger, err := log.New(log.WithLevel(log.DebugLevel))
|
logger, err := log.New(log.WithLevel(log.DebugLevel))
|
||||||
require.NoError(err)
|
require.NoError(err)
|
||||||
routes := routes.NewRoutes()
|
routes := routes.NewRoutes()
|
||||||
locator := assembly.NewLocator(logger, targetClients, nil, routes, systemCli, adminCli)
|
locator := assembly.NewLocator(logger, targetClients, nil, routes, systemCli, adminCli, nil)
|
||||||
|
|
||||||
locations := []conf.Location{{
|
locations := []conf.Location{{
|
||||||
SkipAuth: false,
|
SkipAuth: false,
|
||||||
@@ -260,7 +260,7 @@ func (s *HappyPathTestSuite) TestAdminAuthorization() {
|
|||||||
Protocol: "grpc",
|
Protocol: "grpc",
|
||||||
TargetModule: "target",
|
TargetModule: "target",
|
||||||
}}
|
}}
|
||||||
handler, err := locator.Handler(config, locations, redisCli)
|
handler, err := locator.Handler(config, locations)
|
||||||
require.NoError(err)
|
require.NoError(err)
|
||||||
|
|
||||||
err = routes.ReceiveRoutes(context.Background(), cluster.RoutingConfig{{
|
err = routes.ReceiveRoutes(context.Background(), cluster.RoutingConfig{{
|
||||||
@@ -304,27 +304,9 @@ func (s *HappyPathTestSuite) TestAdminAuthorization() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// nolint:ireturn
|
// nolint:ireturn
|
||||||
func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, redis.UniversalClient, *client.Client, *client.Client) {
|
func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, *client.Client, *client.Client) {
|
||||||
require := test.Assert()
|
|
||||||
redisCli := NewRedis(test)
|
|
||||||
ctx := context.Background()
|
|
||||||
|
|
||||||
s.T().Cleanup(func() {
|
|
||||||
_, err := redisCli.Pipelined(ctx, func(p redis.Pipeliner) error {
|
|
||||||
p.Select(ctx, 0)
|
|
||||||
p.FlushDB(ctx)
|
|
||||||
p.Select(ctx, 1)
|
|
||||||
p.FlushDB(ctx)
|
|
||||||
p.Select(ctx, 2)
|
|
||||||
p.FlushDB(ctx)
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
require.NoError(err)
|
|
||||||
})
|
|
||||||
|
|
||||||
config := conf.Remote{
|
config := conf.Remote{
|
||||||
Redis: &conf.Redis{Address: redisCli.address},
|
Http: conf.Http{MaxRequestBodySizeInMb: 1, ProxyTimeoutInSec: 15},
|
||||||
Http: conf.Http{MaxRequestBodySizeInMb: 1, ProxyTimeoutInSec: 15},
|
|
||||||
Logging: conf.Logging{LogLevel: log.DebugLevel, RequestLogEnable: true, BodyLogEnable: true,
|
Logging: conf.Logging{LogLevel: log.DebugLevel, RequestLogEnable: true, BodyLogEnable: true,
|
||||||
SkipBodyLoggingEndpointPrefixes: []string{"endpoint"}},
|
SkipBodyLoggingEndpointPrefixes: []string{"endpoint"}},
|
||||||
Caching: conf.Caching{AuthorizationDataInSec: 1, AuthenticationDataInSec: 1},
|
Caching: conf.Caching{AuthorizationDataInSec: 1, AuthenticationDataInSec: 1},
|
||||||
@@ -343,6 +325,7 @@ func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, r
|
|||||||
DomainId: 2,
|
DomainId: 2,
|
||||||
ServiceId: 3,
|
ServiceId: 3,
|
||||||
ApplicationId: 4,
|
ApplicationId: 4,
|
||||||
|
AppName: "test",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}).Mock("system/secure/authorize", func() domain.AuthorizeResponse {
|
}).Mock("system/secure/authorize", func() domain.AuthorizeResponse {
|
||||||
@@ -363,7 +346,7 @@ func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, r
|
|||||||
return domain.AdminAuthorizeResponse{Authorized: false}
|
return domain.AdminAuthorizeResponse{Authorized: false}
|
||||||
})
|
})
|
||||||
|
|
||||||
return config, redisCli, systemCli, adminCli
|
return config, systemCli, adminCli
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestHappyPathTestSuite(t *testing.T) {
|
func TestHappyPathTestSuite(t *testing.T) {
|
||||||
@@ -385,6 +368,8 @@ func assertHeaders(require *require.Assertions, requestId string, ctx context.Co
|
|||||||
require.EqualValues(2, domainId)
|
require.EqualValues(2, domainId)
|
||||||
require.EqualValues(3, serviceId)
|
require.EqualValues(3, serviceId)
|
||||||
require.EqualValues(4, applicationId)
|
require.EqualValues(4, applicationId)
|
||||||
|
expectedAppName := base64.StdEncoding.EncodeToString([]byte("test"))
|
||||||
|
require.EqualValues(expectedAppName, headers.Get("x-application-name"))
|
||||||
|
|
||||||
adminId, err := strconv.Atoi(headers.Get("x-admin-id"))
|
adminId, err := strconv.Atoi(headers.Get("x-admin-id"))
|
||||||
require.NoError(err)
|
require.NoError(err)
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ func main() {
|
|||||||
})
|
})
|
||||||
}()
|
}()
|
||||||
config := conf.Remote{
|
config := conf.Remote{
|
||||||
Redis: &conf.Redis{Address: "localhost:6379"},
|
|
||||||
Http: conf.Http{MaxRequestBodySizeInMb: 1, ProxyTimeoutInSec: 15},
|
Http: conf.Http{MaxRequestBodySizeInMb: 1, ProxyTimeoutInSec: 15},
|
||||||
Logging: conf.Logging{LogLevel: log.DebugLevel, RequestLogEnable: true, BodyLogEnable: true},
|
Logging: conf.Logging{LogLevel: log.DebugLevel, RequestLogEnable: true, BodyLogEnable: true},
|
||||||
Caching: conf.Caching{AuthorizationDataInSec: 15, AuthenticationDataInSec: 15},
|
Caching: conf.Caching{AuthorizationDataInSec: 15, AuthenticationDataInSec: 15},
|
||||||
@@ -85,14 +84,14 @@ func main() {
|
|||||||
})
|
})
|
||||||
targetClients := map[string]*client.Client{"target": targetCli}
|
targetClients := map[string]*client.Client{"target": targetCli}
|
||||||
logger, _ = log.New(log.WithLevel(log.DebugLevel))
|
logger, _ = log.New(log.WithLevel(log.DebugLevel))
|
||||||
locator := assembly.NewLocator(logger, targetClients, nil, routes.NewRoutes(), systemCli, adminCli)
|
locator := assembly.NewLocator(logger, targetClients, nil, routes.NewRoutes(), systemCli, adminCli, nil)
|
||||||
locations := []conf.Location{{
|
locations := []conf.Location{{
|
||||||
SkipAuth: false,
|
SkipAuth: false,
|
||||||
PathPrefix: "/api",
|
PathPrefix: "/api",
|
||||||
Protocol: "grpc",
|
Protocol: "grpc",
|
||||||
TargetModule: "target",
|
TargetModule: "target",
|
||||||
}}
|
}}
|
||||||
handler, _ := locator.Handler(config, locations, redisCli)
|
handler, _ := locator.Handler(config, locations)
|
||||||
|
|
||||||
srv := &http.Server{
|
srv := &http.Server{
|
||||||
Addr: "localhost:8000",
|
Addr: "localhost:8000",
|
||||||
@@ -102,7 +101,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestServer(service isp.BackendServiceServer) (*grpc.Server, *client.Client, *client.Client) {
|
func TestServer(service isp.BackendServiceServer) (*grpc.Server, *client.Client, *client.Client) {
|
||||||
listener, _ := net.Listen("tcp", "127.0.0.1:")
|
listener, _ := net.Listen("tcp", "127.0.0.1:") // nolint:noctx
|
||||||
srv := grpc.NewServer()
|
srv := grpc.NewServer()
|
||||||
sysCli, _ := client.Default()
|
sysCli, _ := client.Default()
|
||||||
adminCli, _ := client.Default()
|
adminCli, _ := client.Default()
|
||||||
@@ -119,7 +118,7 @@ func TestServer(service isp.BackendServiceServer) (*grpc.Server, *client.Client,
|
|||||||
type MockServer struct {
|
type MockServer struct {
|
||||||
srv *grpc.Server
|
srv *grpc.Server
|
||||||
logger log.Logger
|
logger log.Logger
|
||||||
mockEndpoints map[string]interface{}
|
mockEndpoints map[string]any
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewMock(logger log.Logger) (*MockServer, *client.Client, *client.Client) {
|
func NewMock(logger log.Logger) (*MockServer, *client.Client, *client.Client) {
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
package tests
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
|
||||||
"github.com/txix-open/isp-kit/test"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Redis struct {
|
|
||||||
address string
|
|
||||||
redis.UniversalClient
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewRedis(test *test.Test) Redis {
|
|
||||||
redisHost := test.Config().Optional().String("REDIS_HOST", "localhost")
|
|
||||||
redisPort := test.Config().Optional().String("REDIS_PORT", "6379")
|
|
||||||
addr := fmt.Sprintf("%s:%s", redisHost, redisPort)
|
|
||||||
cli := redis.NewClient(&redis.Options{Addr: addr})
|
|
||||||
return Redis{UniversalClient: cli, address: addr}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r Redis) Address() string {
|
|
||||||
return r.address
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user