slackeventmediator

package module
v0.0.0-...-85f4773 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 12 Imported by: 0

README

Slack Event Mediator

Slack Event Mediator is a simple Cloud Run function that listens to Slack events and forwards them to Cloud Pub/Sub.

Environment Variables

  • Required
    • GOOGLE_CLOUD_PROJECT
    • SLACK_SIGNING_SECRET
  • Optional
    • PUBSUB_TOPIC (defualt: slack-events)

Deployment

Clone this repository then deploy it to Cloud Run functions. Example:

FUNCTION_NAME=slack-event-mediator
REGION=asia-northeast1
GOOGLE_CLOUD_PROJECT=YOUR_PROJECT
SECRET=YOUR_SECRET_MANAGER_NAME

gcloud functions deploy "$FUNCTION_NAME" \
  --gen2 \
  --runtime=go123 \
  --region="$REGION" \
  --source=. \
  --entry-point=SlackEventMediator \
  --trigger-http \
  --allow-unauthenticated \
  --set-env-vars=GOOGLE_CLOUD_PROJECT="$GOOGLE_CLOUD_PROJECT" \
  --set-secrets=SLACK_SIGNING_SECRET="${SECRET}:latest"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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