Giter Club home page Giter Club logo

message-transfer's Introduction

Cloopy(小云)

Build status

Cloopy是一款用来集成企业微信发通知的软件,用Go语言开发,轻量高效。

To start using Cloopy

Compile

# Mac下编译
$ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go
$ CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go

# Linux下编译
$ CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build main.go
$ CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go 

# Windows 下编译 Mac 和 Linux 64位可执行程序
SET CGO_ENABLED=0
SET GOOS=darwin
SET GOARCH=amd64
go build main.go

SET CGO_ENABLED=0
SET GOOS=linux
SET GOARCH=amd64
go build main.go

GOOS:目标平台的操作系统(darwin、freebsd、linux、windows) GOARCH:目标平台的体系架构(386、amd64、arm) 交叉编译不支持 CGO 所以要禁用它

Run

# 以在Linux运行为例
$ ./cloopy
# 默认监听在port:12345
# swagger: http://localhost:12345/apidocs/?url=http://localhost:12345/apidocs.json

Integration

  1. Add Group Robot In WeChat Work Group
  2. Get Robot Webhook Url
  3. POST Request

url:

url="http://127.0.0.1:12345/cloopy/send"

body:

{
  "msgtype": "text",
  "text": {
    "content": "test"
  }
}

request:

curl ${url} \
    -H 'Content-Type: application/json' \
    -d '
    {
      "msgtype": "text",
      "text": {
        "content": "Hello Cloopy"
      },
      "webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx"
    }'

grafana webhook

默认已经支持grafana的数据结构. 只需要在grafana Alerting-Notification channels里添加类型为webhook的channel即可。

格式:

http://10.66.17.96:12345/cloopy/grafana?webhook=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx

Query参数目前只支持webhook,传入对应企业微信群机器人的webhook地址。

Support

If you have questions, reach out to [[email protected]].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.