Documentation ¶
Index ¶
- Constants
- func String(v string) *string
- type AmazonSNS
- func (svc *AmazonSNS) BulkPublish(tokens map[string][]string, msg string) error
- func (svc *AmazonSNS) BulkPublishByDevice(device string, tokens []string, msg string) error
- func (svc *AmazonSNS) CreateTopic(name string) (*SNSTopic, error)
- func (svc *AmazonSNS) GetApp(typ string) (*SNSApp, error)
- func (svc *AmazonSNS) GetAppAPNS() (*SNSApp, error)
- func (svc *AmazonSNS) GetAppGCM() (*SNSApp, error)
- func (svc *AmazonSNS) Publish(arn string, msg string, opt map[string]interface{}) error
- func (svc *AmazonSNS) RegisterEndpoint(device, token string) (*SNSEndpoint, error)
- type SNSApp
- type SNSEndpoint
- type SNSTopic
Constants ¶
View Source
const ( AppTypeAPNS = "apns" AppTypeAPNSSandbox = "apns_sandbox" AppTypeGCM = "gcm" MessageBodyLimit = 2000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AmazonSNS ¶
func (*AmazonSNS) BulkPublish ¶
Publish notification for many endpoints tokens is map of string slices, each key stands for device, like "android"/"ios" ex) tokens := map[string][]string{ "android": []string{"token1", "token2"}, "ios": []string{"token3", "token4"}}
func (*AmazonSNS) BulkPublishByDevice ¶
Publish notification for many endpoints (supports single device only)
func (*AmazonSNS) CreateTopic ¶
Create SNS Topic and return `TopicARN`
func (*AmazonSNS) GetAppAPNS ¶
Get SNSApp struct of Apple Push Notification Service for iOS
func (*AmazonSNS) RegisterEndpoint ¶
func (svc *AmazonSNS) RegisterEndpoint(device, token string) (*SNSEndpoint, error)
Register endpoint(device) to application
type SNSApp ¶
type SNSApp struct {
// contains filtered or unexported fields
}
func (*SNSApp) CreateEndpoint ¶
func (a *SNSApp) CreateEndpoint(token string) (*SNSEndpoint, error)
Create Endpoint(add device) and return `EndpointARN`
type SNSEndpoint ¶
type SNSEndpoint struct {
// contains filtered or unexported fields
}
func NewEndpoint ¶
func NewEndpoint(arn, protocol string, svc *AmazonSNS) *SNSEndpoint
Click to show internal directories.
Click to hide internal directories.