This repo is Slack-Gateway
GateWay for Slack App by golang from JSON file
dev_env: go1.13.8 darwin/amd64(macos)
This GW does a POST for any Slack webhook-url on behalf of the host.
Please write configs/xx.json for your App you want to connect to this GW.
for example
{
"endpoint": "test",
"username": "nenech",
"channel": "test",
"webhook_url": "your-webhook-url",
"title": "Message",
"message": "test message",
"color": "good"
}This GW adds a POST route to the web API based on this JSON file.
You can send a message to slack by sending a POST request to the specified endpoint.
git clone https://github.com/silmin/nenechmove ./nenech
go run *.goIn option, -port option can change boot port (default 80)
go run *.go -port=8000curl http://<your-server-addr>/<specified-endpoint>The contents of the configuration file corresponding to the endpoint will be posted to Slack.
In option,
curl http://<your-server-addr>/<specified-endpoint>\?username\=hogeUsername can be set to "hoge".
You can set username/title/message/color(good|warning|danger|(color code)).