Documentation ¶
Index ¶
- func ApnsCertificate(scheme string) (cert tls.Certificate, err error)
- func ApnsCertificatePassword(scheme string) (password string)
- func DeviceTokensForUser(userID uuid.UUID) (tokens []string, err error)
- func ItemsAdded(userID uuid.UUID, storeID interface{}, numItemsAdded int, appScheme string)
- func MealRemoved(meal models.Meal, appScheme string)
- func MealUpdated(meal models.Meal, origMealName string, appScheme string)
- func MealUserTokens(meal *models.Meal) (tokens []string, err error)
- func NewMeal(meal *models.Meal, appScheme string)
- func Send(title string, body string, token string, entityName string, entityID string, ...)
- func SetNotificationPayload(title string, body string, entityName string, entityID string) (p *payload.Payload)
- func SetNotificationTopic(scheme string) (topic string)
- func StoreDeviceToken(token string, userID uuid.UUID) (device *models.Device, err error)
- func StoreUserTokens(storeID uuid.UUID, userID uuid.UUID) (tokens []string, err error)
- func UserJoinedStore(user models.User, storeID interface{}, appScheme string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApnsCertificate ¶
func ApnsCertificate(scheme string) (cert tls.Certificate, err error)
ApnsCertificate handles finding the proper certificate depending on app scheme and envrionment
func ApnsCertificatePassword ¶
ApnsCertificatePassword determines the credential for the apns cert password depending on environment
func DeviceTokensForUser ¶
DeviceTokensForUser fetches all the device tokens stored for a user by ID
func ItemsAdded ¶
ItemsAdded sends a push notification to store users about a new item
func MealRemoved ¶
MealRemoved sends a push notification about a meal being removed from a meal plan
func MealUpdated ¶
MealUpdated sends a push notification about a meal being updated in a meal plan
func MealUserTokens ¶
MealUserTokens fetches apns device tokens for all meal users
func Send ¶
func Send(title string, body string, token string, entityName string, entityID string, scheme string)
Send sends a push notification
func SetNotificationPayload ¶
func SetNotificationPayload(title string, body string, entityName string, entityID string) (p *payload.Payload)
SetNotificationPayload sets the APNS payload for the
func SetNotificationTopic ¶
SetNotificationTopic determines the correct topic for the notification This should match the bundle ID depending on environment i.e. "bradpurchase.GroceryTime.beta"
func StoreDeviceToken ¶
StoreDeviceToken creates a Device record to store device tokens for iOS push notifications
func StoreUserTokens ¶
StoreUserTokens fetches apns device tokens for all store users associated with the item provided, excluding for those users who have disabled notifications in store user preference settings
func UserJoinedStore ¶
UserJoinedStore sends a push notification when a user joins a store via share code
Types ¶
This section is empty.