sns

package
v0.0.0-...-bc59cad Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: LGPL-3.0 Imports: 13 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 CreatePlatformApplicationResponse

type CreatePlatformApplicationResponse struct {
	PlatformApplicationArn string `xml:"CreatePlatformApplicationResult>PlatformApplicationArn"`
	ResponseMetadata
}

type CreatePlatformEndpointResponse

type CreatePlatformEndpointResponse struct {
	EndpointArn string `xml:"CreatePlatformEndpointResult>EndpointArn"`
	ResponseMetadata
}

type CreateTopicResp

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

type DeleteEndpointResponse

type DeleteEndpointResponse struct {
	ResponseMetadata
}

type DeletePlatformApplicationResponse

type DeletePlatformApplicationResponse struct {
	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 GetEndpointAttributesResponse

type GetEndpointAttributesResponse struct {
	Attributes []AttributeEntry `xml:"GetEndpointAttributesResult>Attributes>entry"`
	ResponseMetadata
}

type GetPlatformApplicationAttributesResponse

type GetPlatformApplicationAttributesResponse struct {
	Attributes []AttributeEntry `xml:"GetPlatformApplicationAttributesResult>Attributes>entry"`
	ResponseMetadata
}

type GetTopicAttributesResp

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

type ListEndpointsByPlatformApplicationResponse

type ListEndpointsByPlatformApplicationResponse struct {
	Endpoints []PlatformEndpoints `xml:"ListEndpointsByPlatformApplicationResult>Endpoints>member"`
	ResponseMetadata
}

type ListPlatformApplicationsResponse

type ListPlatformApplicationsResponse struct {
	NextToken            string
	PlatformApplications []PlatformApplication `xml:"ListPlatformApplicationsResult>PlatformApplications>member"`
	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 PlatformApplication

type PlatformApplication struct {
	Attributes             []AttributeEntry `xml:"Attributes>entry"`
	PlatformApplicationArn string
}

type PlatformApplicationOpt

type PlatformApplicationOpt struct {
	Attributes []AttributeEntry
	Name       string
	Platform   string
}

type PlatformEndpointOpt

type PlatformEndpointOpt struct {
	Attributes             []AttributeEntry
	PlatformApplicationArn string
	CustomUserData         string
	Token                  string
}

type PlatformEndpoints

type PlatformEndpoints struct {
	EndpointArn string           `xml:"EndpointArn"`
	Attributes  []AttributeEntry `xml:"Attributes>entry"`
}

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) CreatePlatformApplication

func (sns *SNS) CreatePlatformApplication(options *PlatformApplicationOpt) (resp *CreatePlatformApplicationResponse, err error)

func (*SNS) CreatePlatformEndpoint

func (sns *SNS) CreatePlatformEndpoint(options *PlatformEndpointOpt) (resp *CreatePlatformEndpointResponse, err error)

CreatePlatformEndpoint

See http://goo.gl/4tnngi 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) DeleteEndpoint

func (sns *SNS) DeleteEndpoint(endpointArn string) (resp *DeleteEndpointResponse, err error)

DeleteEndpoint

See http://goo.gl/9SlUD9 for more details.

func (*SNS) DeletePlatformApplication

func (sns *SNS) DeletePlatformApplication(platformApplicationArn string) (resp *DeletePlatformApplicationResponse, err error)

DeletePlatformApplication

See http://goo.gl/6GB3DN for more details.

func (*SNS) GetEndpointAttributes

func (sns *SNS) GetEndpointAttributes(endpointArn string) (resp *GetEndpointAttributesResponse, err error)

GetEndpointAttributes

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

func (*SNS) GetPlatformApplicationAttributes

func (sns *SNS) GetPlatformApplicationAttributes(platformApplicationArn, nextToken string) (resp *GetPlatformApplicationAttributesResponse, err error)

GetPlatformApplicationAttributes

See http://goo.gl/GswJ8I 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) ListEndpointsByPlatformApplication

func (sns *SNS) ListEndpointsByPlatformApplication(platformApplicationArn, nextToken string) (resp *ListEndpointsByPlatformApplicationResponse, err error)

ListEndpointsByPlatformApplication

See http://goo.gl/L7ioyR for more detail.

func (*SNS) ListPlatformApplications

func (sns *SNS) ListPlatformApplications(nextToken string) (resp *ListPlatformApplicationsResponse, err error)

ListPlatformApplications

See http://goo.gl/vQ3ooV for more detail.

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) SetEndpointAttributes

func (sns *SNS) SetEndpointAttributes(options *SetEndpointAttributesOpt) (resp *SetEndpointAttributesResponse, err error)

SetEndpointAttributes

See http://goo.gl/GTktCj for more detail.

func (*SNS) SetPlatformApplicationAttributes

func (sns *SNS) SetPlatformApplicationAttributes(options *SetPlatformApplicationAttributesOpt) (resp *SetPlatformApplicationAttributesResponse, err error)

SetPlatformApplicationAttributes

See http://goo.gl/RWnzzb for more detail.

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 SetEndpointAttributesOpt

type SetEndpointAttributesOpt struct {
	Attributes  []AttributeEntry
	EndpointArn string
}

type SetEndpointAttributesResponse

type SetEndpointAttributesResponse struct {
	ResponseMetadata
}

type SetPlatformApplicationAttributesOpt

type SetPlatformApplicationAttributesOpt struct {
	Attributes             []AttributeEntry
	PlatformApplicationArn string
}

type SetPlatformApplicationAttributesResponse

type SetPlatformApplicationAttributesResponse struct {
	ResponseMetadata
}

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

  • Package needs documentation.

Jump to

Keyboard shortcuts

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