Compare commits

..
42 Commits
Author SHA1 Message Date
txix 15cb2cadf2 2026-07-07 10:21:49: merge [main:7d936adaf0486f3328902461e9a32ae3539e9e64];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-07-07 10:21:49 +03:00
txix 76f88fd593 2026-05-12 13:56:16: merge [main:81e9195d79a530c26a2640652f946389f536842f];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-05-12 13:56:16 +03:00
txix 9ff0057014 2026-04-20 12:28:32: merge [main:ac8a556442b323a61053fc1f978ce68455350ad0];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-04-20 12:28:32 +03:00
txix 71a1f0a04e 2026-04-08 18:36:43: merge [main:cca6ce0ad1fef44571b4a61f1aca34f2e41ce5cd];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-04-08 18:36:43 +03:00
txix 394bbc82e2 2026-04-06 15:36:37: merge [main:48e53159863d08bc31c4e926d73c0bb4341128ae];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-04-06 15:36:37 +03:00
txix 7de248e63c 2026-03-31 16:58:42: merge [main:8b672bdd308ebb53d48d75a6a5bfbdb7ea8d7ddd];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-03-31 16:58:43 +03:00
txix 011a1d7048 2026-03-24 17:42:31: merge [main:c523d2347d1bdc87bceae397a11ecfc8776ff8aa];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-03-24 17:42:31 +03:00
txix f3fb9cff75 2026-03-18 17:07:55: merge [main:1bd032e5aa9a3d83735ea3fb30aeab719d917b82];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-03-18 17:07:55 +03:00
txix c7bd042239 2026-03-10 10:38:58: merge [main:aae3c282252c73901b8e48b1412f48217b1a6195];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-03-10 10:38:58 +03:00
txix 202fa7035e 2026-01-27 15:11:45: merge [main:30d731ebfa46bcfb3fa1c39f4580293dc546acc0];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-01-27 15:11:45 +03:00
txix 602a2a1ac4 2026-01-27 13:25:45: merge [main:e5e723811e7a9dc57a6ff5d1c067c07c23a97210];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-01-27 13:25:45 +03:00
txix 6a3abf67a2 2026-01-23 13:09:31: merge [main:63c694e2a33c8c0b025f62619d2814f536915e49];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-01-23 13:09:31 +03:00
txix 2f88738f78 2026-01-23 12:57:58: merge [main:4f90477e73bbbbbfe9cdb168b87e0ea201679912];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-01-23 12:57:58 +03:00
txix a637d56ea7 2026-01-14 11:52:30: merge [main:1a274e79e588612933ce36c33b236a91fc74db9a];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-01-14 11:52:30 +03:00
txix a841cd082b 2025-12-26 09:37:14: merge [main:2b5ee66527f48ea4e6111148c0ba3c23611d6772];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-12-26 09:37:14 +03:00
txix 9b18fe7351 2025-11-26 13:43:01: merge [main:e9c5c9b80517122ca122933c111070bf470e31c1];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-11-26 13:43:01 +03:00
txix f3c801e4a4 2025-11-26 10:05:59: merge [main:96f8e79d3384c01bf52552f94afdf4ed662997e5];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-11-26 10:05:59 +03:00
txix ee13991d87 2025-10-03 15:15:07: merge [main:c3e3ed9636c6987e89feaf39503dda74462fcfde];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-10-03 15:15:07 +03:00
txix d4846359e4 2025-10-02 16:02:08: merge [main:13db082fcac220b28433a207845ceb3bef8bd07d];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-10-02 16:02:08 +03:00
txix 13cf0075f6 2025-09-17 18:07:26: merge [main:f5bfe7d2ba0d7a2f391f4ffaff6fffc1686ba3c7];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-09-17 18:07:26 +03:00
txix 135e551473 2025-08-21 15:04:13: merge [main:a4b6e5fd1d9685c751c5988518e9f8dd62a8e519]; 2025-08-21 15:04:13 +03:00
txix 689f730a3e 2025-07-09 12:35:19: merge [main:9f485b5e57937029be52e58137ef79ad5c3ca524];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-07-09 12:35:19 +03:00
txix a30582fa38 2025-07-03 12:26:31: merge [main:66e6c4b9c432b19b644d033703545d38aba3b847];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-07-03 12:26:31 +03:00
txix 5b1ce14467 2025-07-01 16:40:11: merge [main:61f11c0bda72fe35f473f8302edfaf86f151c0ad];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-07-01 16:40:11 +03:00
txix 264b438cdb 2025-07-01 13:32:55: merge [main:6491e79afd06cd665731c89f8ab2cd373351c1b4]; 2025-07-01 13:32:55 +03:00
txix f699aefa58 2025-05-27 14:32:05: merge [master:01f8dcdc36fb3f9867a65ffb7379ad25c85cd988];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2025-05-27 14:32:05 +03:00
txix 8d40e76637 2025-05-13 13:05:46: merge [master:49d1bfaa3f027c5465de7a0c0d46a9bab0588e19]; 2025-05-13 13:05:46 +03:00
txix e2b4becfd6 2025-04-29 14:57:30: merge [master:357ce03935a551e8be5766b349a621104998de83]; 2025-04-29 14:57:30 +03:00
txix e4ef2d8645 2025-04-23 12:39:56: merge [master:82ac257e917aa3f9ab915b911afbd28c0f52f88e]; 2025-04-23 12:39:56 +03:00
txix bfc28503d5 2025-04-18 12:46:39: merge [master:7b5fc0b41640a6b6648e6391777fa08099997af1]; 2025-04-18 12:46:39 +03:00
txix d759f883f4 2025-04-18 12:26:12: merge [master:576ef18526fa6f0685f8ab997cae0d31a4ebce90]; 2025-04-18 12:26:13 +03:00
txix 64373fdf3c 2025-04-03 17:31:43: merge [master:03df79d7b37febb99439347c2da79707bf437498]; 2025-04-03 17:31:43 +03:00
txix 1dd566593e 2024-12-27 17:46:16: merge [master:4898a95fc423e3ae55135d3023a1b78fb18edebc]; 2024-12-27 17:46:16 +03:00
txix 560c1f22c4 2024-12-27 12:28:18: merge [master:9ec52bd8525d6120bfebe62b6da4eb172a000ee8]; 2024-12-27 12:28:18 +03:00
txix 171b85f627 2024-12-27 12:14:12: merge [master:bf6ba426f66d82ef1e76da30674890898919501b]; 2024-12-27 12:14:12 +03:00
txix 734b83b2b8 2024-12-11 12:34:04: merge [master:744eaa2605c9d3eb73b2db76661b2d0a6949d4d9]; 2024-12-11 12:34:04 +03:00
txix bdeb2c0753 2024-12-03 13:02:16: merge [master:b21f96b8a5ec988002a89bd9d1f51e90c01a2d21]; 2024-12-03 13:02:16 +03:00
txix 97c44fb3bd 2024-10-11 14:58:36: merge [master:7f99b95ceaaed865d2833070a0397cf191949b8e]; 2024-10-11 14:58:36 +03:00
txix 6db18c1495 2024-07-01 10:56:14: merge [master:f9b2632335c35844013af97443dacebb9fc385c5]; 2024-07-01 10:56:14 +03:00
txix cd985ff5a3 2024-03-26 12:20:05: merge [master:27c825f7051ccbb42344a2d66c50192e2b3b5889]; 2024-03-26 12:20:05 +03:00
txix 2eed857503 2024-03-22 15:21:57: merge [master:d3624ee87e4530490024ae4023a1c69643689e95]; 2024-03-22 15:21:57 +03:00
txix 2b91caece0 2024-01-22 17:22:41: merge [master:56d3e06e49d7a75f142424293788a4f3b6245430]; 2024-01-22 17:22:41 +03:00
48 changed files with 328 additions and 325 deletions

No files matched your search

+60
View File
@@ -0,0 +1,60 @@
name: Create and publish a Docker image
on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
APP_NAME: ${{ github.event.repository.name }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get version from tag
id: version_reader
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version_reader.outputs.version }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
labels: |
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
org.opencontainers.image.version=${{ steps.version_reader.outputs.version }}
build-args: |
app_name=${{ env.APP_NAME }}
version=${{ steps.version_reader.outputs.version }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
+1 -8
View File
@@ -15,17 +15,13 @@ linters:
- nolintlint # Goland все равно форматирует с отступом - nolintlint # Goland все равно форматирует с отступом
- perfsprint # мнимая производительность в угоду читаемости - perfsprint # мнимая производительность в угоду читаемости
- tagalign # не всегда имеет смысл - tagalign # не всегда имеет смысл
- testpackage
- varnamelen # очень индивидуально (db) - varnamelen # очень индивидуально (db)
- wsl # расставление пробелов очень индивидуально - wsl # расставление пробелов очень индивидуально
- wsl_v5 # расставление пробелов очень индивидуально - wsl_v5 # расставление пробелов очень индивидуально
- godoclint # ругается на // nolint, не удобно - godoclint # ругается на // nolint, не удобно
- prealloc # слишком аггресивный, в большинстве случаев не требуется - prealloc # слишком аггресивный, в большинстве случаев не требуется
- gomodguard # deprecated
- goconst # слишком агрессивный
settings: settings:
exhaustruct_v5:
allow-empty: true
explicit-mode: true
cyclop: cyclop:
max-complexity: 15 # по умолчанию 10 мало max-complexity: 15 # по умолчанию 10 мало
funlen: funlen:
@@ -75,9 +71,6 @@ linters:
- linters: - linters:
- wrapcheck - wrapcheck
path: httperrors #отсутствует необходимость оборачивать ошибки path: httperrors #отсутствует необходимость оборачивать ошибки
- linters:
- goconst
path: "tests/" # компонентные тесты: фикстуры и моки не выносим в константы
paths: paths:
- third_party$ - third_party$
- builtin$ - builtin$
+1 -1
View File
@@ -1 +1 @@
5.12.0 5.11.1
-8
View File
@@ -1,11 +1,3 @@
### v5.12.0
* взаимодействие с `isp-admin-service` переведено с gRPC на HTTP
### v5.11.4
* добавлена возможность через переменную окружения `adminServiceName` переопределить название сервиса `msp-admin-service`
### v5.11.3
* добавлена настройка для преопределения content-type в ответе с `application/json` на `application/json; charset=utf-8` для конкретных приложений
### v5.11.2
* обновлены зависимости
### v5.11.1 ### v5.11.1
* Обновлен isp-kit * Обновлен isp-kit
### v5.11.0 ### v5.11.0
+11 -14
View File
@@ -8,20 +8,18 @@ import (
"isp-gate-service/conf" "isp-gate-service/conf"
"isp-gate-service/routes" "isp-gate-service/routes"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/app" "github.com/txix-open/isp-kit/app"
"github.com/txix-open/isp-kit/bootstrap" "github.com/txix-open/isp-kit/bootstrap"
"github.com/txix-open/isp-kit/cluster" "github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
"github.com/txix-open/isp-kit/http" "github.com/txix-open/isp-kit/http"
"github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/lb" "github.com/txix-open/isp-kit/lb"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
const ( const (
routerModuleName = "isp-router-service" routerModuleName = "isp-router-service"
defaultAdminServiceName = "msp-admin-service"
usersAuthCachePurgeInterval = 5 * time.Second usersAuthCachePurgeInterval = 5 * time.Second
) )
@@ -31,11 +29,11 @@ type Assembly struct {
logger *log.Adapter logger *log.Adapter
routes *routes.Routes routes *routes.Routes
systemCli *client.Client systemCli *client.Client
adminCli *httpclix.ClientBalancer adminCli *client.Client
lockerCli *client.Client lockerCli *client.Client
routerLb *lb.RoundRobin routerLb *lb.RoundRobin
localConfig conf.Local locations []conf.Location
grpcClientByModuleName map[string]*client.Client grpcClientByModuleName map[string]*client.Client
httpHostManagerByModuleName map[string]*lb.RoundRobin httpHostManagerByModuleName map[string]*lb.RoundRobin
@@ -73,7 +71,10 @@ 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 := httpclix.DefaultWithBalancer(nil) adminCli, err := client.Default()
if err != nil {
return nil, errors.WithMessage(err, "create admin cli")
}
lockerCli, err := client.Default() lockerCli, err := client.Default()
if err != nil { if err != nil {
return nil, errors.WithMessage(err, "create isp-lock-service client") return nil, errors.WithMessage(err, "create isp-lock-service client")
@@ -84,7 +85,7 @@ func New(boot *bootstrap.Bootstrap) (*Assembly, error) {
server: server, server: server,
logger: boot.App.Logger(), logger: boot.App.Logger(),
routes: routes.NewRoutes(boot.App.Logger()), routes: routes.NewRoutes(boot.App.Logger()),
localConfig: localConfig, locations: localConfig.Locations,
grpcClientByModuleName: grpcClientByModuleName, grpcClientByModuleName: grpcClientByModuleName,
httpHostManagerByModuleName: httpHostManagerByModuleName, httpHostManagerByModuleName: httpHostManagerByModuleName,
systemCli: systemCli, systemCli: systemCli,
@@ -117,7 +118,7 @@ func (a *Assembly) ReceiveConfig(ctx context.Context, remoteConfig []byte) error
a.routerLb, a.routerLb,
a.usersAuthCache, a.usersAuthCache,
) )
handler, err := locator.Handler(newCfg, a.localConfig.Locations) 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")
} }
@@ -138,12 +139,8 @@ 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)
} }
adminServiceName := a.localConfig.AdminServiceName
if adminServiceName == "" {
adminServiceName = defaultAdminServiceName
}
eventHandler.RequireModule("isp-system-service", a.systemCli) eventHandler.RequireModule("isp-system-service", a.systemCli)
eventHandler.RequireModule(adminServiceName, a.adminCli) eventHandler.RequireModule("msp-admin-service", a.adminCli)
eventHandler.RequireModule("isp-lock-service", a.lockerCli) eventHandler.RequireModule("isp-lock-service", a.lockerCli)
eventHandler.RequireModule(routerModuleName, a.routerLb) eventHandler.RequireModule(routerModuleName, a.routerLb)
@@ -171,7 +168,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.lockerCli) closers = append(closers, a.systemCli, a.adminCli, a.lockerCli)
return closers return closers
} }
+3 -10
View File
@@ -5,7 +5,6 @@ import (
"strings" "strings"
"time" "time"
"github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/metrics" "github.com/txix-open/isp-kit/metrics"
"github.com/txix-open/isp-kit/metrics/http_metrics" "github.com/txix-open/isp-kit/metrics/http_metrics"
@@ -18,7 +17,7 @@ import (
"isp-gate-service/service" "isp-gate-service/service"
mux2 "github.com/gorilla/mux" mux2 "github.com/gorilla/mux"
"github.com/txix-open/isp-kit/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"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
@@ -30,7 +29,7 @@ type Locator struct {
httpHostManagerByModuleName map[string]*lb.RoundRobin httpHostManagerByModuleName map[string]*lb.RoundRobin
routes *routes.Routes routes *routes.Routes
systemCli *client.Client systemCli *client.Client
adminCli *httpclix.ClientBalancer adminCli *client.Client
lockerCli *client.Client lockerCli *client.Client
routerLb *lb.RoundRobin routerLb *lb.RoundRobin
usersAuthCache *cache.Cache usersAuthCache *cache.Cache
@@ -42,7 +41,7 @@ func NewLocator(
httpHostManagerByModuleName map[string]*lb.RoundRobin, httpHostManagerByModuleName map[string]*lb.RoundRobin,
routes *routes.Routes, routes *routes.Routes,
systemCli *client.Client, systemCli *client.Client,
adminCli *httpclix.ClientBalancer, adminCli *client.Client,
lockerCli *client.Client, lockerCli *client.Client,
routerLb *lb.RoundRobin, routerLb *lb.RoundRobin,
usersAuthCache *cache.Cache, usersAuthCache *cache.Cache,
@@ -125,11 +124,6 @@ func (l Locator) Handler(config conf.Remote, locations []conf.Location) (http.Ha
forwardReqIdByAppId[setting.ApplicationId] = setting.ForwardRequestId forwardReqIdByAppId[setting.ApplicationId] = setting.ForwardRequestId
} }
enableUtf8JsonCharsetByApp := make(map[int]bool, len(config.ResponseContentTypeSettings))
for _, setting := range config.ResponseContentTypeSettings {
enableUtf8JsonCharsetByApp[setting.ApplicationId] = setting.AddJsonUtf8Charset
}
metricsStorage := http_metrics.NewServerStorage(metrics.DefaultRegistry) metricsStorage := http_metrics.NewServerStorage(metrics.DefaultRegistry)
handler := middleware.Chain( handler := middleware.Chain(
@@ -146,7 +140,6 @@ func (l Locator) Handler(config conf.Remote, locations []conf.Location) (http.Ha
middleware.Authenticate(authentication), middleware.Authenticate(authentication),
middleware.AdminAuthenticate(adminService), middleware.AdminAuthenticate(adminService),
middleware.ClientRequestId(config.EnableClientRequestIdForwarding, forwardReqIdByAppId), middleware.ClientRequestId(config.EnableClientRequestIdForwarding, forwardReqIdByAppId),
middleware.JsonResponseUtf8Charset(enableUtf8JsonCharsetByApp),
middleware.Authorize(authorization, l.logger), middleware.Authorize(authorization, l.logger),
middleware.AdminAuthorize(adminService), middleware.AdminAuthorize(adminService),
middleware.Throttling(throttlingService), middleware.Throttling(throttlingService),
-1
View File
@@ -17,7 +17,6 @@ logfile:
maxBackups: 4 maxBackups: 4
compress: true compress: true
adminServiceName: msp-admin-service
locations: locations:
- pathPrefix: /api - pathPrefix: /api
+1 -2
View File
@@ -7,8 +7,7 @@ const (
) )
type Local struct { type Local struct {
Locations []Location Locations []Location
AdminServiceName string
} }
type Location struct { type Location struct {
-6
View File
@@ -30,7 +30,6 @@ type Remote struct {
EnableClientRequestIdForwarding bool `schema:"Включить проброс requestId из заголовка запроса"` EnableClientRequestIdForwarding bool `schema:"Включить проброс requestId из заголовка запроса"`
ForwardReqIdClientSettings []ForwardReqIdClientSettings `schema:"Настройки проброcа requestId для приложений"` ForwardReqIdClientSettings []ForwardReqIdClientSettings `schema:"Настройки проброcа requestId для приложений"`
CustomAuth CustomAuth `schema:"Настройка кастомной аутентификации/авторизации"` CustomAuth CustomAuth `schema:"Настройка кастомной аутентификации/авторизации"`
ResponseContentTypeSettings []ResponseContentTypeSetting `schema:"Настройки Content-Type ответов"`
} }
type ForwardReqIdClientSettings struct { type ForwardReqIdClientSettings struct {
@@ -99,8 +98,3 @@ type UserAuthSetting struct {
CacheDataInSec int `schema:"Время кеширования данных аутентификации/авторизации пользователя,отключен при значениях <=0,в секундах"` CacheDataInSec int `schema:"Время кеширования данных аутентификации/авторизации пользователя,отключен при значениях <=0,в секундах"`
SkipAppAuth bool `schema:"Пропустить аутентификацию и авторизацию приложения"` SkipAppAuth bool `schema:"Пропустить аутентификацию и авторизацию приложения"`
} }
type ResponseContentTypeSetting struct {
ApplicationId int `validate:"required" schema:"ID приложения"`
AddJsonUtf8Charset bool `schema:"Добавлять charset=utf-8 в Content-Type ответа: application/json для locations с protocol=http"`
}
+3
View File
@@ -8,6 +8,9 @@ type AuthenticateAppResponse struct {
type AppAuthData struct { type AppAuthData struct {
AppName string AppName string
SystemId int
DomainId int
ServiceId int
ApplicationId int ApplicationId int
} }
+1 -1
View File
@@ -1,7 +1,7 @@
package domain package domain
import ( import (
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
) )
var ( var (
+1 -1
View File
@@ -1,6 +1,6 @@
package domain package domain
import "github.com/txix-open/isp-kit/errors" import "github.com/pkg/errors"
var ( var (
ErrUserAuthSettingNotFound = errors.New("user auth setting not found") ErrUserAuthSettingNotFound = errors.New("user auth setting not found")
+3
View File
@@ -2,5 +2,8 @@ package entity
type AppAuthData struct { type AppAuthData struct {
AppName string AppName string
SystemId int
DomainId int
ServiceId int
ApplicationId int ApplicationId int
} }
+46 -43
View File
@@ -1,78 +1,81 @@
module isp-gate-service module isp-gate-service
go 1.27 go 1.26
require ( require (
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/julienschmidt/httprouter v1.3.0 github.com/pkg/errors v0.9.1
github.com/redis/go-redis/v9 v9.18.0 github.com/redis/go-redis/v9 v9.18.0
github.com/stretchr/testify v1.12.1 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/etp/v3 v3.2.0 github.com/txix-open/isp-kit v1.71.1
github.com/txix-open/isp-kit v1.76.0
github.com/txix-open/jsonschema v1.3.0 github.com/txix-open/jsonschema v1.3.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f golang.org/x/net v0.56.0
google.golang.org/grpc v1.85.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20260630182238-925bb5da69e7
google.golang.org/grpc v1.82.0
)
require (
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/go-faker/faker/v4 v4.9.0 // indirect
github.com/klauspost/compress v1.19.0 // indirect
github.com/txix-open/etp/v4 v4.1.1 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.uber.org/atomic v1.11.0 // indirect
) )
require ( require (
github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/buger/jsonparser v1.6.1 // indirect github.com/buger/jsonparser v1.2.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // 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.15 // indirect github.com/coder/websocket v1.8.15 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // 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.16 // indirect github.com/gabriel-vasile/mimetype v1.4.13 // indirect
github.com/getsentry/sentry-go v0.50.0 // indirect github.com/getsentry/sentry-go v0.47.0 // indirect
github.com/go-faker/faker/v4 v4.12.0 // indirect github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/logr v1.4.4 // 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.2 // indirect github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.2 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.34.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.20.4 // indirect github.com/julienschmidt/httprouter v1.3.0
github.com/leodido/go-urn v1.5.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect
github.com/mailru/easyjson v0.9.2 // indirect github.com/mailru/easyjson v0.9.2 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
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/pandatix/go-abnf v0.5.5 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.25.0 // indirect github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.3 // indirect github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.74.0 // indirect github.com/prometheus/common v0.69.0 // indirect
github.com/prometheus/procfs v0.23.0 // indirect github.com/prometheus/procfs v0.21.1 // indirect
github.com/txix-open/bellows v1.2.0 // indirect github.com/txix-open/bellows v1.2.0 // indirect
github.com/txix-open/etp/v4 v4.1.3 // indirect github.com/txix-open/etp/v3 v3.2.0
github.com/txix-open/validator/v10 v10.0.0-20261027072444-85f3391fc5c3 // indirect github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
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/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.69.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.72.0 // indirect go.opentelemetry.io/otel v1.44.0 // indirect
go.opentelemetry.io/otel v1.47.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0 // indirect go.opentelemetry.io/otel/metric v1.44.0 // indirect
go.opentelemetry.io/otel/log v1.47.0 // indirect go.opentelemetry.io/otel/sdk v1.44.0 // indirect
go.opentelemetry.io/otel/metric v1.47.0 // indirect go.opentelemetry.io/otel/trace v1.44.0 // indirect
go.opentelemetry.io/otel/sdk v1.47.0 // indirect go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.opentelemetry.io/otel/trace v1.47.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.1 // indirect
go.uber.org/atomic v1.12.0 // indirect
go.uber.org/multierr v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.28.0 // indirect go.uber.org/zap v1.28.0 // indirect
go.yaml.in/yaml/v3 v3.0.6 // indirect golang.org/x/crypto v0.53.0 // indirect
golang.org/x/crypto v0.59.0 // indirect golang.org/x/sys v0.46.0 // indirect
golang.org/x/net v0.63.0 // indirect golang.org/x/text v0.38.0 // indirect
golang.org/x/sys v0.50.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20260630182238-925bb5da69e7 // indirect
golang.org/x/text v0.44.0 // indirect google.golang.org/protobuf v1.36.11 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20261118221215-c8830f628b3f // indirect
google.golang.org/protobuf v1.36.12 // 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
) )
+90 -88
View File
@@ -8,8 +8,8 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/buger/jsonparser v1.6.1 h1:I0phFv0PlbLHnM7TZAVjZ2MJ2/eWRTDyuO7GLR98IEs= github.com/buger/jsonparser v1.2.0 h1:4EFcvK1kD4jyj6YqNK6skK6w+y7FHHBR+XBCtxwu/6g=
github.com/buger/jsonparser v1.6.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/buger/jsonparser v1.2.0/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/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=
@@ -18,29 +18,33 @@ github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNU
github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg= github.com/coder/websocket v1.8.15/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/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
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.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/gabriel-vasile/mimetype v1.4.16 h1:5izNFuvA37st1dDRAcA7TtmngBmRgiIPDmTtiEvjx1E= github.com/gabriel-vasile/mimetype v1.4.13 h1:46nXokslUBsAJE/wMsp5gtO500a4F3Nkz9Ufpk2AcUM=
github.com/gabriel-vasile/mimetype v1.4.16/go.mod h1:3oFFwxX8kTklZwzIl2aQEDZT0lKY8xH92ST88bAwba4= github.com/gabriel-vasile/mimetype v1.4.13/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
github.com/getsentry/sentry-go v0.50.0 h1:gkO59rn/i0RCAXUUTflC5QVbTQGPXbaFabs2olVzc9g= github.com/getsentry/sentry-go v0.47.0 h1:AnSMSyrYA5qZCIN/2xpgAAwv63sVULV+vBq37ajouc8=
github.com/getsentry/sentry-go v0.50.0/go.mod h1:+xsDuN+SoRN/xfs1hdq78wnrE3omIZf+FCuh9FOW1C8= github.com/getsentry/sentry-go v0.47.0/go.mod h1:h+b4VHpKnK7aUXB5wc+KDnPgp9ZtfliRD4eV85FbiSA=
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.12.0 h1:yZXxuoQjxN+C2PVgYoDSHGiD9wj6dX1/Ful4p7QQV0k= github.com/go-faker/faker/v4 v4.9.0 h1:a4HXLwueuTCtgF93VpUsl8Zd2nG1VH2SgNWDPVEBg5U=
github.com/go-faker/faker/v4 v4.12.0/go.mod h1:VFIEwWDd16EdYDLF6NJ5gAAzEp7vz5LgKgJ2iZ17Tdg= github.com/go-faker/faker/v4 v4.9.0/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7BdxkcWk7tiKQXk=
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.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.2 h1:d8UmcrM6Nip0hfGZKLGpAvZH37XB4TS0xzK9B56YNCY= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.2/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.2 h1:LCsMLC9RzmbUMNUPVYD15dmcjwYAJhmX8mPZRW4rAVU= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.2/go.mod h1:67VZIMp5lQpDWlnStOct22q1bkdJGJqHghbOtmkawxk= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-resty/resty/v2 v2.17.2 h1:FQW5oHYcIlkCNrMD2lloGScxcHJ0gkjshV3qcQAyHQk=
github.com/go-resty/resty/v2 v2.17.2/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2mLtQrOyQlVA=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
@@ -52,14 +56,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.34.0 h1:vzlTzzi4tHLa/JQdIE5LeXw6SEX5EVVhq/VPqKHnKOk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 h1:5VipnvEpbqr2gA2VbM+nYVbkIF28c5ZQfqCBQ5g2xfk=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.34.0/go.mod h1:FHXQZnW5pA0txiMr3jApv9uNJzZ+7mYZd+u+PPenCFU= github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0/go.mod h1:Hyl3n6Twe1hvtd9XUXDec4pTvgMSEixRuQKPTMH2bNs=
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.20.4 h1:dD0v/bvxtjCBqQu6sx1TNWkalEY5lNTIe+HY9w8TeNI= github.com/klauspost/compress v1.19.0 h1:sXLILfc9jV2QYWkzFOPWStmcUVH2RHEB1JCdY2oVvCQ=
github.com/klauspost/compress v1.20.4/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= github.com/klauspost/compress v1.19.0/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
@@ -68,8 +72,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/leodido/go-urn v1.5.0 h1:pLqT2kq1zpHW/1D18QMjMpdtX7cekxqtJJjg5ANyWw0= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
github.com/leodido/go-urn v1.5.0/go.mod h1:9BORnCDhdPBJNDEX+w1bJisa8yOKYi116VeO96s4ifE= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
github.com/mailru/easyjson v0.9.2 h1:dX8U45hQsZpxd80nLvDGihsQ/OxlvTkVUXH2r/8cb2M= github.com/mailru/easyjson v0.9.2 h1:dX8U45hQsZpxd80nLvDGihsQ/OxlvTkVUXH2r/8cb2M=
github.com/mailru/easyjson v0.9.2/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/mailru/easyjson v0.9.2/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
@@ -81,23 +85,23 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/pandatix/go-abnf v0.5.5 h1:EXex5KkRQx4Dm6GnpAcQnIMBs9KiK0uf8p/wq+4t9PM=
github.com/pandatix/go-abnf v0.5.5/go.mod h1:AE0KD3/VNoCjGzc1gqetRKshbI4SYErXQ/8kPenR5mc=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 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/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.25.0 h1:cDtW1TcFsMi1RJc8khwCKB4VhzwV04aKqbYtNOXuiK0= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/prometheus/client_golang v1.25.0/go.mod h1:j2X/4/kaQHLPnmyEU8zjmkndo1T317VpCIQEml8LTKk= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.6.3 h1:O0jaTVAYNxTHYInEPFJt5I3+sN8zqBtVMPTB1qyxiEo= github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
github.com/prometheus/client_model v0.6.3/go.mod h1:gpN5P9S7Rr6Yr92PiQ+Ixvhf6JZEkF1dnxsYL2aPBEM= github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
github.com/prometheus/common v0.74.0 h1:6iYW8MsYvmEnXFD9zLGgF0qmReaRhs3OMONu1c/nrLI= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
github.com/prometheus/common v0.74.0/go.mod h1:i/02C+FCst5B1etKgWesNrD49n+onplJCqUCtUKkOeA= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
github.com/prometheus/procfs v0.23.0 h1:ad+S6FTkzwaMgacKLM5h6bNKExS+DMH0YiUwXItH/o4= github.com/prometheus/common v0.69.0 h1:OA85nJQS/T/MaYh/Q2CcgDKSGWqNIgrBDvDH85CuiNk=
github.com/prometheus/procfs v0.23.0/go.mod h1:3AVXO0FqLafyYFU/V/IQRZlC8Rgqz8Dm/x6pKLK+RIk= github.com/prometheus/common v0.69.0/go.mod h1:ZzL3f6u94qUxh9p+tJTrF+FvBS1XXbbRAZCQkytAL0Y=
github.com/rabbitmq/amqp091-go v1.17.0 h1:6KmTqrnJq93cGIE3Q3UnXgsqw6NtLu8MNfFoIbfBAIQ= github.com/prometheus/procfs v0.21.1 h1:GljZCt+zSTS+NZq88cyQ1LjZ+RCHp3uVuabBWA5+OJI=
github.com/rabbitmq/amqp091-go v1.17.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o= github.com/prometheus/procfs v0.21.1/go.mod h1:aB55Cww9pdSJVHk0hUf0inxWyyjPogFIjmHKYgMKmtY=
github.com/rabbitmq/amqp091-go v1.12.0 h1:V0v14Iqfs+MwHWihJt/nGS5Ulu0vw572b2Co3mwunkI=
github.com/rabbitmq/amqp091-go v1.12.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/redis/go-redis/v9 v9.18.0 h1:pMkxYPkEbMPwRdenAzUNyFNrDgHx9U+DrBabWNfSRQs= github.com/redis/go-redis/v9 v9.18.0 h1:pMkxYPkEbMPwRdenAzUNyFNrDgHx9U+DrBabWNfSRQs=
github.com/redis/go-redis/v9 v9.18.0/go.mod h1:k3ufPphLU5YXwNTUcCRXGxUoF1fqxnhFQmscfkCoDA0= github.com/redis/go-redis/v9 v9.18.0/go.mod h1:k3ufPphLU5YXwNTUcCRXGxUoF1fqxnhFQmscfkCoDA0=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
@@ -111,24 +115,24 @@ 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.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= 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=
github.com/txix-open/bellows v1.2.0/go.mod h1:qbKCy+RTgD30Qpw1fyb3y3jp5Y9mGhLLxgae1l0W92o= github.com/txix-open/bellows v1.2.0/go.mod h1:qbKCy+RTgD30Qpw1fyb3y3jp5Y9mGhLLxgae1l0W92o=
github.com/txix-open/etp/v3 v3.2.0 h1:EgTchT8VtCYV1iEo/y4jII3/NybrXiQDE0y6pmS350M= github.com/txix-open/etp/v3 v3.2.0 h1:EgTchT8VtCYV1iEo/y4jII3/NybrXiQDE0y6pmS350M=
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.1.3 h1:u9ZyU2yKGgoQ1/DSaElhazWm8xASdqGEdWjoJ2xQlfo= github.com/txix-open/etp/v4 v4.1.1 h1:Yna+0mw/kQZP7Rl6QI4spCrO6qgO8ZhP8PjHlJj2lTU=
github.com/txix-open/etp/v4 v4.1.3/go.mod h1:9GK+Aje8BmLFq8Hk4j6Qb976LdU9WECCWAuLK1vAKgM= github.com/txix-open/etp/v4 v4.1.1/go.mod h1:9GK+Aje8BmLFq8Hk4j6Qb976LdU9WECCWAuLK1vAKgM=
github.com/txix-open/grmq v1.12.0 h1:lSPYvwLfTL0+b0xDQmuuN6RaKS3NCEJNK9ccWpOWa8Y= github.com/txix-open/grmq v1.12.0 h1:lSPYvwLfTL0+b0xDQmuuN6RaKS3NCEJNK9ccWpOWa8Y=
github.com/txix-open/grmq v1.12.0/go.mod h1:6m9CCTQao/HAFalu5rFOZGJ5KLEP6WzzIwj80Ml3KGE= github.com/txix-open/grmq v1.12.0/go.mod h1:6m9CCTQao/HAFalu5rFOZGJ5KLEP6WzzIwj80Ml3KGE=
github.com/txix-open/isp-kit v1.76.0 h1:kqhX2DuoTfeW7BIshedG26TRIfOgX0QOInm606ssGVg= github.com/txix-open/isp-kit v1.71.1 h1:MNSuHy/HEvy7dKPQXkM+dgQpShDhcv1Sq1kLgep2LaA=
github.com/txix-open/isp-kit v1.76.0/go.mod h1:hR9iAlh3x9gEg5GfALrrkN/2SbGkgZQCmwO2GZWjC1M= github.com/txix-open/isp-kit v1.71.1/go.mod h1:j2sj86byoKllCs+DaRWwg56NgcL2omr/bUzmU7+AF74=
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-20261027072444-85f3391fc5c3 h1:1jE11HLmMHDYYAcE+UmQ5VHgz4stzz0+daJbDWS+sEs= github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb h1:UJgT4u/QMv5QHKOQeJ7igShHa36c2/vIRqJiRLdDlf0=
github.com/txix-open/validator/v10 v10.0.0-20261027072444-85f3391fc5c3/go.mod h1:Yf41v210LFyYAj+tGmDh7PHdGsTaZjdBzHG0ptUvihw= github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb/go.mod h1:0biAFE0bgbcKeBBAwgEDhbZz6uT1vuSETCrFQlv2RiA=
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
@@ -142,60 +146,58 @@ github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.72.0 h1:jva1c3z2ZFEQ5sTvnLG2tBALNehO+QvdXKQii6eKRoo= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.69.0 h1:MCcYL7J6Vt/X0kjqbMZkekCmwsurbQRbL69vkiye2lk=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.72.0/go.mod h1:3pjFS5EnOVfjvYO6/NMdtJFHFQR+8uiGtrZ965nZP4w= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.69.0/go.mod h1:3jnStNwSufK+f5ktjL4EPcwtig4rtd81NS70lqHuXl8=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0 h1:LxwW/9ctSCv+QkE/cLR7M91ZIkXNMqJtEMi1vCw9U8s= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 h1:8tvICD4vSTOOsNrsI4Ljf6C+6UKvpTEH5XY3JMoyPoo=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0/go.mod h1:tOsftB4SslBwwErVEPaenU2RpThXWPIU8DoJHEC4dyw= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0/go.mod h1:z9+yiacE0IHRqM4qFfkbt/JYlmYXgss8GY/jXoNuPJI=
go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM= go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU=
go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU= go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 h1:julhjPeUH/q/7hinbSdDdqt5h7Zw9YWmRlWRhI0jd54= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 h1:4YsVu3B8+3qtWYYrsUYgn0OG78pN0rnNPRGX4SbokQI=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0/go.mod h1:Ao2mz688LH/tFf0yMAenidq6k2YNSx6SIY2q6jDACck= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0/go.mod h1:+wnlSn0mD1ADVMe3v9Z/WIaiz6q6gL2J/ejaAmdmv80=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0 h1:aXZXsZ012wOgVkqaiQv+Z/d8V0xKjmg70F6m4CE94lc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0 h1:lgh3PiVrRUWMLOVSkQicxzZll5NjF1r+AtsX1XRIHw0=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0/go.mod h1:ziu1gUIJhAaxM3EV1e3Ralk5AAyL1UOYz3lJJ4VSI38= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0/go.mod h1:5Cnhth3m/AgOeTgE3ex12pPmiu/gGtZit03kSzx9X7s=
go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI= go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc=
go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw= go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo=
go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY= go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58=
go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU= go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0=
go.opentelemetry.io/otel/sdk v1.47.0 h1:zWXEr4j2lFefG87TU6Yg8a7ngfohIKFZHKp0Hf5hC6I= go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI=
go.opentelemetry.io/otel/sdk v1.47.0/go.mod h1:VUc24kiOeoGsxG8G9ULx3fWKvB7jMhnGE8Oi607lgR0= go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA=
go.opentelemetry.io/otel/sdk/metric v1.47.0 h1:lfISg2j93VT6yqdk9OfUaZmw/GfcZqCCV3jdXtsPnKw= go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk=
go.opentelemetry.io/otel/sdk/metric v1.47.0/go.mod h1:ypLp+mW1Nt2x+Szt3b5/i1syodyts49lMOwxpDI3VGw= go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE=
go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM= go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0= go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
go.opentelemetry.io/proto/otlp v1.11.1 h1:SCrPqH9NE5CmBrOqpjNCiT0X5mGwMyGERXdogfR7Yjw= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.opentelemetry.io/proto/otlp v1.11.1/go.mod h1:wq8W4aSf6bOy8RZyESOeQFr9Pu7wydWX/TY4sgvrTPg= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/atomic v1.12.0 h1:BvcXdFKuviU4fTL/f+SxdQ5qJX/Jix8pAkgdUcb3XOE=
go.uber.org/atomic v1.12.0/go.mod h1:I6c4cg+6HCxRjfjSsYtApoFILnpc0CGUdGkXVqbYVNk=
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.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo= go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo=
go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q= go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q=
go.yaml.in/yaml/v2 v2.4.5 h1:a5nxWvYi94DRl6QSLlTbLpVmutgx2qg8EVjnJtuFpwI= go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
go.yaml.in/yaml/v2 v2.4.5/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
go.yaml.in/yaml/v3 v3.0.6 h1:zcDfvjXEqTQmpjniUBLc91xYJMB2c4QOFxEF/LCEckM= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.6/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.59.0 h1:xS2jhqYbzNrpvkWP2YTDf4TJwBy3ykR03i8vFDxEc7c= golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto=
golang.org/x/crypto v0.59.0/go.mod h1:veDyUwATGs3c+vN3VfTbzViMGXeTBk3WyhBOkn+F/4U= golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio=
golang.org/x/net v0.63.0 h1:HCoTmNh9EpD1PpK8gBNFY4gcTY4N+KQEO8ylfIKqFJ0= golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o=
golang.org/x/net v0.63.0/go.mod h1:15JLg3IX1bLjHK264EZQEbIpTiR/KVLuo9CTRWd0pig= golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec=
golang.org/x/sync v0.25.0 h1:dJnifr0nMV8/SBnBvdo4eSGGnrc3O4FFx6IqvtLcmRs= golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
golang.org/x/sync v0.25.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs= golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo= golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
golang.org/x/text v0.44.0/go.mod h1:S4FR1waQ9LbjQTls97SyRjDaUUVkaM+cXwwuG/G+MwY= golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4=
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
google.golang.org/genproto/googleapis/api v0.0.0-20261118221215-c8830f628b3f h1:7CbYDSDM5xqpq8v2tNm+Q057COf1lvA0gorVk+304tY= google.golang.org/genproto/googleapis/api v0.0.0-20260630182238-925bb5da69e7 h1:jQ9p21COKWjP3VwuFrNRiiOTMh3mPpN45R7SLrH/HUU=
google.golang.org/genproto/googleapis/api v0.0.0-20261118221215-c8830f628b3f/go.mod h1:CPxXEEQ1S9iJmInAF/8MNc8tKWnya8I8Kni9Zh2hV0M= google.golang.org/genproto/googleapis/api v0.0.0-20260630182238-925bb5da69e7/go.mod h1:KqHwBx2upmfa1XSi1WuRvC+2VGCLtooKkfmyvRbUmqA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f h1:aDW6Vb2T1K0xbAgW+ED8iz39WlgjjX/OKiNh6tXv/+g= google.golang.org/genproto/googleapis/rpc v0.0.0-20260630182238-925bb5da69e7 h1:eM/YSd5bBFagF51o1E745Ta7RwzpW0h+z+QDNZOgmQ8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc= google.golang.org/genproto/googleapis/rpc v0.0.0-20260630182238-925bb5da69e7/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/grpc v1.85.0 h1:BPBCfuVRQ1qvBhKDOq9uvQllMvO59rKsYhXpp7Dd8vw= google.golang.org/grpc v1.82.0 h1:vguDnZUPjE26w09A63VoxZPnvPjB5Riyc0mkXPFmAIU=
google.golang.org/grpc v1.85.0/go.mod h1:0rQrOD58yjal/0EaVbGBANindixsCZNQPDV3VKtaKuQ= google.golang.org/grpc v1.82.0/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
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=
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
) )
const ( const (
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context" "context"
"net/http" "net/http"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
) )
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
) )
const ( const (
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context" "context"
"net/http" "net/http"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
) )
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"isp-gate-service/request" "isp-gate-service/request"
"net/http" "net/http"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
-15
View File
@@ -1,15 +0,0 @@
package middleware
import (
"isp-gate-service/request"
)
func JsonResponseUtf8Charset(applicationIds map[int]bool) Middleware {
return func(next Handler) Handler {
return HandlerFunc(func(ctx *request.Context) error {
authData, _ := ctx.GetAuthData()
ctx.EnableHttpJsonUtf8Charset(applicationIds[authData.ApplicationId])
return next.Handle(ctx)
})
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"isp-gate-service/helpers" "isp-gate-service/helpers"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/txix-open/isp-kit/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"
) )
+2 -4
View File
@@ -1,8 +1,6 @@
package middleware package middleware
import ( import (
"slices"
"isp-gate-service/request" "isp-gate-service/request"
) )
@@ -20,8 +18,8 @@ type Middleware func(next Handler) Handler
// nolint:ireturn // nolint:ireturn
func Chain(root Handler, middlewares ...Middleware) Handler { func Chain(root Handler, middlewares ...Middleware) Handler {
for _, middleware := range slices.Backward(middlewares) { for i := len(middlewares) - 1; i >= 0; i-- {
root = middleware(root) root = middlewares[i](root)
} }
return root return root
} }
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/txix-open/isp-kit/errors" "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"
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
+4 -1
View File
@@ -14,7 +14,7 @@ import (
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/grpc" "github.com/txix-open/isp-kit/grpc"
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
"github.com/txix-open/isp-kit/grpc/isp" "github.com/txix-open/isp-kit/grpc/isp"
@@ -164,6 +164,9 @@ func (p Grpc) writeMetadata(ctx *request.Context) metadata.MD {
appAuthData, err := ctx.GetAuthData() appAuthData, err := ctx.GetAuthData()
if err == nil { if err == nil {
md[grpc.SystemIdHeader] = []string{strconv.Itoa(appAuthData.SystemId)}
md[grpc.DomainIdHeader] = []string{strconv.Itoa(appAuthData.DomainId)}
md[grpc.ServiceIdHeader] = []string{strconv.Itoa(appAuthData.ServiceId)}
md[grpc.ApplicationIdHeader] = []string{strconv.Itoa(appAuthData.ApplicationId)} md[grpc.ApplicationIdHeader] = []string{strconv.Itoa(appAuthData.ApplicationId)}
encodedAppName := base64.StdEncoding.EncodeToString([]byte(appAuthData.AppName)) encodedAppName := base64.StdEncoding.EncodeToString([]byte(appAuthData.AppName))
md[grpc.ApplicationNameHeader] = []string{encodedAppName} md[grpc.ApplicationNameHeader] = []string{encodedAppName}
+5 -15
View File
@@ -1,7 +1,6 @@
package proxy package proxy
import ( import (
"context"
"encoding/base64" "encoding/base64"
"fmt" "fmt"
"net" "net"
@@ -9,15 +8,15 @@ import (
"net/http/httputil" "net/http/httputil"
"net/url" "net/url"
"strconv" "strconv"
"strings"
"time" "time"
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/grpc" "github.com/txix-open/isp-kit/grpc"
"github.com/txix-open/isp-kit/requestid" "github.com/txix-open/isp-kit/requestid"
"golang.org/x/net/context"
) )
var ( var (
@@ -80,9 +79,6 @@ func (p Http) Handle(ctx *request.Context) error {
errors.WithMessagef(err, "http proxy to %s", host), errors.WithMessagef(err, "http proxy to %s", host),
) )
} }
if ctx.IsJsonUtf8CharsetEnabled() {
reverseProxy.ModifyResponse = addJsonUtf8Charset
}
context, cancel := context.WithTimeout(request.Context(), p.timeout) context, cancel := context.WithTimeout(request.Context(), p.timeout)
defer cancel() defer cancel()
@@ -110,6 +106,9 @@ func setHttpHeaders(ctx *request.Context, header http.Header, skipAuth bool) {
appAuthData, err := ctx.GetAuthData() appAuthData, err := ctx.GetAuthData()
if err == nil { if err == nil {
header.Set(grpc.SystemIdHeader, strconv.Itoa(appAuthData.SystemId))
header.Set(grpc.DomainIdHeader, strconv.Itoa(appAuthData.DomainId))
header.Set(grpc.ServiceIdHeader, strconv.Itoa(appAuthData.ServiceId))
header.Set(grpc.ApplicationIdHeader, strconv.Itoa(appAuthData.ApplicationId)) header.Set(grpc.ApplicationIdHeader, strconv.Itoa(appAuthData.ApplicationId))
encodedAppName := base64.StdEncoding.EncodeToString([]byte(appAuthData.AppName)) encodedAppName := base64.StdEncoding.EncodeToString([]byte(appAuthData.AppName))
header.Set(grpc.ApplicationNameHeader, encodedAppName) //nolint:canonicalheader header.Set(grpc.ApplicationNameHeader, encodedAppName) //nolint:canonicalheader
@@ -125,12 +124,3 @@ func setHttpHeaders(ctx *request.Context, header http.Header, skipAuth bool) {
func defaultTransportDialContext(dialer *net.Dialer) func(context.Context, string, string) (net.Conn, error) { func defaultTransportDialContext(dialer *net.Dialer) func(context.Context, string, string) (net.Conn, error) {
return dialer.DialContext return dialer.DialContext
} }
func addJsonUtf8Charset(response *http.Response) error {
contentType := response.Header.Get("Content-Type")
if strings.EqualFold(contentType, "application/json") {
response.Header.Set("Content-Type", "application/json; charset=utf-8")
}
return nil
}
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"time" "time"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"github.com/pkg/errors"
"github.com/tomakado/websocketproxy" "github.com/tomakado/websocketproxy"
"github.com/txix-open/isp-kit/errors"
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
) )
+10 -17
View File
@@ -6,9 +6,8 @@ import (
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/http/httpclix" "github.com/txix-open/isp-kit/grpc/client"
"github.com/txix-open/isp-kit/metrics/http_metrics"
) )
const ( const (
@@ -17,39 +16,33 @@ const (
) )
type Admin struct { type Admin struct {
cli *httpclix.ClientBalancer cli *client.Client
} }
func NewAdmin(cli *httpclix.ClientBalancer) Admin { func NewAdmin(cli *client.Client) Admin {
return Admin{cli: cli} return Admin{cli: cli}
} }
func (r Admin) Authenticate(ctx context.Context, token string) (*entity.AdminAuthenticateResponse, error) { func (r Admin) Authenticate(ctx context.Context, token string) (*entity.AdminAuthenticateResponse, error) {
ctx = http_metrics.ClientEndpointToContext(ctx, adminAuthenticate)
resp := entity.AdminAuthenticateResponse{} resp := entity.AdminAuthenticateResponse{}
err := r.cli.Post(adminAuthenticate). err := r.cli.Invoke(adminAuthenticate).
JsonRequestBody(entity.AuthenticateRequest{Token: token}). JsonRequestBody(entity.AuthenticateRequest{Token: token}).
JsonResponseBody(&resp). JsonResponseBody(&resp).
StatusCodeToError(). Do(ctx)
DoWithoutResponse(ctx)
if err != nil { if err != nil {
return nil, errors.WithMessagef(err, "http client invoke %s", adminAuthenticate) return nil, errors.WithMessagef(err, "grpc client invoke %s", adminAuthenticate)
} }
return &resp, nil return &resp, nil
} }
func (r Admin) Authorize(ctx context.Context, adminId int, permission string) (bool, error) { func (r Admin) Authorize(ctx context.Context, adminId int, permission string) (bool, error) {
ctx = http_metrics.ClientEndpointToContext(ctx, adminAuthorize)
resp := entity.AdminAuthorizeResponse{} resp := entity.AdminAuthorizeResponse{}
err := r.cli.Post(adminAuthorize). err := r.cli.Invoke(adminAuthorize).
JsonRequestBody(entity.AdminAuthorizeRequest{AdminId: adminId, Permission: permission}). JsonRequestBody(entity.AdminAuthorizeRequest{AdminId: adminId, Permission: permission}).
JsonResponseBody(&resp). JsonResponseBody(&resp).
StatusCodeToError(). Do(ctx)
DoWithoutResponse(ctx)
if err != nil { if err != nil {
return false, errors.WithMessagef(err, "http client invoke %s", adminAuthorize) return false, errors.WithMessagef(err, "grpc client invoke: %s", adminAuthorize)
} }
return resp.Authorized, nil return resp.Authorized, nil
} }
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/json" "github.com/txix-open/isp-kit/json"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context" "context"
"time" "time"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
"isp-gate-service/entity" "isp-gate-service/entity"
) )
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
) )
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/pkg/errors"
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/json" "github.com/txix-open/isp-kit/json"
) )
+1 -1
View File
@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/pkg/errors"
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
"github.com/txix-open/isp-kit/errors"
) )
type RedisAuthzCache struct { type RedisAuthzCache struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/http/httpcli" "github.com/txix-open/isp-kit/http/httpcli"
"github.com/txix-open/isp-kit/http/httpclix" "github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/lb" "github.com/txix-open/isp-kit/lb"
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/json" "github.com/txix-open/isp-kit/json"
) )
+1 -11
View File
@@ -6,7 +6,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
) )
var ( var (
@@ -30,8 +30,6 @@ type Context struct {
adminToken string adminToken string
queryParams map[string]string queryParams map[string]string
httpJsonUtf8Charset bool
} }
func NewContext( func NewContext(
@@ -116,14 +114,6 @@ func (c *Context) SetContext(ctx context.Context) {
c.request = c.request.WithContext(ctx) c.request = c.request.WithContext(ctx)
} }
func (c *Context) EnableHttpJsonUtf8Charset(enable bool) {
c.httpJsonUtf8Charset = enable
}
func (c *Context) IsJsonUtf8CharsetEnabled() bool {
return c.httpJsonUtf8Charset
}
func (c *Context) Param(name string) string { func (c *Context) Param(name string) string {
value := c.request.Header.Get(name) value := c.request.Header.Get(name)
if value != "" { if value != "" {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"strings" "strings"
"github.com/julienschmidt/httprouter" "github.com/julienschmidt/httprouter"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"github.com/txix-open/isp-kit/cluster" "github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
) )
type AdminAuth interface { type AdminAuth interface {
+4 -1
View File
@@ -5,7 +5,7 @@ import (
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
) )
type AuthenticationCache interface { type AuthenticationCache interface {
@@ -74,6 +74,9 @@ func (Authentication) convertAuthData(authData *entity.AppAuthData) *domain.AppA
return &domain.AppAuthData{ return &domain.AppAuthData{
AppName: authData.AppName, AppName: authData.AppName,
SystemId: authData.SystemId,
DomainId: authData.DomainId,
ServiceId: authData.ServiceId,
ApplicationId: authData.ApplicationId, ApplicationId: authData.ApplicationId,
} }
} }
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
) )
type AuthorizationCache interface { type AuthorizationCache interface {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
"isp-gate-service/conf" "isp-gate-service/conf"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/txix-open/isp-kit/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" "isp-gate-service/entity"
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
) )
type CookieProvider struct { type CookieProvider struct {
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/txix-open/isp-kit/errors" "github.com/pkg/errors"
) )
type UserAuthenticationCache interface { type UserAuthenticationCache interface {
+36 -24
View File
@@ -1,5 +1,5 @@
// nolint:canonicalheader // nolint:canonicalheader
package tests_test package tests
import ( import (
"context" "context"
@@ -24,7 +24,6 @@ import (
"github.com/txix-open/isp-kit/http/endpoint" "github.com/txix-open/isp-kit/http/endpoint"
"github.com/txix-open/isp-kit/http/endpoint/httplog" "github.com/txix-open/isp-kit/http/endpoint/httplog"
"github.com/txix-open/isp-kit/http/httpcli" "github.com/txix-open/isp-kit/http/httpcli"
"github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/http/router" "github.com/txix-open/isp-kit/http/router"
"github.com/txix-open/isp-kit/test/fake" "github.com/txix-open/isp-kit/test/fake"
@@ -60,9 +59,18 @@ func (s *HappyPathTestSuite) TestGrpcProxy() {
requestId := requestid.Next() requestId := requestid.Next()
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 {
systemId, err := authData.SystemId()
require.NoError(err)
domainId, err := authData.DomainId()
require.NoError(err)
serviceId, err := authData.ServiceId()
require.NoError(err)
applicationId, err := authData.ApplicationId() applicationId, err := authData.ApplicationId()
require.NoError(err) require.NoError(err)
require.EqualValues(requestId, requestid.FromContext(ctx)) require.EqualValues(requestId, requestid.FromContext(ctx))
require.EqualValues(1, systemId)
require.EqualValues(2, domainId)
require.EqualValues(3, serviceId)
require.EqualValues(4, applicationId) require.EqualValues(4, applicationId)
adminId, err := grpc.StringFromMd("x-admin-id", metadata.MD(authData)) adminId, err := grpc.StringFromMd("x-admin-id", metadata.MD(authData))
@@ -572,7 +580,7 @@ func (s *HappyPathTestSuite) TestUserAuthorization_SkipAppAuth() { // nolint:fun
} }
// nolint:ireturn // nolint:ireturn
func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, *client.Client, *httpclix.ClientBalancer) { func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, *client.Client, *client.Client) {
config := conf.Remote{ config := conf.Remote{
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,
@@ -589,6 +597,9 @@ func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, *
Authenticated: true, Authenticated: true,
ErrorReason: "", ErrorReason: "",
AuthData: &entity.AppAuthData{ AuthData: &entity.AppAuthData{
SystemId: 1,
DomainId: 2,
ServiceId: 3,
ApplicationId: 4, ApplicationId: 4,
AppName: "test", AppName: "test",
}, },
@@ -597,27 +608,19 @@ func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, *
return entity.AuthorizeResponse{Authorized: true} return entity.AuthorizeResponse{Authorized: true}
}) })
adminMux := router.New() adminService, adminCli := grpct.NewMock(test)
defaultWrapper := endpoint.DefaultWrapper(test.Logger(), httplog.Noop()) adminService.Mock("admin/secure/authenticate", func(req entity.AdminAuthorizeRequest) entity.AdminAuthenticateResponse {
adminMux.POST("/admin/secure/authenticate", return entity.AdminAuthenticateResponse{
defaultWrapper.Endpoint(func(req entity.AuthenticateRequest) entity.AdminAuthenticateResponse { Authenticated: true,
return entity.AdminAuthenticateResponse{ ErrorReason: "",
Authenticated: true, AdminId: 1,
ErrorReason: "", }
AdminId: 1, }).Mock("admin/secure/authorize", func(req entity.AdminAuthorizeRequest) entity.AdminAuthorizeResponse {
} if req.Permission == "ok_permission" {
})) return entity.AdminAuthorizeResponse{Authorized: true}
adminMux.POST("/admin/secure/authorize", }
defaultWrapper.Endpoint(func(req entity.AdminAuthorizeRequest) entity.AdminAuthorizeResponse { return entity.AdminAuthorizeResponse{Authorized: false}
if req.Permission == "ok_permission" { })
return entity.AdminAuthorizeResponse{Authorized: true}
}
return entity.AdminAuthorizeResponse{Authorized: false}
}))
adminMock := httptest.NewServer(adminMux)
adminUrl, err := url.Parse(adminMock.URL)
require.New(s.T()).NoError(err)
adminCli := httpclix.NewClientBalancer([]string{adminUrl.Host})
return config, systemCli, adminCli return config, systemCli, adminCli
} }
@@ -628,9 +631,18 @@ func TestHappyPathTestSuite(t *testing.T) {
} }
func assertHeaders(require *require.Assertions, requestId string, ctx context.Context, headers http.Header) { func assertHeaders(require *require.Assertions, requestId string, ctx context.Context, headers http.Header) {
systemId, err := strconv.Atoi(headers.Get("x-system-identity"))
require.NoError(err)
domainId, err := strconv.Atoi(headers.Get("x-domain-identity"))
require.NoError(err)
serviceId, err := strconv.Atoi(headers.Get("x-service-identity"))
require.NoError(err)
applicationId, err := strconv.Atoi(headers.Get("x-application-identity")) applicationId, err := strconv.Atoi(headers.Get("x-application-identity"))
require.NoError(err) require.NoError(err)
require.EqualValues(requestId, requestid.FromContext(ctx)) require.EqualValues(requestId, requestid.FromContext(ctx))
require.EqualValues(1, systemId)
require.EqualValues(2, domainId)
require.EqualValues(3, serviceId)
require.EqualValues(4, applicationId) require.EqualValues(4, applicationId)
expectedAppName := base64.StdEncoding.EncodeToString([]byte("test")) expectedAppName := base64.StdEncoding.EncodeToString([]byte("test"))
require.EqualValues(expectedAppName, headers.Get("x-application-name")) require.EqualValues(expectedAppName, headers.Get("x-application-name"))
+21 -30
View File
@@ -4,11 +4,10 @@ import (
"context" "context"
"net" "net"
"net/http" "net/http"
"net/http/httptest"
"net/url"
"isp-gate-service/assembly" "isp-gate-service/assembly"
"isp-gate-service/conf" "isp-gate-service/conf"
"isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"isp-gate-service/routes" "isp-gate-service/routes"
@@ -18,10 +17,6 @@ import (
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
endpoint2 "github.com/txix-open/isp-kit/grpc/endpoint" endpoint2 "github.com/txix-open/isp-kit/grpc/endpoint"
"github.com/txix-open/isp-kit/grpc/isp" "github.com/txix-open/isp-kit/grpc/isp"
"github.com/txix-open/isp-kit/http/endpoint"
"github.com/txix-open/isp-kit/http/endpoint/httplog"
"github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/http/router"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
@@ -60,12 +55,15 @@ func main() {
Throttling: []conf.Throttling{{ApplicationId: 1, RequestsPerSeconds: 5000}}, Throttling: []conf.Throttling{{ApplicationId: 1, RequestsPerSeconds: 5000}},
} }
systemService, systemCli := NewMock(logger) systemService, systemCli, _ := NewMock(logger)
systemService.Mock("system/secure/authenticate", func() entity.AuthenticateResponse { systemService.Mock("system/secure/authenticate", func() entity.AuthenticateResponse {
return entity.AuthenticateResponse{ return entity.AuthenticateResponse{
Authenticated: true, Authenticated: true,
ErrorReason: "", ErrorReason: "",
AuthData: &entity.AppAuthData{ AuthData: &entity.AppAuthData{
SystemId: 1,
DomainId: 1,
ServiceId: 1,
ApplicationId: 1, ApplicationId: 1,
}, },
} }
@@ -73,9 +71,16 @@ func main() {
return entity.AuthorizeResponse{Authorized: true} return entity.AuthorizeResponse{Authorized: true}
}) })
adminCli := NewAdminMock(logger) adminService, _, adminCli := NewMock(logger)
adminService.Mock("admin/secure/authenticate", func() domain.AdminAuthenticateResponse {
return domain.AdminAuthenticateResponse{
Authenticated: true,
ErrorReason: "",
AdminId: 1,
}
})
targetService, targetCli := NewMock(logger) targetService, targetCli, _ := NewMock(logger)
targetService.Mock("endpoint", func(req request) response { targetService.Mock("endpoint", func(req request) response {
return response{Id: req.Id} return response{Id: req.Id}
}) })
@@ -97,33 +102,19 @@ func main() {
srv.ListenAndServe() srv.ListenAndServe()
} }
func NewAdminMock(logger log.Logger) *httpclix.ClientBalancer { func TestServer(service isp.BackendServiceServer) (*grpc.Server, *client.Client, *client.Client) {
mux := router.New()
wrapper := endpoint.DefaultWrapper(logger, httplog.Noop())
mux.POST("/admin/secure/authenticate",
wrapper.Endpoint(func() entity.AdminAuthenticateResponse {
return entity.AdminAuthenticateResponse{
Authenticated: true,
ErrorReason: "",
AdminId: 1,
}
}))
mock := httptest.NewServer(mux)
u, _ := url.Parse(mock.URL)
return httpclix.NewClientBalancer([]string{u.Host})
}
func TestServer(service isp.BackendServiceServer) (*grpc.Server, *client.Client) {
listener, _ := net.Listen("tcp", "127.0.0.1:") // nolint:noctx 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()
srv.Upgrade(service) srv.Upgrade(service)
go func() { go func() {
_ = srv.Serve(listener) _ = srv.Serve(listener)
}() }()
sysCli.Upgrade([]string{listener.Addr().String()}) sysCli.Upgrade([]string{listener.Addr().String()})
return srv, sysCli adminCli.Upgrade([]string{listener.Addr().String()})
return srv, sysCli, adminCli
} }
type MockServer struct { type MockServer struct {
@@ -132,13 +123,13 @@ type MockServer struct {
mockEndpoints map[string]any mockEndpoints map[string]any
} }
func NewMock(logger log.Logger) (*MockServer, *client.Client) { func NewMock(logger log.Logger) (*MockServer, *client.Client, *client.Client) {
srv, syscli := TestServer(grpc.NewMux()) srv, syscli, admincli := TestServer(grpc.NewMux())
return &MockServer{ return &MockServer{
srv: srv, srv: srv,
logger: logger, logger: logger,
mockEndpoints: make(map[string]any), mockEndpoints: make(map[string]any),
}, syscli }, syscli, admincli
} }
func (m *MockServer) Mock(endpoint string, handler any) *MockServer { func (m *MockServer) Mock(endpoint string, handler any) *MockServer {