Skip to content

Commit

Permalink
Add IoT Hub System Properties (#161)
Browse files Browse the repository at this point in the history
* Add IoT Hub System Properties

* update CHANGELOG and version

Co-authored-by: Joel Hendrix <jhendrix@microsoft.com>
  • Loading branch information
fischor and jhendrixMSFT committed Feb 18, 2020
1 parent e1a6129 commit bc2987d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## `v3.2.0`
- add IoT Hub system properties

## `v3.1.2`
- fix errors in message handling being ignored [#155](https://github.com/Azure/azure-event-hubs-go/issues/155)

Expand Down
12 changes: 11 additions & 1 deletion event.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"strings"
"time"

"github.com/mitchellh/mapstructure"
"github.com/Azure/go-amqp"
"github.com/mitchellh/mapstructure"

"github.com/Azure/azure-event-hubs-go/v3/persist"
)
Expand Down Expand Up @@ -59,6 +59,16 @@ type (
Offset *int64 `mapstructure:"x-opt-offset"`
PartitionID *int16 `mapstructure:"x-opt-partition-id"` // This value will always be nil. For information related to the event's partition refer to the PartitionKey field in this type
PartitionKey *string `mapstructure:"x-opt-partition-key"`
// Nil for messages other than from Azure IoT Hub. deviceId of the device that sent the message.
IoTHubDeviceConnectionID *string `mapstructure:"iothub-connection-device-id"`
// Nil for messages other than from Azure IoT Hub. Used to distinguish devices with the same deviceId, when they have been deleted and re-created.
IoTHubAuthGenerationID *string `mapstructure:"iothub-connection-auth-generation-id"`
// Nil for messages other than from Azure IoT Hub. Contains information about the authentication method used to authenticate the device sending the message.
IoTHubConnectionAuthMethod *string `mapstructure:"iothub-connection-auth-method"`
// Nil for messages other than from Azure IoT Hub. moduleId of the device that sent the message.
IoTHubConnectionModuleID *string `mapstructure:"iothub-connection-module-id"`
// Nil for messages other than from Azure IoT Hub. The time the Device-to-Cloud message was received by IoT Hub.
IoTHubEnqueuedTime *time.Time `mapstructure:"iothub-enqueuedtime"`
}

mapStructureTag struct {
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package eventhub

const (
// Version is the semantic version number
Version = "3.1.2"
Version = "3.2.0"
)

0 comments on commit bc2987d

Please sign in to comment.