Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfirmSubscriptionResponse ¶
type ConfirmSubscriptionResponse struct { XMLName xml.Name `xml:"ConfirmSubscriptionResponse"` SubscriptionArn string `xml:"ConfirmSubscriptionResult>SubscriptionArn"` RequestId string `xml:"ResponseMetadata>RequestId"` }
ConfirmSubscriptionResponse contains the XML response of accessing a SubscribeURL
type Payload ¶
type Payload struct { Message string `json:"Message"` MessageId string `json:"MessageId"` Signature string `json:"Signature"` SignatureVersion string `json:"SignatureVersion"` SigningCertURL string `json:"SigningCertURL"` SubscribeURL string `json:"SubscribeURL"` Subject string `json:"Subject"` Timestamp string `json:"Timestamp"` Token string `json:"Token"` TopicArn string `json:"TopicArn"` Type string `json:"Type"` UnsubscribeURL string `json:"UnsubscribeURL"` }
Payload contains a single POST from SNS
func (*Payload) BuildSignedContent ¶
BuildSignature returns a byte array containing a signature usable for SNS verification
func (*Payload) Subscribe ¶
func (payload *Payload) Subscribe() (ConfirmSubscriptionResponse, error)
Subscribe will use the SubscribeURL in a payload to confirm a subscription and return a ConfirmSubscriptionResponse
func (*Payload) Unsubscribe ¶
func (payload *Payload) Unsubscribe() (UnsubscribeResponse, error)
Unsubscribe will use the UnsubscribeURL in a payload to confirm a subscription and return a UnsubscribeResponse
func (*Payload) VerifyPayload ¶
VerifyPayload will verify that a payload came from SNS
type UnsubscribeResponse ¶
type UnsubscribeResponse struct { XMLName xml.Name `xml:"UnsubscribeResponse"` RequestId string `xml:"ResponseMetadata>RequestId"` }
UnsubscribeResponse contains the XML response of accessing an UnsubscribeURL
Click to show internal directories.
Click to hide internal directories.