Documentation ¶
Index ¶
- Constants
- func AddUsersToTopic(topic_name string, userid_list models.UserIDList) error
- func CreateTopic(name string) error
- func DeleteTopic(name string) error
- func GenerateNotificationJson(notification models.Notification) (*string, error)
- func GetAllDevices() (*[]models.Device, error)
- func GetAllNotifications() (*models.NotificationList, error)
- func GetAllTopics() (*models.TopicList, error)
- func GetNotificationsForTopic(topic_name string) (*models.NotificationList, error)
- func GetTopicInfo(name string) (*models.Topic, error)
- func PublishNotification(topic_name string, notification models.Notification) (*models.PastNotification, error)
- func RegisterDeviceToUser(user_id string, device_reg models.DeviceRegistration) error
- func RemoveUsersFromTopic(topic_name string, userid_list models.UserIDList) error
- func SubscribeDeviceToTopic(topic models.Topic, device models.Device) error
- func UnsubscribeDeviceFromTopic(topic models.Topic, device models.Device) error
Constants ¶
View Source
const APPLICATION_PROTOCOL = "application"
View Source
const MESSAGE_STRUCTURE = "json"
Variables ¶
This section is empty.
Functions ¶
func AddUsersToTopic ¶
func AddUsersToTopic(topic_name string, userid_list models.UserIDList) error
Adds the given userids to the specified topic
func GenerateNotificationJson ¶
func GenerateNotificationJson(notification models.Notification) (*string, error)
func GetAllDevices ¶
Returns a list of registered devices
func GetAllNotifications ¶
func GetAllNotifications() (*models.NotificationList, error)
Returns a list of available SNS Topics
func GetAllTopics ¶
Returns a list of available SNS Topics
func GetNotificationsForTopic ¶
func GetNotificationsForTopic(topic_name string) (*models.NotificationList, error)
func PublishNotification ¶
func PublishNotification(topic_name string, notification models.Notification) (*models.PastNotification, error)
Dispatches a notification to a given SNS Topic
func RegisterDeviceToUser ¶
func RegisterDeviceToUser(user_id string, device_reg models.DeviceRegistration) error
Links the given device token with a user
func RemoveUsersFromTopic ¶
func RemoveUsersFromTopic(topic_name string, userid_list models.UserIDList) error
Removes the given userids from the specified topic
func SubscribeDeviceToTopic ¶
Subscribes a given Device to a Topic, in the database and SNS
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.