Skip to content

Commit

Permalink
update device-repository client
Browse files Browse the repository at this point in the history
  • Loading branch information
IngoRoessner committed Jan 7, 2025
1 parent 599bb0f commit 70f2110
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/SENERGY-Platform/connection-check-v2
go 1.23.0

require (
github.com/SENERGY-Platform/device-repository v0.1.51
github.com/SENERGY-Platform/device-repository v0.1.52
github.com/SENERGY-Platform/models/go v0.0.0-20241007061544-de7132ae94e4
github.com/SENERGY-Platform/mqtt-platform-connector v0.0.25
github.com/SENERGY-Platform/mqtt-platform-connector v0.0.26
github.com/eclipse/paho.mqtt.golang v1.4.3
github.com/google/uuid v1.6.0
github.com/patrickmn/go-cache v2.1.0+incompatible
Expand All @@ -22,7 +22,7 @@ require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/SENERGY-Platform/developer-notifications v0.0.4 // indirect
github.com/SENERGY-Platform/permissions-v2 v0.0.27 // indirect
github.com/SENERGY-Platform/platform-connector-lib v0.0.0-20241217090919-a19f7d7a5534 // indirect
github.com/SENERGY-Platform/platform-connector-lib v0.0.0-20250106140339-d65972e07eef // indirect
github.com/SENERGY-Platform/service-commons v0.0.0-20240813072046-91b3195dd8fc // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/SENERGY-Platform/developer-notifications v0.0.4 h1:SmblhfWavNhE1mDxzrkhmWl2AoPPqKD+7YcZCQ7a5Tg=
github.com/SENERGY-Platform/developer-notifications v0.0.4/go.mod h1:8yJrYnAYMtPEPy89ULw8ivgG8orVhSnaLgyfDt0bdgg=
github.com/SENERGY-Platform/device-repository v0.1.51 h1:vy+4gvK/mhgbmTl8gXKwPcQFMHMwycywCMhhr6TbAx0=
github.com/SENERGY-Platform/device-repository v0.1.51/go.mod h1:36pibGmG2igxgydf+deII/wiP1gWxF2/bgijDzwRriY=
github.com/SENERGY-Platform/device-repository v0.1.52 h1:JedGhrK3dm0x693jHAPgsn85iO9esjxJz9zgdyt/nis=
github.com/SENERGY-Platform/device-repository v0.1.52/go.mod h1:36pibGmG2igxgydf+deII/wiP1gWxF2/bgijDzwRriY=
github.com/SENERGY-Platform/models/go v0.0.0-20241007061544-de7132ae94e4 h1:zS65f1cmjAoBQUA432nmJl2TXAwqqqJMz7sp2DHLAGc=
github.com/SENERGY-Platform/models/go v0.0.0-20241007061544-de7132ae94e4/go.mod h1:bCREPNRN4P8oxLgpC3/ZKK4jXSy4MSPXoiomhohE+aw=
github.com/SENERGY-Platform/mqtt-platform-connector v0.0.25 h1:LZor0BUymrNIfDdvl0zuj1f13x6UJxcC5gUUr5Ha7Ok=
github.com/SENERGY-Platform/mqtt-platform-connector v0.0.25/go.mod h1:CxADhpUp14Ro8FatQWjX6ini4ApD+xvZzzJ3GGPKEVk=
github.com/SENERGY-Platform/mqtt-platform-connector v0.0.26 h1:GQHU6K8tnJo7o1vStZrN4T8Fey0JvmwQfIIGRh8SCJc=
github.com/SENERGY-Platform/mqtt-platform-connector v0.0.26/go.mod h1:bHJcTxxXIaNmuEqZdqNq0KPuJ5rBjDBF7Rck9ERwKaY=
github.com/SENERGY-Platform/permissions-v2 v0.0.27 h1:4Sf5zNW0KMrSSJrv90MmyKD5RMnS8CT26yE7W9Za/x0=
github.com/SENERGY-Platform/permissions-v2 v0.0.27/go.mod h1:w5AghpFIQ2Hi+HKfcuqXcizR4pCYuMLXcWAdAmOPAF4=
github.com/SENERGY-Platform/platform-connector-lib v0.0.0-20241217090919-a19f7d7a5534 h1:cQIvmNMI4sVS2RsS7098WGycvnE3V9yqVt0ja+W2AnQ=
github.com/SENERGY-Platform/platform-connector-lib v0.0.0-20241217090919-a19f7d7a5534/go.mod h1:nPH+9iAhb+yNaI7Q/EkKfDQcJ0lKiN3z+qBLv7w2YRw=
github.com/SENERGY-Platform/platform-connector-lib v0.0.0-20250106140339-d65972e07eef h1:bLBNfix4/IFMTkXTM5YgSpfl1MNS1DRjP3Pg0hCZpM0=
github.com/SENERGY-Platform/platform-connector-lib v0.0.0-20250106140339-d65972e07eef/go.mod h1:jh9Rli1jm99Ll3G9Hb2tfo41pXune5QVavmrw5Le9eU=
github.com/SENERGY-Platform/service-commons v0.0.0-20240813072046-91b3195dd8fc h1:FbGDfHiDukp8wD1w4YNxjwiDpSNkRUG+Ymq9jjz3Auc=
github.com/SENERGY-Platform/service-commons v0.0.0-20240813072046-91b3195dd8fc/go.mod h1:1p2CQPNtler5leXqNgaOfr7DlgZUydrQlQYA97ycm4k=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down
2 changes: 1 addition & 1 deletion pkg/pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func Start(ctx context.Context, wg *sync.WaitGroup, config configuration.Config)
}

if config.ExportTotalConnected {
repo := client.NewClient(config.DeviceRepositoryUrl)
repo := client.NewClient(config.DeviceRepositoryUrl, nil)
metrics.SetOnMetricsServeRequest(getOnMetricsServeRequestHandler(tokengen, repo, metrics))
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func NewDeviceProvider(config configuration.Config, tokengen TokenGenerator, dev
config: config,
tokengen: tokengen,
devicetypes: devicetypes,
client: client.NewClient(config.DeviceRepositoryUrl),
client: client.NewClient(config.DeviceRepositoryUrl, nil),
}
result.handledProtocols = map[string]bool{}
for _, protocolId := range config.HandledProtocols {
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/devicetypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewDeviceTypeProvider(config configuration.Config, tokengen TokenGenerator)
return nil, err
}
return &DeviceTypeProvider{
client: client.NewClient(config.DeviceRepositoryUrl),
client: client.NewClient(config.DeviceRepositoryUrl, nil),
tokengen: tokengen,
cache: NewCache(expiration),
}, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/hubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func NewHubProvider(config configuration.Config, tokengen TokenGenerator, device
tokengen: tokengen,
devicetypes: devicetypes,
cache: NewCache(expiration),
devicerepo: devicerepo.NewClient(config.DeviceRepositoryUrl),
devicerepo: devicerepo.NewClient(config.DeviceRepositoryUrl, nil),
}
result.handledProtocols = map[string]bool{}
for _, protocolId := range config.HandledProtocols {
Expand Down
2 changes: 1 addition & 1 deletion pkg/tests/mqttdeviceloop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func TestMqttDeviceLoop(t *testing.T) {
return
}

deviceRepo := client.NewClient(config.DeviceRepositoryUrl)
deviceRepo := client.NewClient(config.DeviceRepositoryUrl, nil)
senergyLikeDevices, _, err, _ := deviceRepo.ListExtendedDevices(TestToken, client.ExtendedDeviceListOptions{
DeviceTypeIds: []string{"urn:infai:ses:device-type:0"},
Limit: 200,
Expand Down
2 changes: 1 addition & 1 deletion pkg/tests/senergydeviceloop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func TestSenergyDeviceLoop(t *testing.T) {
return
}

deviceRepo := client.NewClient(config.DeviceRepositoryUrl)
deviceRepo := client.NewClient(config.DeviceRepositoryUrl, nil)
senergyLikeDevices, _, err, _ := deviceRepo.ListExtendedDevices(TestToken, client.ExtendedDeviceListOptions{
DeviceTypeIds: []string{"urn:infai:ses:device-type:0"},
Limit: 200,
Expand Down

0 comments on commit 70f2110

Please sign in to comment.