{"id":19466542,"url":"https://github.com/moond4rk/notifier","last_synced_at":"2025-04-25T09:33:42.746Z","repository":{"id":57693305,"uuid":"483883628","full_name":"moonD4rk/notifier","owner":"moonD4rk","description":"notifier is a Go library to send notification to other applications.","archived":false,"fork":false,"pushed_at":"2024-03-07T09:23:17.000Z","size":38,"stargazers_count":21,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T20:02:01.464Z","etag":null,"topics":["bark","bot","dingtalk","feishu","go","golang","lark","notifications","notifiers","notify"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moonD4rk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-21T02:46:06.000Z","updated_at":"2024-09-06T18:44:17.000Z","dependencies_parsed_at":"2024-06-19T19:06:32.651Z","dependency_job_id":"adc5ef8f-bc1c-40df-b40f-c2dc2d3d0f57","html_url":"https://github.com/moonD4rk/notifier","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"0c0d9712eebf633c37986a678bf4d60647a07639"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonD4rk%2Fnotifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonD4rk%2Fnotifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonD4rk%2Fnotifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonD4rk%2Fnotifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moonD4rk","download_url":"https://codeload.github.com/moonD4rk/notifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250790370,"owners_count":21487796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bark","bot","dingtalk","feishu","go","golang","lark","notifications","notifiers","notify"],"created_at":"2024-11-10T18:28:36.054Z","updated_at":"2025-04-25T09:33:42.441Z","avatar_url":"https://github.com/moonD4rk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# notifier\n\n![CI](https://github.com/moonD4rk/notifier/workflows/CI/badge.svg?branch=main)\n\nnotifier is a simple Go library to send notification to other applications.\n\n## Feature\n\n| Provider                                                     | Code                                                         |\n| ------------------------------------------------------------ | ------------------------------------------------------------ |\n| [DingTalk](https://www.dingtalk.com/en)                      | [provider/dingtalk](https://github.com/moonD4rk/notifier/tree/main/provider/dingtalk) |\n| [Bark](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865) | [provider/bark](https://github.com/moonD4rk/notifier/tree/main/provider/bark) |\n| [Lark](https://www.larksuite.com/en_us/)                     | [provider/lark](https://github.com/moonD4rk/notifier/tree/main/provider/lark) |\n| [Feishu](https://www.feishu.cn/)                             | [provider/feishu](https://github.com/moonD4rk/notifier/tree/main/provider/feishu) |\n| [Server 酱](https://sct.ftqq.com/)                           | [provider/serverchan](https://github.com/moonD4rk/notifier/tree/main/provider/serverchan) |\n\n## Install\n\n`go get -u github.com/moond4rk/notifier`\n\n## Usage\n\n\n\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/moond4rk/notifier\"\n)\n\nfunc main() {\n\tvar (\n\t\tdingtalkToken     = os.Getenv(\"dingtalk_token\")\n\t\tdingtalkSecret    = os.Getenv(\"dingtalk_secret\")\n\t\tbarkKey           = os.Getenv(\"bark_key\")\n\t\tbarkServer        = notifier.DefaultBarkServer\n\t\tfeishuToken       = os.Getenv(\"feishu_token\")\n\t\tfeishuSecret      = os.Getenv(\"feishu_secret\")\n\t\tlarkToken         = os.Getenv(\"lark_token\")\n\t\tlarkSecret        = os.Getenv(\"lark_secret\")\n\t\tserverChanUserID  = \"\" // server chan's userID could be empty\n\t\tserverChanSendKey = os.Getenv(\"server_chan_send_key\")\n\t)\n\tnotifier := notifier.New(\n\t\tnotifier.WithDingTalk(dingtalkToken, dingtalkSecret),\n\t\tnotifier.WithBark(barkKey, barkServer),\n\t\tnotifier.WithFeishu(feishuToken, feishuSecret),\n\t\tnotifier.WithLark(larkToken, larkSecret),\n\t\tnotifier.WithServerChan(serverChanUserID, serverChanSendKey),\n\t)\n\n\tvar (\n\t\tsubject = \"this is subject\"\n\t\tcontent = \"this is content\"\n\t)\n\tif err := notifier.Send(subject, content); err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\n\u003cimg src=\"https://raw.githubusercontent.com/moonD4rk/staticfiles/master/picture/notifier-screenshot.png\" width=\"480\" align=\"left\"/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoond4rk%2Fnotifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoond4rk%2Fnotifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoond4rk%2Fnotifier/lists"}