Documentation ¶
Index ¶
Constants ¶
View Source
const ( ApnsTransportType transportType = "apns" FcmTransportType transportType = "fcm" )
Variables ¶
This section is empty.
Functions ¶
func SendPushNotification ¶
func SendPushNotification(ctx context.Context, config config.AblyConfig, device *model.UserDevice, pushBody PushNotificationBody) (bool, error)
Types ¶
type AndroidPushNotification ¶
type AndroidPushNotification struct { Recipient FcmPushNotificationRecipient `json:"recipient"` Notification PushNotificationBody `json:"notification"` }
type ApnsPushNotificationRecipient ¶
type ApnsPushNotificationRecipient struct { TransportType transportType `json:"transportType"` DeviceToken string `json:"deviceToken"` }
type ApplePushNotification ¶
type ApplePushNotification struct { Recipient ApnsPushNotificationRecipient `json:"recipient"` Notification PushNotificationBody `json:"notification"` }
type FcmPushNotificationRecipient ¶
type FcmPushNotificationRecipient struct { TransportType transportType `json:"transportType"` RegistrationToken string `json:"registrationToken"` }
type PushNotificationBody ¶
func BuildPushNotification ¶
func BuildPushNotification(ctx context.Context, discussion model.Discussion, post model.Post, contentPreview *string) (*PushNotificationBody, error)
Click to show internal directories.
Click to hide internal directories.