postgresql

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DSN string `json:"dsn"`
}

Config holds the PostgreSQL integration configuration.

type Integration

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

Integration implements a PostgreSQL integration.

func New

func New(conf Config) (*Integration, error)

New creates a new PostgreSQL integration.

func (*Integration) Close

func (i *Integration) Close() error

Close closes the integration.

func (*Integration) DataDownChan

func (i *Integration) DataDownChan() chan integration.DataDownPayload

DataDownChan return nil.

func (*Integration) SendACKNotification

func (i *Integration) SendACKNotification(ctx context.Context, pl integration.ACKNotification) error

SendACKNotification stores the ACK in the device_ack table.

func (*Integration) SendDataUp

func (i *Integration) SendDataUp(ctx context.Context, pl integration.DataUpPayload) error

SendDataUp stores the uplink data into the device_up table.

func (*Integration) SendErrorNotification

func (i *Integration) SendErrorNotification(ctx context.Context, pl integration.ErrorNotification) error

SendErrorNotification stores the error in the device_error table.

func (*Integration) SendJoinNotification

func (i *Integration) SendJoinNotification(ctx context.Context, pl integration.JoinNotification) error

SendJoinNotification stores the join in the device_join table.

func (*Integration) SendLocationNotification

func (i *Integration) SendLocationNotification(ctx context.Context, pl integration.LocationNotification) error

SendLocationNotification stores the location in the device_location table.

func (*Integration) SendStatusNotification

func (i *Integration) SendStatusNotification(ctx context.Context, pl integration.StatusNotification) error

SendStatusNotification stores the device-status in the device_status table.

Jump to

Keyboard shortcuts

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