-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.go
26 lines (21 loc) · 1.18 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Package notificationhubs provides a module for Microsoft Azure Notification Hubs.
package notificationhubs
import "time"
// NewNotificationHub initializes and returns NotificationHub pointer
func NewNotificationHub(connectionString, hubPath string) *NotificationHub {
return newNotificationHub(connectionString, hubPath)
}
// NewNotification initializes and returns Notification pointer
func NewNotification(format NotificationFormat, payload []byte) (*Notification, error) {
return newNotification(format, payload)
}
// NewRegistration initializes and returns a Notification pointer
func NewRegistration(deviceID string, expirationTime *time.Time, notificationFormat NotificationFormat,
registrationID string, tags string) *Registration {
return newRegistration(deviceID, expirationTime, notificationFormat, registrationID, tags)
}
// NewTemplateRegistration initializes and returns a TemplateNotification pointer
func NewTemplateRegistration(deviceID string, expirationTime *time.Time, registrationID string, tags string,
platform TargetPlatform, template string) *TemplateRegistration {
return newTemplateRegistration(deviceID, expirationTime, registrationID, tags, platform, template)
}