auth

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2023 License: Apache-2.0, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication interface {
	// Init applies the initial configuration.
	Init(*mqtt.ClientOptions) error

	// GetGatewayID returns the GatewayID if available.
	GetGatewayID() *lorawan.EUI64

	// Update updates the authentication options.
	Update(*mqtt.ClientOptions) error

	// ReconnectAfter returns a time.Duration after which the MQTT client must re-connect.
	// Note: return 0 to disable the periodical re-connect feature.
	ReconnectAfter() time.Duration
}

Authentication defines the authentication interface.

func NewAzureIoTHubAuthentication

func NewAzureIoTHubAuthentication(c config.Config) (Authentication, error)

NewAzureIoTHubAuthentication creates an AzureIoTHubAuthentication.

func NewGCPCloudIoTCoreAuthentication

func NewGCPCloudIoTCoreAuthentication(conf config.Config) (Authentication, error)

NewGCPCloudIoTCoreAuthentication create a GCPCloudIoTCoreAuthentication.

func NewGenericAuthentication

func NewGenericAuthentication(conf config.Config) (Authentication, error)

NewGenericAuthentication creates a GenericAuthentication.

type AzureIoTHubAuthentication

type AzureIoTHubAuthentication struct {
	// contains filtered or unexported fields
}

AzureIoTHubAuthentication implements the Azure IoT Hub authentication.

func (*AzureIoTHubAuthentication) GetGatewayID

func (a *AzureIoTHubAuthentication) GetGatewayID() *lorawan.EUI64

GetGatewayID returns the GatewayID if available. TODO: implement.

func (*AzureIoTHubAuthentication) Init

Init applies the initial configuration.

func (*AzureIoTHubAuthentication) ReconnectAfter

func (a *AzureIoTHubAuthentication) ReconnectAfter() time.Duration

ReconnectAfter returns a time.Duration after which the MQTT client must re-connect. Note: return 0 to disable the periodical re-connect feature.

func (*AzureIoTHubAuthentication) Update

Update updates the authentication options.

type GCPCloudIoTCoreAuthentication

type GCPCloudIoTCoreAuthentication struct {
	// contains filtered or unexported fields
}

GCPCloudIoTCoreAuthentication implements the Google Cloud IoT Core authentication.

func (*GCPCloudIoTCoreAuthentication) GetGatewayID

func (a *GCPCloudIoTCoreAuthentication) GetGatewayID() *lorawan.EUI64

GetGatewayID returns the GatewayID if available. TODO: implement.

func (*GCPCloudIoTCoreAuthentication) Init

Init applies the initial configuration.

func (*GCPCloudIoTCoreAuthentication) ReconnectAfter

func (a *GCPCloudIoTCoreAuthentication) ReconnectAfter() time.Duration

ReconnectAfter returns a time.Duration after which the MQTT.Auth.client must re-connect. Note: return 0 to disable the periodical re-connect feature.

func (*GCPCloudIoTCoreAuthentication) Update

Update updates the authentication options.

type GenericAuthentication

type GenericAuthentication struct {
	// contains filtered or unexported fields
}

GenericAuthentication implements a generic MQTT authentication.

func (*GenericAuthentication) GetGatewayID

func (a *GenericAuthentication) GetGatewayID() *lorawan.EUI64

GetGatewayID returns the GatewayID if available.

func (*GenericAuthentication) Init

Init applies the initial configuration.

func (*GenericAuthentication) ReconnectAfter

func (a *GenericAuthentication) ReconnectAfter() time.Duration

ReconnectAfter returns a time.Duration after which the MQTT client must re-connect. Note: return 0 to disable the periodical re-connect feature.

func (*GenericAuthentication) Update

func (a *GenericAuthentication) Update(opts *mqtt.ClientOptions) error

Update updates the authentication options.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL