pushnotifications

package
v0.0.0-...-36dd10c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Body         *string        `json:"body"`
	LocKey       *string        `json:"loc-key"`
	LocArgs      *[]interface{} `json:"loc-args"`
	ActionLocKey *string        `json:"action-loc-key"`
}

type Push

type Push struct {
	Alert *string     `json:"alert,omitempty"`
	Sound *string     `json:"sound,omitempty"`
	Data  interface{} `json:"custom_data"`
	Badge *int        `json:"badge,omitempty"`
}

type PushNotification

type PushNotification struct {
	// contains filtered or unexported fields
}

func NewPushNotification

func NewPushNotification(awsAccessKey string, awsSecretKey string, region string) *PushNotification

Create a push notification manager

func (*PushNotification) Register

func (this *PushNotification) Register(token string, applicationARN string, userData string) (string, error)

Register registers the endpoint into Amazon SNS

func (*PushNotification) Send

func (this *PushNotification) Send(arn string, data *Push) error

Sends a message to a particular endpoint from Amazon SNS

func (*PushNotification) Unregister

func (this *PushNotification) Unregister(arn string) error

Removes an endpoint from Amazon SNS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL