Skip to content

Commit

Permalink
Internals: bump astarte-go
Browse files Browse the repository at this point in the history
Use the new astarte-go API.
See astarte-platform/astarte-go#30.

Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
  • Loading branch information
Annopaolo committed Mar 7, 2023
1 parent 572c1c9 commit 8bf65a6
Show file tree
Hide file tree
Showing 21 changed files with 657 additions and 219 deletions.
6 changes: 2 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- `cluster instance deploy`: Astarte >= `v1.0.0` is deployed using the
`api.astarte-platform.org/v1alpha2` API.
- Require at least Go 1.18 (due to astarte-go dep).
- Use Go 1.18 for releases.

### Fixed
- `appengine devices send-data` correctly parses integers as int32 instead of in64.
Fix [#176](https://github.com/astarte-platform/astartectl/issues/176).

### Changed
- Require at least Go 1.18 (due to astarte-go dep).
- Use Go 1.18 for releases.

## [22.11.00] - 2022-12-06
### Added
- `cluster instances migrate storage-version` allows to migrate CRDs with `[v1alpha1, v1alpha2]`
Expand Down
11 changes: 6 additions & 5 deletions cmd/appengine/appengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import (
"errors"
"fmt"

"github.com/astarte-platform/astarte-go/astarteservices"
"github.com/astarte-platform/astarte-go/client"
"github.com/astarte-platform/astarte-go/misc"
"github.com/astarte-platform/astarte-go/deviceid"
"github.com/astarte-platform/astartectl/utils"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -59,9 +60,9 @@ func appEnginePersistentPreRunE(cmd *cobra.Command, args []string) error {
return errors.New("Either astarte-url or appengine-url have to be specified")
}

individualURLVariables := map[misc.AstarteService]string{
misc.AppEngine: "individual-urls.appengine",
misc.RealmManagement: "individual-urls.realm-management",
individualURLVariables := map[astarteservices.AstarteService]string{
astarteservices.AppEngine: "individual-urls.appengine",
astarteservices.RealmManagement: "individual-urls.realm-management",
}

viper.BindPFlag("realm.key-file", cmd.Flags().Lookup("realm-key"))
Expand All @@ -85,7 +86,7 @@ func deviceIdentifierTypeFromFlags(deviceIdentifier string, forceDeviceIdentifie
case "":
return client.AutodiscoverDeviceIdentifier, nil
case "device-id":
if !misc.IsValidAstarteDeviceID(deviceIdentifier) {
if !deviceid.IsValid(deviceIdentifier) {
return 0, fmt.Errorf("Required to evaluate the Device Identifier as an Astarte Device ID, but %v isn't a valid one", deviceIdentifier)
}
return client.AstarteDeviceID, nil
Expand Down
Loading

0 comments on commit 8bf65a6

Please sign in to comment.