sns

package
Version: v0.0.0-...-caaaea8 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2015 License: LGPL-3.0 Imports: 12 Imported by: 0

README

Amazon Simple Notification Service API for Golang.

Documentation

Overview

This package is in an experimental state, and does not currently follow conventions and style of the rest of goamz or common Go conventions. It must be polished before it's considered a first-class package in goamz.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPermissionResponse

type AddPermissionResponse struct {
	ResponseMetadata
}

type AttributeEntry

type AttributeEntry struct {
	Key   string `xml:"key"`
	Value string `xml:"value"`
}

type ConfirmSubscriptionOpt

type ConfirmSubscriptionOpt struct {
	AuthenticateOnUnsubscribe string
	Token                     string
	TopicArn                  string
}

type ConfirmSubscriptionResponse

type ConfirmSubscriptionResponse struct {
	SubscriptionArn string `xml:"ConfirmSubscriptionResult>SubscriptionArn"`
	ResponseMetadata
}

type CreateTopicResp

type CreateTopicResp struct {
	Topic Topic `xml:"CreateTopicResult"`
	ResponseMetadata
}

type DeleteTopicResp

type DeleteTopicResp struct {
	ResponseMetadata
}

type Error

type Error struct {
	StatusCode int
	Code       string
	Message    string
	RequestId  string
}

func (*Error) Error

func (err *Error) Error() string

type GetTopicAttributesResp

type GetTopicAttributesResp struct {
	Attributes []AttributeEntry `xml:"GetTopicAttributesResult>Attributes>entry"`
	ResponseMetadata
}

type ListSubscriptionByTopicOpt

type ListSubscriptionByTopicOpt struct {
	NextToken string
	TopicArn  string
}

type ListSubscriptionByTopicResponse

type ListSubscriptionByTopicResponse struct {
	Subscriptions []Subscription `xml:"ListSubscriptionsByTopicResult>Subscriptions>member"`
	ResponseMetadata
}

type ListSubscriptionsResp

type ListSubscriptionsResp struct {
	Subscriptions []Subscription `xml:"ListSubscriptionsResult>Subscriptions>member"`
	NextToken     string
	ResponseMetadata
}

type ListTopicsResp

type ListTopicsResp struct {
	Topics    []Topic `xml:"ListTopicsResult>Topics>member"`
	NextToken string
	ResponseMetadata
}

type Permission

type Permission struct {
	ActionName string
	AccountId  string
}

type PublishOpt

type PublishOpt struct {
	Message          string
	MessageStructure string
	Subject          string
	TopicArn         string
	TargetArn        string
}

type PublishResp

type PublishResp struct {
	MessageId string `xml:"PublishResult>MessageId"`
	ResponseMetadata
}

type RemovePermissionResponse

type RemovePermissionResponse struct {
	ResponseMetadata
}

type ResponseMetadata

type ResponseMetadata struct {
	RequestId string  `xml:"ResponseMetadata>RequestId"`
	BoxUsage  float64 `xml:"ResponseMetadata>BoxUsage"`
}

type SNS

type SNS struct {
	aws.Auth
	aws.Region
	// contains filtered or unexported fields
}

The SNS type encapsulates operation with an SNS region.

func New

func New(auth aws.Auth, region aws.Region) *SNS

func (*SNS) AddPermission

func (sns *SNS) AddPermission(permissions []Permission, Label, TopicArn string) (resp *AddPermissionResponse, err error)

AddPermission

See http://goo.gl/mbY4a for more details.

func (*SNS) ConfirmSubscription

func (sns *SNS) ConfirmSubscription(options *ConfirmSubscriptionOpt) (resp *ConfirmSubscriptionResponse, err error)

ConfirmSubscription

See http://goo.gl/3hXzH for more details.

func (*SNS) CreateTopic

func (sns *SNS) CreateTopic(Name string) (resp *CreateTopicResp, err error)

CreateTopic

See http://goo.gl/m9aAt for more details.

func (*SNS) GetTopicAttributes

func (sns *SNS) GetTopicAttributes(TopicArn string) (resp *GetTopicAttributesResp, err error)

GetTopicAttributes

See http://goo.gl/WXRoX for more details.

func (*SNS) ListSubscriptionByTopic

func (sns *SNS) ListSubscriptionByTopic(options *ListSubscriptionByTopicOpt) (resp *ListSubscriptionByTopicResponse, err error)

ListSubscriptionByTopic

See http://goo.gl/LaVcC for more details.

func (*SNS) ListSubscriptions

func (sns *SNS) ListSubscriptions(NextToken *string) (resp *ListSubscriptionsResp, err error)

ListSubscriptions

See http://goo.gl/k3aGn for more details.

func (*SNS) ListTopics

func (sns *SNS) ListTopics(NextToken *string) (resp *ListTopicsResp, err error)

ListTopics

See http://goo.gl/lfrMK for more details.

func (*SNS) Publish

func (sns *SNS) Publish(options *PublishOpt) (resp *PublishResp, err error)

Publish

See http://goo.gl/AY2D8 for more details.

func (*SNS) RemovePermission

func (sns *SNS) RemovePermission(Label, TopicArn string) (resp *RemovePermissionResponse, err error)

RemovePermission

See http://goo.gl/wGl5j for more details.

func (*SNS) SetTopicAttributes

func (sns *SNS) SetTopicAttributes(AttributeName, AttributeValue, TopicArn string) (resp *SetTopicAttributesResponse, err error)

SetTopicAttributes

See http://goo.gl/oVYW7 for more details.

func (*SNS) Subscribe

func (sns *SNS) Subscribe(Endpoint, Protocol, TopicArn string) (resp *SubscribeResponse, err error)

Subscribe

See http://goo.gl/c3iGS for more details.

func (*SNS) Unsubscribe

func (sns *SNS) Unsubscribe(SubscriptionArn string) (resp *UnsubscribeResponse, err error)

Unsubscribe

See http://goo.gl/4l5Ge for more details.

type SetTopicAttributesResponse

type SetTopicAttributesResponse struct {
	ResponseMetadata
}

type SubscribeResponse

type SubscribeResponse struct {
	SubscriptionArn string `xml:"SubscribeResult>SubscriptionArn"`
	ResponseMetadata
}

type Subscription

type Subscription struct {
	Endpoint        string
	Owner           string
	Protocol        string
	SubscriptionArn string
	TopicArn        string
}

type Topic

type Topic struct {
	SNS      *SNS
	TopicArn string
}

func (*Topic) Delete

func (topic *Topic) Delete() (resp *DeleteTopicResp, err error)

Delete

Helper function for deleting a topic

type UnsubscribeResponse

type UnsubscribeResponse struct {
	ResponseMetadata
}

Notes

Bugs

  • Topic values in responses are not being initialized properly, since they're supposed to reference *SNS.

  • Package needs documentation.

Jump to

Keyboard shortcuts

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