From bbb4a4181e43824a0a759a062d7d3125601b27e2 Mon Sep 17 00:00:00 2001 From: yang <3264085417@qq.com> Date: Thu, 28 Sep 2023 00:50:18 +0800 Subject: [PATCH] refactor: switch platform by sdk Signed-off-by: yang <3264085417@qq.com> --- .gitignore | 1 + biz/service/switch-platform/emigrate.go | 54 ++++--------------- biz/service/switch-platform/imigrate.go | 46 ++++++++-------- .../switch-platform/switch_platform.go | 6 ++- go.mod | 17 +++--- go.sum | 39 ++++++++++---- 6 files changed, 75 insertions(+), 88 deletions(-) diff --git a/.gitignore b/.gitignore index 23a2adb..b7c7d44 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ build debug #/*.sh res/loadbin.go +.idea \ No newline at end of file diff --git a/biz/service/switch-platform/emigrate.go b/biz/service/switch-platform/emigrate.go index 938c2b4..3f75b34 100644 --- a/biz/service/switch-platform/emigrate.go +++ b/biz/service/switch-platform/emigrate.go @@ -22,38 +22,19 @@ package switchplatform import ( - "agent/biz/model/device" "agent/biz/service/pair" - "agent/config" - "agent/utils" - "fmt" - "net/http" - "strings" - "time" - "agent/utils/logger" - utilshttp "agent/utils/network/http" + "github.com/big-dust/platform-sdk-go/v2" + "time" ) func emigrate() { - type UserDomainRoute struct { - UserId string `json:"userId"` - UserDomainRedirect string `json:"userDomainRedirect"` - } - type RouteReq struct { - UserDomainRoutes []UserDomainRoute `json:"userDomainRouteInfos"` - } - - type RouteRsp struct { - BoxUUID string `json:"boxUUID"` - UserDomainRoutes []UserDomainRoute `json:"userDomainRouteInfos"` - } - var params RouteReq + var params platform.SpacePlatformMigrationOutRequest for _, oldAC := range si.OldAccount { for _, newAC := range si.ImigrateResult.UserInfos { if oldAC.UserId == newAC.UserId { - params.UserDomainRoutes = append(params.UserDomainRoutes, UserDomainRoute{UserId: oldAC.UserId, UserDomainRedirect: newAC.UserDomain}) + params.UserDomainRouteInfos = append(params.UserDomainRouteInfos, platform.UserDomainRouteInfo{UserId: oldAC.UserId, UserDomainRedirect: newAC.UserDomain}) } } } @@ -63,34 +44,19 @@ func emigrate() { time.Sleep(time.Second * 5) - url, _ := utils.JoinUrl(si.OldApiBaseUrl, strings.ReplaceAll(config.Config.Platform.Route.Path, "{box_uuid}", device.GetDeviceInfo().BoxUuid)) - - destBRK, err := pair.GetDeviceRegKey(si.OldApiBaseUrl) + client, err := pair.GetSdkClientWithDeviceRegKey(si.NewApiBaseUrl) if err != nil { - logger.AppLogger().Infof("transId:%v,Failed to get box-reg-key", si.TransId) - continue + logger.AppLogger().Warnf("Failed new SDK Client: err: %v", err.Error()) + return } + resp, err := client.SpacePlatformMigrationOut(¶ms) - headers := map[string]string{"Box-Reg-Key": destBRK.BoxRegKey, "Request-Id": si.TransId} - rsp := RouteRsp{} - - httpReq, httpRsp, body, err := utilshttp.PostJsonWithHeaders(url, params, headers, &rsp) if err != nil { - logger.AppLogger().Warnf("Failed PostJson, transId:%v, err:%v, @@httpReq:%+v, @@httpRsp:%+v, @@body:%v", si.TransId, err, httpReq, httpRsp, string(body)) + logger.AppLogger().Warnf("Space Platform Migrate Out Failed by SDK: transId:%v,emigrate, err:%+v ", si.TransId, err) continue } logger.AppLogger().Infof("transId:%v,emigrate, parms:%+v", si.TransId, params) - logger.AppLogger().Infof("transId:%v,emigrate, rsp:%+v", si.TransId, rsp) - logger.AppLogger().Infof("transId:%v,emigrate, httpReq:%+v", si.TransId, httpReq) - logger.AppLogger().Infof("transId:%v,emigrate, httpRsp:%+v", si.TransId, httpRsp) - logger.AppLogger().Infof("transId:%v,emigrate, body:%v", si.TransId, string(body)) - - if httpRsp.StatusCode != http.StatusOK { - logger.AppLogger().Infof("transId:%v, Failed to route. httpRsp.StatusCode:%v", si.TransId, httpRsp.StatusCode) - UpdateStatus(StatusAbort, fmt.Sprintf("url:%v, StatusCode:%v", url, httpRsp.StatusCode)) - } else { - UpdateStatus(StatusOK, "OK") - } + logger.AppLogger().Infof("transId:%v,emigrate, rsp:%+v", si.TransId, resp) return } diff --git a/biz/service/switch-platform/imigrate.go b/biz/service/switch-platform/imigrate.go index 901b60e..409678b 100644 --- a/biz/service/switch-platform/imigrate.go +++ b/biz/service/switch-platform/imigrate.go @@ -18,20 +18,15 @@ * @Last Modified by: zhongguang * @Last Modified time: 2022-11-16 10:39:30 */ - package switchplatform import ( "agent/biz/model/device" "agent/biz/service/pair" - "agent/config" - "agent/utils" - "fmt" - "net/http" - "strings" - "agent/utils/logger" - utilshttp "agent/utils/network/http" + "fmt" + "github.com/big-dust/platform-sdk-go/v2" + "github.com/jinzhu/copier" ) type ImigrateRsp struct { @@ -48,36 +43,37 @@ func (r *ImigrateRsp) GetAdminDomain() (string, error) { return "", fmt.Errorf("not found admin") } -func imigrate() (*ImigrateRsp, error) { +func imigrate() (*platform.SpacePlatformMigrationResponse, error) { var mi MigrateInfo mi.NetworkClinetId = device.GetDeviceInfo().NetworkClient.ClientID mi.UserInfos = si.OldAccount - url, _ := utils.JoinUrl(si.NewApiBaseUrl, strings.ReplaceAll(config.Config.Platform.Migration.Path, "{box_uuid}", device.GetDeviceInfo().BoxUuid)) - destBRK, err := pair.GetDeviceRegKey(si.NewApiBaseUrl) + client, err := pair.GetSdkClientWithDeviceRegKey(si.NewApiBaseUrl) if err != nil { + logger.AppLogger().Warnf("Failed new SDK Client: err: %v", err.Error()) return nil, err } - headers := map[string]string{"Box-Reg-Key": destBRK.BoxRegKey, "Request-Id": si.TransId} - rsp := ImigrateRsp{} + input := &platform.SpacePlatformMigrationRequest{ + NetworkClientId: mi.NetworkClinetId, + UserInfos: []platform.UserMigrationInfo{}, + } - httpReq, httpRsp, body, err1 := utilshttp.PostJsonWithHeaders(url, mi, headers, &rsp) - if err1 != nil { - logger.AppLogger().Warnf("Failed PostJson, transId:%v, err:%v, @@httpReq:%+v, @@httpRsp:%+v, @@body:%v", si.TransId, err1, httpReq, httpRsp, string(body)) - return nil, err1 + err = copier.Copy(&input.UserInfos, &mi.UserInfos) + if err != nil { + logger.AppLogger().Warnf("Copy UserInfos: err: %v", err.Error()) + return nil, err } - logger.AppLogger().Infof("transId:%v, imigrate, parms:%+v", si.TransId, mi) - logger.AppLogger().Infof("transId:%v, imigrate, rsp:%+v", si.TransId, rsp) - logger.AppLogger().Infof("transId:%v, imigrate, httpReq:%+v", si.TransId, httpReq) - logger.AppLogger().Infof("transId:%v, imigrate, httpRsp:%+v", si.TransId, httpRsp) - logger.AppLogger().Infof("transId:%v, imigrate, body:%v", si.TransId, string(body)) + resp, err := client.SpacePlatformMigration(input) - if httpRsp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("http code:%v", httpRsp.StatusCode) + if err != nil { + logger.AppLogger().Warnf("Imgrate By Sdk Failed: %v", err.Error()) + return nil, err } - return &rsp, nil + logger.AppLogger().Infof("transId:%v, imigrate, rsp:%+v", si.TransId, resp) + + return resp, nil } diff --git a/biz/service/switch-platform/switch_platform.go b/biz/service/switch-platform/switch_platform.go index 30d3976..e1544b2 100644 --- a/biz/service/switch-platform/switch_platform.go +++ b/biz/service/switch-platform/switch_platform.go @@ -22,6 +22,7 @@ import ( "agent/utils" "errors" "fmt" + "github.com/jinzhu/copier" "net" "strings" @@ -131,6 +132,7 @@ func doSwitch(transId string, domain string) (dto.BaseRspStr, error) { //执行迁入 imigrateRsp, err := imigrate() + logger.AppLogger().Debugf("imigrateRsp:%+v, ", imigrateRsp) if err != nil { var basersp dto.BaseRspStr basersp.Code = dto.AgentCodeSwitchImigrateErr @@ -138,7 +140,7 @@ func doSwitch(transId string, domain string) (dto.BaseRspStr, error) { UpdateStatus(StatusAbort, basersp.Message) return basersp, err } - si.ImigrateResult = *imigrateRsp + copier.Copy(&si.ImigrateResult, imigrateRsp) logger.AppLogger().Debugf("transId=%v, imigrateRsp:%+v, ", transId, imigrateRsp) @@ -159,7 +161,7 @@ func doSwitch(transId string, domain string) (dto.BaseRspStr, error) { transId) //进行测试 - if err := networkDetect(transId, domain, imigrateRsp); err != nil { + if err := networkDetect(transId, domain, &si.ImigrateResult); err != nil { logger.AppLogger().Debugf("transId=%v, testNetwork:%+v, ", transId, err) networkSwitchV2(false) diff --git a/go.mod b/go.mod index 5a3734a..87fb24c 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.20 require ( github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef + github.com/big-dust/platform-sdk-go v0.0.6 github.com/docker/docker v20.10.8+incompatible github.com/docker/go-connections v0.4.0 github.com/dungeonsnd/gocom v1.0.45 @@ -11,9 +12,10 @@ require ( github.com/gin-gonic/gin v1.7.2 github.com/go-redis/redis/v8 v8.11.5 github.com/golang-jwt/jwt/v5 v5.0.0 - github.com/google/uuid v1.2.0 + github.com/google/uuid v1.3.0 github.com/imdario/mergo v0.3.12 github.com/jinzhu/configor v1.2.1 + github.com/jinzhu/copier v0.4.0 github.com/mr-tron/base58 v1.2.0 github.com/nanobox-io/golang-scribble v0.0.0-20190309225732-aa3e7c118975 github.com/paypal/gatt v0.0.0-20151011220935-4ae819d591cf @@ -50,8 +52,9 @@ require ( github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/spec v0.20.6 // indirect github.com/go-openapi/swag v0.21.1 // indirect - github.com/go-playground/locales v0.13.0 // indirect - github.com/go-playground/universal-translator v0.17.0 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator v9.31.0+incompatible // indirect github.com/go-playground/validator/v10 v10.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.0 // indirect @@ -61,7 +64,7 @@ require ( github.com/jcelliott/lumber v0.0.0-20160324203708-dd349441af25 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.10 // indirect - github.com/leodido/go-urn v1.2.0 // indirect + github.com/leodido/go-urn v1.2.4 // indirect github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible // indirect github.com/lestrrat-go/strftime v1.0.5 // indirect github.com/magiconair/properties v1.8.0 // indirect @@ -77,7 +80,7 @@ require ( github.com/pelletier/go-toml v1.8.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.2.2 // indirect github.com/spf13/cast v1.3.0 // indirect github.com/spf13/jwalterweatherman v1.0.0 // indirect @@ -86,8 +89,8 @@ require ( go.uber.org/atomic v1.4.0 // indirect go.uber.org/multierr v1.1.0 // indirect golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect - golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/text v0.3.8 // indirect golang.org/x/tools v0.1.12 // indirect google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a // indirect google.golang.org/grpc v1.39.1 // indirect diff --git a/go.sum b/go.sum index 47e5958..88e7624 100644 --- a/go.sum +++ b/go.sum @@ -84,6 +84,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/big-dust/platform-sdk-go v0.0.6 h1:8zsGJ2oln0ECJufIZ+DshT1IgoLjgneOXgTvhzAkZDQ= +github.com/big-dust/platform-sdk-go v0.0.6/go.mod h1:a/9gUglixc3uCW7xFA6CbIDP53Efay4pFDKPFyaBtGk= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= @@ -325,10 +327,14 @@ github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrK github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +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/validator v9.31.0+incompatible h1:UA72EPEogEnq76ehGdEDp4Mit+3FDh548oRqwVgNsHA= +github.com/go-playground/validator v9.31.0+incompatible/go.mod h1:yrEkQXlcI+PugkyDjY2bRrL/UBU4f3rvrgkN3V8JEig= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= @@ -403,8 +409,9 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= @@ -445,6 +452,8 @@ github.com/jcelliott/lumber v0.0.0-20160324203708-dd349441af25 h1:EFT6MH3igZK/dI github.com/jcelliott/lumber v0.0.0-20160324203708-dd349441af25/go.mod h1:sWkGw/wsaHtRsT9zGQ/WyJCotGWG/Anow/9hsAcBWRw= github.com/jinzhu/configor v1.2.1 h1:OKk9dsR8i6HPOCZR8BcMtcEImAFjIhbJFZNyn5GCZko= github.com/jinzhu/configor v1.2.1/go.mod h1:nX89/MOmDba7ZX7GCyU/VIaQ2Ar2aizBl2d3JLF/rDc= +github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8= +github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -480,8 +489,9 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible h1:Y6sqxHMyB1D2YSzWkLibYKgg+SwmyFU9dF2hn6MdTj4= @@ -656,8 +666,9 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -690,13 +701,19 @@ github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +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/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14/go.mod h1:gxQT6pBGRuIGunNf/+tSOB5OHvguWi8Tbt82WOkf35E= github.com/swaggo/gin-swagger v1.3.0 h1:eOmp7r57oUgZPw2dJOjcGNMse9cvXcI4tTqBcnZtPsI= github.com/swaggo/gin-swagger v1.3.0/go.mod h1:oy1BRA6WvgtCp848lhxce7BnWH4C8Bxa0m5SkWx+cS0= @@ -930,8 +947,9 @@ golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -939,8 +957,8 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1077,6 +1095,7 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=