cloudemu

Notification

Topics, subscriptions, and push notifications

Notification

Emulates notification services: SNS (AWS), NotificationHubs (Azure), FCM (GCP).

Provider Mapping

ProviderServiceAccess
AWSSNSaws.SNS
AzureNotification Hubsazure.NotificationHubs
GCPFCMgcp.FCM

Key Operations

Topics and Subscriptions

import notifdriver "github.com/stackshy/cloudemu/notification/driver"

topic, _ := aws.SNS.CreateTopic(ctx, notifdriver.TopicConfig{
    Name: "order-events",
})

sub, _ := aws.SNS.Subscribe(ctx, notifdriver.SubscriptionConfig{
    TopicID:  topic.ID,
    Protocol: "email",
    Endpoint: "team@example.com",
})

Publishing

aws.SNS.Publish(ctx, notifdriver.PublishInput{
    TopicID: topic.ID,
    Message: "New order received",
    Attributes: map[string]string{"orderType": "express"},
})

On this page