Documentation ¶
Index ¶
- func MigrateDown(db *sqlx.DB) error
- func MigrateUp(db *sqlx.DB) error
- type Integration
- func (i *Integration) Close() error
- func (i *Integration) DataDownChan() chan models.DataDownPayload
- func (i *Integration) HandleAckEvent(ctx context.Context, _ models.Integration, vars map[string]string, ...) error
- func (i *Integration) HandleErrorEvent(ctx context.Context, _ models.Integration, vars map[string]string, ...) error
- func (i *Integration) HandleIntegrationEvent(ctx context.Context, _ models.Integration, vars map[string]string, ...) error
- func (i *Integration) HandleJoinEvent(ctx context.Context, _ models.Integration, vars map[string]string, ...) error
- func (i *Integration) HandleLocationEvent(ctx context.Context, _ models.Integration, vars map[string]string, ...) error
- func (i *Integration) HandleStatusEvent(ctx context.Context, _ models.Integration, vars map[string]string, ...) error
- func (i *Integration) HandleTxAckEvent(ctx context.Context, _ models.Integration, vars map[string]string, ...) error
- func (i *Integration) HandleUplinkEvent(ctx context.Context, _ models.Integration, vars map[string]string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateDown ¶
MigrateDown configure postgres-integration migration down
Types ¶
type Integration ¶
type Integration struct {
// contains filtered or unexported fields
}
Integration implements a PostgreSQL integration.
func New ¶
func New(m marshaler.Type, conf config.IntegrationPostgreSQLConfig) (*Integration, error)
New creates a new PostgreSQL integration.
func (*Integration) DataDownChan ¶
func (i *Integration) DataDownChan() chan models.DataDownPayload
DataDownChan return nil.
func (*Integration) HandleAckEvent ¶
func (i *Integration) HandleAckEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.AckEvent) error
HandleAckEvent writes an AckEvent into the database.
func (*Integration) HandleErrorEvent ¶
func (i *Integration) HandleErrorEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.ErrorEvent) error
HandleErrorEvent writes an ErrorEvent into the database.
func (*Integration) HandleIntegrationEvent ¶
func (i *Integration) HandleIntegrationEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.IntegrationEvent) error
HandleIntegrationEvent is not implemented. TODO: implement this + schema migrations for the PostgreSQL database!
func (*Integration) HandleJoinEvent ¶
func (i *Integration) HandleJoinEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.JoinEvent) error
HandleJoinEvent writes a JoinEvent into the database.
func (*Integration) HandleLocationEvent ¶
func (i *Integration) HandleLocationEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.LocationEvent) error
HandleLocationEvent writes a LocationEvent into the database.
func (*Integration) HandleStatusEvent ¶
func (i *Integration) HandleStatusEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.StatusEvent) error
HandleStatusEvent writes a StatusEvent into the database.
func (*Integration) HandleTxAckEvent ¶
func (i *Integration) HandleTxAckEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.TxAckEvent) error
HandleTxAckEvent writes TX events into postgres database.
func (*Integration) HandleUplinkEvent ¶
func (i *Integration) HandleUplinkEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.UplinkEvent) error
HandleUplinkEvent writes an UplinkEvent into the database.