apns

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: AGPL-3.0 Imports: 9 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 {
	AuthKeyPath string
	KeyID       string
	TeamID      string
	BundleID    string
	Production  bool
}

Config holds APNs configuration.

type Sender

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

Sender sends push notifications to iOS devices via APNs.

func NewSender

func NewSender(cfg *Config, tracerProvider tracing.TracerProvider, logger logging.Logger) (*Sender, error)

NewSender creates an APNs sender from config.

func (*Sender) Send

func (s *Sender) Send(ctx context.Context, deviceToken, title, body string, badgeCount *int) error

Send sends a push notification to a single device token. The device token must be a 64-character hex string (APNs format). badgeCount is optional; when non-nil, sets aps.badge on the app icon.

Jump to

Keyboard shortcuts

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