0.0.2 • Published 1 year ago

@pacovk/eventcatalog-generator-sns v0.0.2

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Quality Test Release

blog

Core Features

  • šŸ“ƒ Document channels from your Amazon SNS topics
  • ⭐ Discoverability feature (search, filter and more)

How it works

EventCatalog supports generators. Generators are scripts are run to pre-build to generate content in your catalog. Generators can use the EventCatalog SDK.

With this SNS plugin you can collect topics and add them as channels to your catalog. You can map owners to those channels via tags and also filter for specific topics.

This is done by defining your generators in your eventcatalog.config.js file.

...
generators: [
    [
      '@pacovk/eventcatalog-generator-sns',
        {
            // (optional) Tag that will be used to map the owner of the channel
            // Case-Insensitive (default: 'owner')
            // Value must match a team or user in you eventcatalog instance
            ownerTagKey: 'owner',
            // (optional) Filter for topics by tags
            // If not set all topics will be added, otherwise only topics that match the filter will be added
            filter: {
                type: 'global', // e.g. only add topics that have a tag with the key 'type' and value 'global'
            },
            // (optional) AWS credentials
            // If not set, the default credentials will be used
            // RECOMMENDED: Use environment variables  instead
            credentials: {
                accessKeyId: 'X',
                secretAccessKey: 'X',
                accountId: 'X',
            }
        }
  ]
]
...

Getting started

Installation and configuration

Make sure you are on the latest version of EventCatalog.

  1. Install the package
@pacovk/eventcatalog-generator-sns
  1. Configure your eventcatalog.config.js file

  2. Run the generate command

npm run generate
  1. See your new channels, run
npm run dev

Found a problem?

Raise a GitHub issue on this project!

Contributing

If you have any questions, features or issues please raise any issue or pull requests you like. I will try my best to get back to you.

You can find the contributing guidelines here.

Running the project locally

  1. Clone the repo
  2. Install required dependencies yarn install
  3. Run tests yarn test