Skip to content

silmin/nenech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nenech

This repo is Slack-Gateway

GateWay for Slack App by golang from JSON file

dev_env: go1.13.8 darwin/amd64(macos)

About

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.

Usage

Server side

git clone https://github.com/silmin/nenech

move ./nenech

go run *.go

In option, -port option can change boot port (default 80)

go run *.go -port=8000

Client side

curl 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\=hoge

Username can be set to "hoge".

You can set username/title/message/color(good|warning|danger|(color code)).

About

Slack Gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages