pushapi

package
v0.0.0-...-9835270 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: AGPL-3.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabase

func NewDatabase(driver, createAddr, address, underlying, topic string, useAsync bool) (interface{}, error)

Types

type DataBase

type DataBase struct {
	AsyncSave bool
	// contains filtered or unexported fields
}

func (*DataBase) AddPushRule

func (d *DataBase) AddPushRule(
	ctx context.Context, userID, ruleID string, priorityClass, priority int, conditions, actions []byte,
) error

func (*DataBase) AddPushRuleEnable

func (d *DataBase) AddPushRuleEnable(
	ctx context.Context, userID, ruleID string, enable int,
) error

func (*DataBase) AddPusher

func (d *DataBase) AddPusher(
	ctx context.Context, userID, profileTag, kind, appID, appDisplayName, deviceDisplayName, pushKey, lang string, data []byte, deviceID string,
) error

func (*DataBase) DeletePushRule

func (d *DataBase) DeletePushRule(
	ctx context.Context, userID, ruleID string,
) error

func (*DataBase) DeletePushersByKey

func (d *DataBase) DeletePushersByKey(
	ctx context.Context, appID, pushKey string,
) error

func (*DataBase) DeletePushersByKeyOnly

func (d *DataBase) DeletePushersByKeyOnly(
	ctx context.Context, pushKey string,
) error

func (*DataBase) DeleteUserPushers

func (d *DataBase) DeleteUserPushers(
	ctx context.Context, userID, appID, pushKey string,
) error

func (*DataBase) GetPushRulesEnableTotal

func (d *DataBase) GetPushRulesEnableTotal(
	ctx context.Context,
) (int, error)

func (*DataBase) GetPushRulesTotal

func (d *DataBase) GetPushRulesTotal(
	ctx context.Context,
) (int, error)

func (*DataBase) OnAddPushRule

func (d *DataBase) OnAddPushRule(
	ctx context.Context, userID, ruleID string, priorityClass, priority int, conditions, actions []byte,
) error

func (*DataBase) OnAddPushRuleEnable

func (d *DataBase) OnAddPushRuleEnable(
	ctx context.Context, userID, ruleID string, enable int,
) error

func (*DataBase) OnAddPusher

func (d *DataBase) OnAddPusher(
	ctx context.Context, userID, profileTag, kind, appID, appDisplayName, deviceDisplayName, pushKey, lang string, data []byte, deviceID string,
) error

func (*DataBase) OnDeletePushRule

func (d *DataBase) OnDeletePushRule(
	ctx context.Context, userID, ruleID string,
) error

func (*DataBase) OnDeletePushersByKey

func (d *DataBase) OnDeletePushersByKey(
	ctx context.Context, appID, pushKey string,
) error

func (*DataBase) OnDeletePushersByKeyOnly

func (d *DataBase) OnDeletePushersByKeyOnly(
	ctx context.Context, pushKey string,
) error

func (*DataBase) OnDeleteUserPushers

func (d *DataBase) OnDeleteUserPushers(
	ctx context.Context, userID, appID, pushKey string,
) error

func (*DataBase) RecoverCache

func (d *DataBase) RecoverCache()

func (*DataBase) SetGauge

func (d *DataBase) SetGauge(qryDBGauge mon.LabeledGauge)

func (*DataBase) WriteDBEvent

func (d *DataBase) WriteDBEvent(ctx context.Context, update *dbtypes.DBEvent) error

WriteOutputEvents implements OutputRoomEventWriter

func (*DataBase) WriteDBEventWithTbl

func (d *DataBase) WriteDBEventWithTbl(ctx context.Context, update *dbtypes.DBEvent, tbl string) error

Jump to

Keyboard shortcuts

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