Versions in this module Expand all Collapse all v0 v0.2.0 Nov 29, 2026 v0.1.0 Nov 29, 2026 Changes in this version + const DeviceName + var ErrLoginRejected = errors.New("push: device login rejected") + func Link(ctx context.Context, d Device, authToken string, opts ...Option) error + func Listen(ctx context.Context, d Device, handle func(Notification), opts ...Option) error + type Alarm struct + EntityID uint64 + Message string + Title string + type App struct + APIKey string + AppID string + PackageCert string + PackageName string + ProjectID string + SenderID string + func RustPlusApp() App + type Device struct + ExpoPushToken string + FCM DeviceCredentials + func NewDevice(ctx context.Context, authToken string, opts ...Option) (Device, error) + func (d *Device) Complete(ctx context.Context, authToken string, opts ...Option) error + func (d Device) GoString() string + func (d Device) LogValue() slog.Value + func (d Device) Registered() bool + func (d Device) String() string + type DeviceCredentials struct + AndroidID uint64 + SecurityToken uint64 + Token string + func (d *DeviceCredentials) UnmarshalJSON(b []byte) error + func (d DeviceCredentials) GoString() string + func (d DeviceCredentials) LogValue() slog.Value + func (d DeviceCredentials) MarshalJSON() ([]byte, error) + func (d DeviceCredentials) String() string + type EntityPairing struct + EntityID uint64 + EntityName string + EntityType rustplus.EntityType + type Event interface + GameServer func() Server + type HTTPError struct + Body string + StatusCode int + URL string + func (e *HTTPError) Error() string + type Listener struct + func NewListener(d Device, opts ...Option) *Listener + func (l *Listener) PersistentIDs() []string + func (l *Listener) Run(ctx context.Context, handle func(Notification)) error + type Message struct + Category string + Data map[string]string + From string + ID string + PersistentID string + RawData []byte + Sent time.Time + type Notification struct + Body json.RawMessage + Channel string + Event Event + Message string + Raw Message + Received time.Time + Title string + func ParseMessage(m Message) (Notification, error) + type Option func(*options) + func WithApp(app App) Option + func WithDeviceName(name string) Option + func WithErrorHandler(fn func(Message, error)) Option + func WithHTTPClient(hc *http.Client) Option + func WithHeartbeat(d time.Duration) Option + func WithLogger(l *slog.Logger) Option + func WithPersistentIDs(ids []string) Option + type PlayerDeath struct + KillerID uint64 + KillerName string + Title string + type Server struct + Description string + ID string + IP string + Image string + Logo string + Name string + PlayerID uint64 + PlayerToken int32 + Port string + URL string + func (s Server) Config(authToken string) rustplus.Config + func (s Server) GameServer() Server + type ServerPairing struct + type TeamLogin struct + Message string + TeammateID uint64 + TeammateName string + Title string