sns

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

README

AWS SNS

This activity allows you to send messages using AWS SNS.

Installation

Flogo CLI
flogo install github.com/project-flogo/aws-contrib/activity/sns

Configuration

To configure AWS credentials see configuring-sdk

Settings:
Name Type Description
topicARN string The topic ARN - REQUIRED
region string The AWS region, uses environment setting by default
json bool Use json message structure
Input:
Name Type Description
subject string The message subject
message any The message, either a string, object or params
Output:
Name Type Description
messageId string The message id

Message

The message it typically a string. Any value passed to message will be converted to a string.

Json Message Structure

When you enable json, then you can provide messages for different protocols. Note that the values for each provided protocol will be converted to a string.

Protocol Description
default The default message is required, if not provided a dummy message will be created
email A message for email
email - json A Message for email in JSON format
http A message for HTTP
https A message for HTTPS
sqs A message for Amazon SQS"

Examples

Coming soon...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Activity

type Activity struct {
	// contains filtered or unexported fields
}

Activity is an activity that is used to invoke a lambda function

func (*Activity) Eval

func (a *Activity) Eval(ctx activity.Context) (done bool, err error)

Eval implements activity.Activity.Eval

func (*Activity) Metadata

func (a *Activity) Metadata() *activity.Metadata

Metadata returns the activity's metadata

type Input

type Input struct {
	Subject string      `md:"subject"` // The message subject
	Message interface{} `md:"message"` // The message, either a string, object or params
}

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

func (*Input) ToMap

func (i *Input) ToMap() map[string]interface{}

type Output

type Output struct {
	MessageId string `md:"messageId"` // The message id
}

func (*Output) FromMap

func (o *Output) FromMap(values map[string]interface{}) error

func (*Output) ToMap

func (o *Output) ToMap() map[string]interface{}

type Settings

type Settings struct {
	TopicARN string `md:"topic,required"` // The topic ARN
	Json     bool   `md:"json"`           // Use json message structure
	Region   string `md:"region"`         // The AWS region, uses environment setting by default
}

Jump to

Keyboard shortcuts

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