Documentation ¶
Overview ¶
Package notihub represents an http client for microsoft azure notification hub
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification struct { Format NotificationFormat Payload []byte }
func NewNotification ¶
func NewNotification(format NotificationFormat, payload []byte) (*Notification, error)
NewNotification initalizes and returns Notification pointer
func (*Notification) String ¶
func (n *Notification) String() string
String returns Notification string representation
type NotificationFormat ¶
type NotificationFormat string
const ( Template NotificationFormat = "template" AndroidFormat NotificationFormat = "gcm" AppleFormat NotificationFormat = "apple" BaiduFormat NotificationFormat = "baidu" KindleFormat NotificationFormat = "adm" WindowsFormat NotificationFormat = "windows" WindowsPhoneFormat NotificationFormat = "windowsphone" )
func (NotificationFormat) GetContentType ¶
func (f NotificationFormat) GetContentType() string
GetContentType returns Content-Type associated with NotificationFormat
func (NotificationFormat) IsValid ¶
func (f NotificationFormat) IsValid() bool
IsValid identifies whether notification format is valid
type NotificationHub ¶
type NotificationHub struct {
// contains filtered or unexported fields
}
func NewNotificationHub ¶
func NewNotificationHub(connectionString, hubPath string) *NotificationHub
NewNotificationHub initializes and returns NotificationHub pointer
func (*NotificationHub) Schedule ¶
func (h *NotificationHub) Schedule(n *Notification, orTags []string, deliverTime time.Time) ([]byte, error)
Schedule pusblishes a scheduled notification to azure notification hub
func (*NotificationHub) Send ¶
func (h *NotificationHub) Send(n *Notification, orTags []string) ([]byte, error)
Send publishes notification to the azure hub
Click to show internal directories.
Click to hide internal directories.