Versions in this module Expand all Collapse all v1 v1.0.0 May 28, 2024 Changes in this version + const SASTokenValidityFactor + var Now = time.Now + func CreateAzureHubConnection(settings *AzureSettings, connSettings *AzureConnectionSettings, ...) (*connector.MQTTConnection, error) + func ParseSASTokenValidity(sasTokenValidity string) (time.Duration, error) + type AzureConnectionSettings struct + DeviceCert string + DeviceKey string + SharedAccessKey []byte + TokenValidity time.Duration + func CreateAzureSASTokenConnectionSettings(connStringProperties map[string]string, settings *AzureSettings, ...) (*AzureConnectionSettings, error) + func PrepareAzureCertificateConnectionSettings(connStringProperties map[string]string, certFileReader io.Reader, ...) (*AzureConnectionSettings, error) + func PrepareAzureConnectionSettings(settings *AzureSettings, idScopeProvider IDScopeProvider, log logger.Logger) (*AzureConnectionSettings, error) + func PrepareAzureProvisioningConnectionSettings(settings *AzureSettings, idScopeProvider IDScopeProvider, ...) (*AzureConnectionSettings, error) + type AzureDeviceData struct + AssignedHub string + DeviceID string + type AzureDpsDeviceInfoResponse struct + OperationID string + RegistrationState AzureDpsRegistrationState + Status string + type AzureDpsRegisterDeviceRequest struct + RegistrationID string + type AzureDpsRegistrationState struct + AssignedHub string + CreatedDateTimeUtc string + DeviceID string + Etag string + LastUpdatedDateTimeUtc string + RegistrationID string + Status string + Substatus string + X509 interface{} + type AzureSettings struct + ConnectionString string + IDScope string + SASTokenValidity string + TenantID string + func DefaultSettings() *AzureSettings + func (settings *AzureSettings) Validate() error + type IDScopeProvider func(connSettings *AzureConnectionSettings) (string, error) + type ProvisioningHTTPClient interface + Do func(req *http.Request) (*http.Response, error) + Get func(url string) (*http.Response, error) + Post func(url string, contentType string, body io.Reader) (*http.Response, error) + func NewHTTPClient(client *http.Client) ProvisioningHTTPClient + type ProvisioningService interface + GetDeviceData func(idScope string, connSettings *AzureConnectionSettings) (*AzureDeviceData, error) + Init func(client ProvisioningHTTPClient, provisioningFile io.ReadWriter) + func NewProvisioningService(logger logger.Logger) ProvisioningService + type RemoteConnectionInfo struct + DeviceID string + HostName string + HubName string + type ResponseError struct + Detail string + Message string + type SharedAccessSignature struct + Se time.Time + Sig string + Sr string + func GenerateSASToken(connSettings *AzureConnectionSettings) *SharedAccessSignature