Skip to content

Commit

Permalink
Merge pull request #812 from hahattan/issue-592
Browse files Browse the repository at this point in the history
feat!: update ProtocolProperties to have typed values
  • Loading branch information
cloudxxx8 authored Mar 8, 2023
2 parents 429a9a0 + d9af69a commit b5d870f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dtos/protocolproperties.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (C) 2020 IOTech Ltd
// Copyright (C) 2020-2023 IOTech Ltd
//
// SPDX-License-Identifier: Apache-2.0

Expand All @@ -8,7 +8,7 @@ package dtos
import "github.com/edgexfoundry/go-mod-core-contracts/v3/models"

// ProtocolProperties contains the device connection information in key/value pair
type ProtocolProperties map[string]string
type ProtocolProperties map[string]any

// ToProtocolPropertiesModel transforms the ProtocolProperties DTO to the ProtocolProperties model
func ToProtocolPropertiesModel(p ProtocolProperties) models.ProtocolProperties {
Expand Down
2 changes: 1 addition & 1 deletion models/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Device struct {
}

// ProtocolProperties contains the device connection information in key/value pair
type ProtocolProperties map[string]string
type ProtocolProperties map[string]any

// AdminState controls the range of values which constitute valid administrative states for a device
type AdminState string
Expand Down

0 comments on commit b5d870f

Please sign in to comment.