Documentation
¶
Index ¶
- Constants
- func ListSubscriptions(ctx core.ListResourcesContext, resourceType string) ([]core.IntegrationResource, error)
- func ListTopics(ctx core.ListResourcesContext, resourceType string) ([]core.IntegrationResource, error)
- type Client
- func (c *Client) CreateTopic(name string) (*Topic, error)
- func (c *Client) DeleteTopic(topicArn string) error
- func (c *Client) GetSubscription(subscriptionArn string) (*Subscription, error)
- func (c *Client) GetTopic(topicArn string) (*Topic, error)
- func (c *Client) ListSubscriptionsByTopic(topicArn string) ([]Subscription, error)
- func (c *Client) ListTopics() ([]Topic, error)
- func (c *Client) PublishMessage(parameters PublishMessageParameters) (*PublishResult, error)
- func (c *Client) Subscribe(parameters SubscribeParameters) (*Subscription, error)
- func (c *Client) Unsubscribe(subscriptionArn string) error
- type CreateTopic
- func (c *CreateTopic) Cancel(ctx core.ExecutionContext) error
- func (c *CreateTopic) Cleanup(ctx core.SetupContext) error
- func (c *CreateTopic) Color() string
- func (c *CreateTopic) Configuration() []configuration.Field
- func (c *CreateTopic) Description() string
- func (c *CreateTopic) Documentation() string
- func (c *CreateTopic) ExampleOutput() map[string]any
- func (c *CreateTopic) Execute(ctx core.ExecutionContext) error
- func (c *CreateTopic) HandleHook(ctx core.ActionHookContext) error
- func (c *CreateTopic) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *CreateTopic) Hooks() []core.Hook
- func (c *CreateTopic) Icon() string
- func (c *CreateTopic) Label() string
- func (c *CreateTopic) Name() string
- func (c *CreateTopic) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateTopic) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *CreateTopic) Setup(ctx core.SetupContext) error
- type CreateTopicConfiguration
- type DeleteTopic
- func (c *DeleteTopic) Cancel(ctx core.ExecutionContext) error
- func (c *DeleteTopic) Cleanup(ctx core.SetupContext) error
- func (c *DeleteTopic) Color() string
- func (c *DeleteTopic) Configuration() []configuration.Field
- func (c *DeleteTopic) Description() string
- func (c *DeleteTopic) Documentation() string
- func (c *DeleteTopic) ExampleOutput() map[string]any
- func (c *DeleteTopic) Execute(ctx core.ExecutionContext) error
- func (c *DeleteTopic) HandleHook(ctx core.ActionHookContext) error
- func (c *DeleteTopic) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *DeleteTopic) Hooks() []core.Hook
- func (c *DeleteTopic) Icon() string
- func (c *DeleteTopic) Label() string
- func (c *DeleteTopic) Name() string
- func (c *DeleteTopic) OutputChannels(configuration any) []core.OutputChannel
- func (c *DeleteTopic) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *DeleteTopic) Setup(ctx core.SetupContext) error
- type DeleteTopicConfiguration
- type GetSubscription
- func (c *GetSubscription) Cancel(ctx core.ExecutionContext) error
- func (c *GetSubscription) Cleanup(ctx core.SetupContext) error
- func (c *GetSubscription) Color() string
- func (c *GetSubscription) Configuration() []configuration.Field
- func (c *GetSubscription) Description() string
- func (c *GetSubscription) Documentation() string
- func (c *GetSubscription) ExampleOutput() map[string]any
- func (c *GetSubscription) Execute(ctx core.ExecutionContext) error
- func (c *GetSubscription) HandleHook(ctx core.ActionHookContext) error
- func (c *GetSubscription) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *GetSubscription) Hooks() []core.Hook
- func (c *GetSubscription) Icon() string
- func (c *GetSubscription) Label() string
- func (c *GetSubscription) Name() string
- func (c *GetSubscription) OutputChannels(configuration any) []core.OutputChannel
- func (c *GetSubscription) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *GetSubscription) Setup(ctx core.SetupContext) error
- type GetSubscriptionConfiguration
- type GetTopic
- func (c *GetTopic) Cancel(ctx core.ExecutionContext) error
- func (c *GetTopic) Cleanup(ctx core.SetupContext) error
- func (c *GetTopic) Color() string
- func (c *GetTopic) Configuration() []configuration.Field
- func (c *GetTopic) Description() string
- func (c *GetTopic) Documentation() string
- func (c *GetTopic) ExampleOutput() map[string]any
- func (c *GetTopic) Execute(ctx core.ExecutionContext) error
- func (c *GetTopic) HandleHook(ctx core.ActionHookContext) error
- func (c *GetTopic) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *GetTopic) Hooks() []core.Hook
- func (c *GetTopic) Icon() string
- func (c *GetTopic) Label() string
- func (c *GetTopic) Name() string
- func (c *GetTopic) OutputChannels(configuration any) []core.OutputChannel
- func (c *GetTopic) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *GetTopic) Setup(ctx core.SetupContext) error
- type GetTopicConfiguration
- type MessageAttribute
- type OnTopicMessage
- func (t *OnTopicMessage) Cleanup(ctx core.TriggerContext) error
- func (t *OnTopicMessage) Color() string
- func (t *OnTopicMessage) Configuration() []configuration.Field
- func (t *OnTopicMessage) Description() string
- func (t *OnTopicMessage) Documentation() string
- func (t *OnTopicMessage) ExampleData() map[string]any
- func (t *OnTopicMessage) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)
- func (t *OnTopicMessage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnTopicMessage) Hooks() []core.Hook
- func (t *OnTopicMessage) Icon() string
- func (t *OnTopicMessage) Label() string
- func (t *OnTopicMessage) Name() string
- func (t *OnTopicMessage) Setup(ctx core.TriggerContext) error
- type OnTopicMessageConfiguration
- type OnTopicMessageMetadata
- type PublishMessage
- func (c *PublishMessage) Cancel(ctx core.ExecutionContext) error
- func (c *PublishMessage) Cleanup(ctx core.SetupContext) error
- func (c *PublishMessage) Color() string
- func (c *PublishMessage) Configuration() []configuration.Field
- func (c *PublishMessage) Description() string
- func (c *PublishMessage) Documentation() string
- func (c *PublishMessage) ExampleOutput() map[string]any
- func (c *PublishMessage) Execute(ctx core.ExecutionContext) error
- func (c *PublishMessage) HandleHook(ctx core.ActionHookContext) error
- func (c *PublishMessage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *PublishMessage) Hooks() []core.Hook
- func (c *PublishMessage) Icon() string
- func (c *PublishMessage) Label() string
- func (c *PublishMessage) Name() string
- func (c *PublishMessage) OutputChannels(configuration any) []core.OutputChannel
- func (c *PublishMessage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *PublishMessage) Setup(ctx core.SetupContext) error
- type PublishMessageConfiguration
- type PublishMessageParameters
- type PublishResult
- type SignableField
- type SubscribeParameters
- type Subscription
- type SubscriptionMessage
- type Topic
Constants ¶
const ( PublishMessageFormatJSON = "json" PublishMessageFormatText = "text" )
Variables ¶
This section is empty.
Functions ¶
func ListSubscriptions ¶
func ListSubscriptions(ctx core.ListResourcesContext, resourceType string) ([]core.IntegrationResource, error)
func ListTopics ¶
func ListTopics(ctx core.ListResourcesContext, resourceType string) ([]core.IntegrationResource, error)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides lightweight SNS API operations through signed HTTP requests.
func NewClient ¶
func NewClient(httpCtx core.HTTPContext, credentials *aws.Credentials, region string) *Client
NewClient creates a region-scoped SNS client.
func (*Client) DeleteTopic ¶
DeleteTopic deletes the topic associated with the provided ARN.
func (*Client) GetSubscription ¶
func (c *Client) GetSubscription(subscriptionArn string) (*Subscription, error)
GetSubscription returns a subscription with normalized attributes.
func (*Client) GetTopic ¶
GetTopic returns a topic with normalized attributes from GetTopicAttributes.
func (*Client) ListSubscriptionsByTopic ¶
func (c *Client) ListSubscriptionsByTopic(topicArn string) ([]Subscription, error)
func (*Client) ListTopics ¶
ListTopics returns all topics in the configured region.
func (*Client) PublishMessage ¶
func (c *Client) PublishMessage(parameters PublishMessageParameters) (*PublishResult, error)
PublishMessage publishes a message to a topic and returns publish metadata.
func (*Client) Subscribe ¶
func (c *Client) Subscribe(parameters SubscribeParameters) (*Subscription, error)
Subscribe creates an SNS subscription and returns the resulting metadata.
func (*Client) Unsubscribe ¶
Unsubscribe removes a subscription identified by the provided ARN.
type CreateTopic ¶
type CreateTopic struct{}
func (*CreateTopic) Cancel ¶
func (c *CreateTopic) Cancel(ctx core.ExecutionContext) error
func (*CreateTopic) Cleanup ¶
func (c *CreateTopic) Cleanup(ctx core.SetupContext) error
func (*CreateTopic) Color ¶
func (c *CreateTopic) Color() string
func (*CreateTopic) Configuration ¶
func (c *CreateTopic) Configuration() []configuration.Field
func (*CreateTopic) Description ¶
func (c *CreateTopic) Description() string
func (*CreateTopic) Documentation ¶
func (c *CreateTopic) Documentation() string
func (*CreateTopic) ExampleOutput ¶
func (c *CreateTopic) ExampleOutput() map[string]any
ExampleOutput returns an example payload for CreateTopic.
func (*CreateTopic) Execute ¶
func (c *CreateTopic) Execute(ctx core.ExecutionContext) error
func (*CreateTopic) HandleHook ¶ added in v0.18.0
func (c *CreateTopic) HandleHook(ctx core.ActionHookContext) error
func (*CreateTopic) HandleWebhook ¶
func (c *CreateTopic) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*CreateTopic) Hooks ¶ added in v0.18.0
func (c *CreateTopic) Hooks() []core.Hook
func (*CreateTopic) Icon ¶
func (c *CreateTopic) Icon() string
func (*CreateTopic) Label ¶
func (c *CreateTopic) Label() string
func (*CreateTopic) Name ¶
func (c *CreateTopic) Name() string
func (*CreateTopic) OutputChannels ¶
func (c *CreateTopic) OutputChannels(configuration any) []core.OutputChannel
func (*CreateTopic) ProcessQueueItem ¶
func (c *CreateTopic) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*CreateTopic) Setup ¶
func (c *CreateTopic) Setup(ctx core.SetupContext) error
type DeleteTopic ¶
type DeleteTopic struct{}
func (*DeleteTopic) Cancel ¶
func (c *DeleteTopic) Cancel(ctx core.ExecutionContext) error
func (*DeleteTopic) Cleanup ¶
func (c *DeleteTopic) Cleanup(ctx core.SetupContext) error
func (*DeleteTopic) Color ¶
func (c *DeleteTopic) Color() string
func (*DeleteTopic) Configuration ¶
func (c *DeleteTopic) Configuration() []configuration.Field
func (*DeleteTopic) Description ¶
func (c *DeleteTopic) Description() string
func (*DeleteTopic) Documentation ¶
func (c *DeleteTopic) Documentation() string
func (*DeleteTopic) ExampleOutput ¶
func (c *DeleteTopic) ExampleOutput() map[string]any
ExampleOutput returns an example payload for DeleteTopic.
func (*DeleteTopic) Execute ¶
func (c *DeleteTopic) Execute(ctx core.ExecutionContext) error
func (*DeleteTopic) HandleHook ¶ added in v0.18.0
func (c *DeleteTopic) HandleHook(ctx core.ActionHookContext) error
func (*DeleteTopic) HandleWebhook ¶
func (c *DeleteTopic) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*DeleteTopic) Hooks ¶ added in v0.18.0
func (c *DeleteTopic) Hooks() []core.Hook
func (*DeleteTopic) Icon ¶
func (c *DeleteTopic) Icon() string
func (*DeleteTopic) Label ¶
func (c *DeleteTopic) Label() string
func (*DeleteTopic) Name ¶
func (c *DeleteTopic) Name() string
func (*DeleteTopic) OutputChannels ¶
func (c *DeleteTopic) OutputChannels(configuration any) []core.OutputChannel
func (*DeleteTopic) ProcessQueueItem ¶
func (c *DeleteTopic) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*DeleteTopic) Setup ¶
func (c *DeleteTopic) Setup(ctx core.SetupContext) error
type GetSubscription ¶
type GetSubscription struct{}
func (*GetSubscription) Cancel ¶
func (c *GetSubscription) Cancel(ctx core.ExecutionContext) error
func (*GetSubscription) Cleanup ¶
func (c *GetSubscription) Cleanup(ctx core.SetupContext) error
func (*GetSubscription) Color ¶
func (c *GetSubscription) Color() string
func (*GetSubscription) Configuration ¶
func (c *GetSubscription) Configuration() []configuration.Field
func (*GetSubscription) Description ¶
func (c *GetSubscription) Description() string
func (*GetSubscription) Documentation ¶
func (c *GetSubscription) Documentation() string
func (*GetSubscription) ExampleOutput ¶
func (c *GetSubscription) ExampleOutput() map[string]any
ExampleOutput returns an example payload for GetSubscription.
func (*GetSubscription) Execute ¶
func (c *GetSubscription) Execute(ctx core.ExecutionContext) error
func (*GetSubscription) HandleHook ¶ added in v0.18.0
func (c *GetSubscription) HandleHook(ctx core.ActionHookContext) error
func (*GetSubscription) HandleWebhook ¶
func (c *GetSubscription) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*GetSubscription) Hooks ¶ added in v0.18.0
func (c *GetSubscription) Hooks() []core.Hook
func (*GetSubscription) Icon ¶
func (c *GetSubscription) Icon() string
func (*GetSubscription) Label ¶
func (c *GetSubscription) Label() string
func (*GetSubscription) Name ¶
func (c *GetSubscription) Name() string
func (*GetSubscription) OutputChannels ¶
func (c *GetSubscription) OutputChannels(configuration any) []core.OutputChannel
func (*GetSubscription) ProcessQueueItem ¶
func (c *GetSubscription) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*GetSubscription) Setup ¶
func (c *GetSubscription) Setup(ctx core.SetupContext) error
type GetTopic ¶
type GetTopic struct{}
func (*GetTopic) Configuration ¶
func (c *GetTopic) Configuration() []configuration.Field
func (*GetTopic) Description ¶
func (*GetTopic) Documentation ¶
func (*GetTopic) ExampleOutput ¶
ExampleOutput returns an example payload for GetTopic.
func (*GetTopic) HandleHook ¶ added in v0.18.0
func (c *GetTopic) HandleHook(ctx core.ActionHookContext) error
func (*GetTopic) HandleWebhook ¶
func (c *GetTopic) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*GetTopic) OutputChannels ¶
func (c *GetTopic) OutputChannels(configuration any) []core.OutputChannel
func (*GetTopic) ProcessQueueItem ¶
type GetTopicConfiguration ¶
type MessageAttribute ¶
type OnTopicMessage ¶
type OnTopicMessage struct{}
func (*OnTopicMessage) Cleanup ¶
func (t *OnTopicMessage) Cleanup(ctx core.TriggerContext) error
func (*OnTopicMessage) Color ¶
func (t *OnTopicMessage) Color() string
func (*OnTopicMessage) Configuration ¶
func (t *OnTopicMessage) Configuration() []configuration.Field
func (*OnTopicMessage) Description ¶
func (t *OnTopicMessage) Description() string
func (*OnTopicMessage) Documentation ¶
func (t *OnTopicMessage) Documentation() string
func (*OnTopicMessage) ExampleData ¶
func (t *OnTopicMessage) ExampleData() map[string]any
ExampleData returns an example payload for OnTopicMessage events.
func (*OnTopicMessage) HandleHook ¶ added in v0.18.0
func (t *OnTopicMessage) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)
func (*OnTopicMessage) HandleWebhook ¶
func (t *OnTopicMessage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*OnTopicMessage) Hooks ¶ added in v0.18.0
func (t *OnTopicMessage) Hooks() []core.Hook
func (*OnTopicMessage) Icon ¶
func (t *OnTopicMessage) Icon() string
func (*OnTopicMessage) Label ¶
func (t *OnTopicMessage) Label() string
func (*OnTopicMessage) Name ¶
func (t *OnTopicMessage) Name() string
func (*OnTopicMessage) Setup ¶
func (t *OnTopicMessage) Setup(ctx core.TriggerContext) error
type OnTopicMessageMetadata ¶
type PublishMessage ¶
type PublishMessage struct{}
func (*PublishMessage) Cancel ¶
func (c *PublishMessage) Cancel(ctx core.ExecutionContext) error
func (*PublishMessage) Cleanup ¶
func (c *PublishMessage) Cleanup(ctx core.SetupContext) error
func (*PublishMessage) Color ¶
func (c *PublishMessage) Color() string
func (*PublishMessage) Configuration ¶
func (c *PublishMessage) Configuration() []configuration.Field
func (*PublishMessage) Description ¶
func (c *PublishMessage) Description() string
func (*PublishMessage) Documentation ¶
func (c *PublishMessage) Documentation() string
func (*PublishMessage) ExampleOutput ¶
func (c *PublishMessage) ExampleOutput() map[string]any
ExampleOutput returns an example payload for PublishMessage.
func (*PublishMessage) Execute ¶
func (c *PublishMessage) Execute(ctx core.ExecutionContext) error
func (*PublishMessage) HandleHook ¶ added in v0.18.0
func (c *PublishMessage) HandleHook(ctx core.ActionHookContext) error
func (*PublishMessage) HandleWebhook ¶
func (c *PublishMessage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*PublishMessage) Hooks ¶ added in v0.18.0
func (c *PublishMessage) Hooks() []core.Hook
func (*PublishMessage) Icon ¶
func (c *PublishMessage) Icon() string
func (*PublishMessage) Label ¶
func (c *PublishMessage) Label() string
func (*PublishMessage) Name ¶
func (c *PublishMessage) Name() string
func (*PublishMessage) OutputChannels ¶
func (c *PublishMessage) OutputChannels(configuration any) []core.OutputChannel
func (*PublishMessage) ProcessQueueItem ¶
func (c *PublishMessage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*PublishMessage) Setup ¶
func (c *PublishMessage) Setup(ctx core.SetupContext) error
type PublishMessageParameters ¶
type PublishMessageParameters struct {
TopicArn string
Message string
Subject string
MessageAttributes map[string]string
}
PublishMessageParameters defines the arguments for a publish operation.
type PublishResult ¶
type PublishResult struct {
MessageID string `json:"messageId" mapstructure:"messageId"`
SequenceNumber string `json:"sequenceNumber,omitempty" mapstructure:"sequenceNumber"`
TopicArn string `json:"topicArn" mapstructure:"topicArn"`
}
PublishResult models the response emitted after publishing an SNS message.
type SignableField ¶
type SignableField struct {
// contains filtered or unexported fields
}
type SubscribeParameters ¶
type SubscribeParameters struct {
TopicArn string
Protocol string
Endpoint string
Attributes map[string]string
ReturnSubscriptionARN bool
}
SubscribeParameters defines the arguments for a subscribe operation.
type Subscription ¶
type Subscription struct {
SubscriptionArn string `json:"subscriptionArn" mapstructure:"subscriptionArn"`
TopicArn string `json:"topicArn,omitempty" mapstructure:"topicArn"`
Protocol string `json:"protocol,omitempty" mapstructure:"protocol"`
Endpoint string `json:"endpoint,omitempty" mapstructure:"endpoint"`
Owner string `json:"owner,omitempty" mapstructure:"owner"`
PendingConfirmation bool `json:"pendingConfirmation" mapstructure:"pendingConfirmation"`
RawMessageDelivery bool `json:"rawMessageDelivery" mapstructure:"rawMessageDelivery"`
Attributes map[string]string `json:"attributes,omitempty" mapstructure:"attributes"`
}
Subscription models an AWS SNS subscription payload returned by SNS API operations.
type SubscriptionMessage ¶
type SubscriptionMessage struct {
Type string `json:"Type"`
MessageID string `json:"MessageId"`
TopicArn string `json:"TopicArn"`
Subject string `json:"Subject"`
Message string `json:"Message"`
Timestamp string `json:"Timestamp"`
SignatureVersion string `json:"SignatureVersion"`
Signature string `json:"Signature"`
SigningCertURL string `json:"SigningCertURL"`
UnsubscribeURL string `json:"UnsubscribeURL"`
SubscribeURL string `json:"SubscribeURL"`
Token string `json:"Token"`
MessageAttributes map[string]MessageAttribute `json:"MessageAttributes"`
}
type Topic ¶
type Topic struct {
TopicArn string `json:"topicArn" mapstructure:"topicArn"`
Name string `json:"name" mapstructure:"name"`
DisplayName string `json:"displayName,omitempty" mapstructure:"displayName"`
Owner string `json:"owner,omitempty" mapstructure:"owner"`
KmsMasterKeyID string `json:"kmsMasterKeyId,omitempty" mapstructure:"kmsMasterKeyId"`
FifoTopic bool `json:"fifoTopic" mapstructure:"fifoTopic"`
ContentBasedDeduplication bool `json:"contentBasedDeduplication" mapstructure:"contentBasedDeduplication"`
Attributes map[string]string `json:"attributes,omitempty" mapstructure:"attributes"`
}
Topic models an AWS SNS topic payload returned by SNS API operations.