push

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	// IsValidPushToken validates whether a push token is valid
	IsValidPushToken(ctx context.Context, pushToken string) (bool, error)

	// SendPush sends a basic push notication with a title and body
	SendPush(ctx context.Context, pushToken, title, body string) error

	// SendLocalizedAPNSPush sends a localized APNS push
	SendLocalizedAPNSPush(ctx context.Context, pushToken, titleKey, bodyKey string, bodyArgs ...string) error

	// SendLocalizedAndroidPush sends a localized Android push
	SendLocalizedAndroidPush(ctx context.Context, pushToken, titleKey, bodyKey string, bodyArgs ...string) error

	// SendDataPush sends a data push
	SendDataPush(ctx context.Context, pushToken string, kvs map[string]string) error

	// SetAPNSBadgeCount sets the badge count on the iOS app icon
	SetAPNSBadgeCount(ctx context.Context, pushToken string, count int) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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