Versions in this module Expand all Collapse all v0 v0.1.0 Aug 13, 2026 Changes in this version + const LATopicSuffix + var ErrTokenUnregistered = fmt.Errorf("apns: push token no longer valid") + func LoadPrivateKey(path string) (*ecdsa.PrivateKey, error) + type Alert struct + Body string + Silent bool + Sound string + Title string + type Client struct + func NewClient(key *ecdsa.PrivateKey, keyID, teamID, bundleID string, env Env) *Client + func (c *Client) SendAlert(ctx context.Context, deviceToken, deepLink string, a Alert, opts SendOpts) error + func (c *Client) SendLiveActivity(ctx context.Context, laToken string, u LiveActivityUpdate) error + func (c *Client) SendRaw(ctx context.Context, pushType, topic, token string, payload map[string]any, ...) error + type Device struct + E2EPubKey []byte + InstallationID string + KeyID string + LAToken string + LastSeen int64 + type DeviceEntry struct + E2EPubKey []byte + InstallationID string + KeyID string + LAToken string + LastSeen int64 + Token string + type Env string + const EnvDevelopment + const EnvProduction + type LiveActivityEvent string + const LAEnd + const LAUpdate + type LiveActivityUpdate struct + ContentState json.RawMessage + DismissalDate int64 + Event LiveActivityEvent + StaleDate int64 + Timestamp int64 + type SendOpts struct + CollapseID string + Expiration int64 + Priority int + type Settings struct + CooldownSeconds int + NotifyErrored bool + NotifyTurnDone bool + NotifyWaiting bool + VibrationEnabled bool + func DefaultSettings() Settings + type Signer struct + func NewSigner(key *ecdsa.PrivateKey, keyID, teamID string) *Signer + func (s *Signer) Token() (string, error) + type Store struct + func NewStore(dir string) *Store + func (s *Store) Configured() bool + func (s *Store) Devices() []DeviceEntry + func (s *Store) DropDevice(token string) error + func (s *Store) DropLAToken(deviceToken string) error + func (s *Store) KeyInfo() (keyID, teamID, bundleID string, env Env, ok bool) + func (s *Store) KeyPath() string + func (s *Store) RegisterDevice(token string) error + func (s *Store) SaveSettings(in Settings) error + func (s *Store) SetDeviceInstallation(deviceToken, installationID string, e2ePubKey []byte, keyID string) error + func (s *Store) SetKey(keyBytes []byte, keyID, teamID, bundleID string, env Env) error + func (s *Store) SetLAToken(deviceToken, laToken string) error + func (s *Store) Settings() Settings