Skip to content

Commit

Permalink
fix: change package import, pass logger to sdk client
Browse files Browse the repository at this point in the history
Signed-off-by: yang <[email protected]>
  • Loading branch information
big-dust committed Nov 19, 2023
1 parent cfa1a6a commit 4285398
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion biz/service/pair/register_box.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"agent/config"
"agent/utils/logger"
"fmt"
"github.com/big-dust/platform-sdk-go/v2"
"github.com/ao-space/platform-sdk-go/v2"
"github.com/dungeonsnd/gocom/encrypt/encoding"
"time"
)
Expand Down Expand Up @@ -86,6 +86,7 @@ func GetSdkClientWithDeviceRegKey(apiBaseUrl string) (*platform.Client, error) {
if err != nil {
logger.AppLogger().Errorf("%+v", err)
}
client.SetZapLogger(logger.AppLogger())

type authStruct struct {
BoxUUID string `json:"boxUUID"`
Expand Down
2 changes: 1 addition & 1 deletion biz/service/platform/ability.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"agent/biz/model/device"
"agent/biz/service/pair"
"agent/utils/logger"
"github.com/big-dust/platform-sdk-go/v2"
"github.com/ao-space/platform-sdk-go/v2"
)

var platformApis *platform.GetAbilityResponse
Expand Down
2 changes: 1 addition & 1 deletion biz/service/switch-platform/emigrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package switchplatform
import (
"agent/biz/service/pair"
"agent/utils/logger"
"github.com/big-dust/platform-sdk-go/v2"
"github.com/ao-space/platform-sdk-go/v2"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion biz/service/switch-platform/imigrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"agent/biz/service/pair"
"agent/utils/logger"
"fmt"
"github.com/big-dust/platform-sdk-go/v2"
"github.com/ao-space/platform-sdk-go/v2"
"github.com/jinzhu/copier"
)

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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
Expand All @@ -29,7 +28,7 @@ require (
github.com/swaggo/gin-swagger v1.3.0
github.com/swaggo/swag v1.8.4
github.com/syndtr/goleveldb v1.0.0
go.uber.org/zap v1.10.0
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/resty.v1 v1.12.0
Expand All @@ -41,6 +40,7 @@ require (
github.com/BurntSushi/toml v1.1.0 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/Microsoft/go-winio v0.4.17 // indirect
github.com/ao-space/platform-sdk-go v0.0.0-20231119023920-468c12c2b776 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/containerd/containerd v1.5.5 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
Expand Down Expand Up @@ -87,7 +87,7 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/ugorji/go/codec v1.1.13 // indirect
go.uber.org/atomic v1.4.0 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.3.8 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0=
github.com/anthonynsimon/bild v0.11.1/go.mod h1:tpzzp0aYkAsMi1zmfhimaDyX1xjn2OUc1AJZK/TF0AE=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/ao-space/platform-sdk-go v0.0.0-20231119023920-468c12c2b776 h1:Lml9ZcHnn3cHVCKWcSKIBvBce8VPmhiOdav7xMCiXG8=
github.com/ao-space/platform-sdk-go v0.0.0-20231119023920-468c12c2b776/go.mod h1:gyPCQNJV3FvRPL39dGzfRX1B5ZVcg5Uq+Ls9spOtk+k=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP9/R33ZaagQtAM4EkkSYnIAlOG5EI8gkM=
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII=
Expand Down Expand Up @@ -779,8 +781,10 @@ go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so=
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
Expand Down

0 comments on commit 4285398

Please sign in to comment.