Categorygithub.com/whosonfirst/go-webhookd-slack
repositorypackage
1.1.5
Repository: https://github.com/whosonfirst/go-webhookd-slack.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

go-webhookd-slack

go-webhookd support for Slack.

go-webhookd

Before you begin please read the go-webhookd documentation for an overview of concepts and principles.

Usage

import (
	_ "github.com/go-webhookd-slack"
)

Receivers

Slack

The Slack receiver handles Webhooks sent from Slack. It does not process the message at all. It is defined as a URI string in the form of:

slack://

This receiver has not been fully tested yet so proceed with caution.

Transformations

SlackText

The SlackText transformation will extract and return the text property from a Webhook sent by Slack. It is defined as URI string in the form of:

slacktext://

Dispatchers

Slack

The Slack dispatcher will send messages to a Slack channel. It is defined as a URI string in the form of:

slack://?webhook={SLACK_WEBHOOK_URI}&channel={SLACK_CHANNEL}

Parameters

NameValueDescriptionRequired
webhookstringA valid Slack Webhook URL.yes
channelstringA valid Slack channel nameyes

Earlier versions of this package used the whosonfirst/slackcat package to send Slack messages which necessitated that slack:// dispatcher URLs be in the form of:

slack://{PATH_TO_SLACKCAT.CONFG}

In order to preserve backwards compatibility this URL form will continue to honoured if a slack:// dispatcher URL does not contain a webhook or channel query parameter.

Properties

NameValueDescriptionRequired
slackcat.confstringThe path to a valid slackcat config file.yes

Eventually you will be able to specify a plain-vanilla Slack Webhook URL but not today.

See also