Documentation ¶
Index ¶
- Constants
- func CreateTopic(svc interface{}, name string) (string, error)
- func InitSesh() interface{}
- func ListTopics(svc interface{}) ([]string, error)
- func Publish(svc interface{}, msgStr, topicArn string) (string, error)
- func Subscribe(svc interface{}, endpoint, protocol, topicArn string) (string, error)
Constants ¶
View Source
const InvalidProtocolErr = "INVALID_SUBSCRIPTION_PROTOCOL"
InvliadProtocolErr is returned when an invalid value is passed to the Subscribe function.
View Source
const InvalidSvcArgErr = "INVALID_SVC_ARG_TYPE"
InvalidSvcArgErr is returned when an interface object passed as the svc argument to the package methods is not the AWS *sns.SNS type.
Variables ¶
This section is empty.
Functions ¶
func CreateTopic ¶
CreateTopic creates a new SNS topic with the given name.
func InitSesh ¶
func InitSesh() interface{}
InitSesh intitializes a new SNS client session and returns the AWS *sns.SNS object as an interface type to maintain encapsulation of the AWS sns package. The *sns.SNS type is asserted by the methods used in this package, which return the InvalidSvcArgErr if the type is invalid.
func ListTopics ¶
ListTopics prints and returns a list of all SNS topics' ARNs in the AWS account.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.