{"id":18815208,"url":"https://github.com/thomas-maurice/gotify-nats-plugin","last_synced_at":"2025-10-07T17:45:43.268Z","repository":{"id":240389459,"uuid":"802504106","full_name":"thomas-maurice/gotify-nats-plugin","owner":"thomas-maurice","description":"Gotify plugin to get notifications through NATS","archived":false,"fork":false,"pushed_at":"2024-05-18T20:07:50.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-19T14:37:24.715Z","etag":null,"topics":["gotify","gotify-plugin","nats"],"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/thomas-maurice.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":"2024-05-18T13:33:53.000Z","updated_at":"2024-06-19T12:29:07.424Z","dependencies_parsed_at":"2024-05-18T14:36:33.512Z","dependency_job_id":"e8dfe2a4-732a-4c52-b78b-7159be2e24bb","html_url":"https://github.com/thomas-maurice/gotify-nats-plugin","commit_stats":null,"previous_names":["thomas-maurice/gotify-nats-plugin"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-maurice%2Fgotify-nats-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-maurice%2Fgotify-nats-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-maurice%2Fgotify-nats-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-maurice%2Fgotify-nats-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomas-maurice","download_url":"https://codeload.github.com/thomas-maurice/gotify-nats-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239752154,"owners_count":19690972,"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":["gotify","gotify-plugin","nats"],"created_at":"2024-11-07T23:48:05.268Z","updated_at":"2025-10-07T17:45:43.139Z","avatar_url":"https://github.com/thomas-maurice.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gotify-nats-plugin\n\nThis is a plugin to get notifications from NATS.\n\n## How does it work ?\nThe plugin subscribes to a NATS subject and expects messages matching this structure:\n```go\ntype NatsJSONMessage struct {\n\tPriority int     `json:\"priority\"`  // Optional: Priority of the message (0-10)\n\tTitle    string  `json:\"title\"`     // Optional: Title of the notification\n\tMessage  string  `json:\"message\"`   // Message of the notification\n\tMarkdown *bool   `json:\"markdown\"`  // Optional: Format the message as markdown ?\n\tURL      *string `json:\"url\"`       // Optional: Click URL for Android notifications\n}\n```\n\nAn example payload would look like this\n```json\n{\n  \"title\": \"hello **WORLD** 3\",\n  \"message\": \"this is **the message**\",\n  \"priority\": 10,\n  \"markdown\": false,\n  \"url\": \"https://google.fr\"\n}\n```\n\nTo send it via the nats-cli:\n```bash\n$ nats pub gotify '{\"title\": \"hello world\", \"message\": \"this is **the message**\", \"priority\": 10, \"markdown\": false, \"url\": \"https://google.fr\"}'\n```\n\n## Supported authentication schemes\n\nThe following authentication schemes are supported when connecting to a NATS server/cluster:\n\n* No authentication (boooooo)\n* Token\n* Username/Password\n* NKEY\n* NKEY + JWT token when the accounts are managed via an operator\n\nNote that for now self signed certificates are not supported.\n\n## Configuration\nThe plugin can be configured as so in the plugin config screen:\n```yaml\n---\n# URL of the nats server you are going to connect to\nnats_server_url: nats://localhost:4222\n# Subject to listen on for messages\n# Note that the subject can be a wildcard like one of these\n#  - gotify\n#  - gotify.*\n#  - gotify.\u003e\nsubject: gotify\n# Should we render the messages as markdown by default ?\n# you can still opt out by setting `markdown` to false in\n# the NATS payload\nmarkdown: true\n# Default priority if none is specified\ndefault_message_priority: 5\n# Authentication config -- delete if no authentication is needed\nauth:\n  # token is used *only* for token auth\n  token: foobar\n  # username/password are used solely for username/password auth\n  username: foo\n  password: bar\n  # nkey can be used on it's own, or in conjunction with a user JWT\n  nkey: SUALLJRV33UOFX7TNHYFXP43YVQDAM4N3FEGP2W62EOHKYA7UFI7GCU6JU\n  # jwt *must* be used in conjunction with an nkey, this is the case\n  # where you are authenticating with an identity created by a NATS\n  # operator\n  jwt: ey..........[long jwt]......\n# do we print debug messages ?\ndebug: false\n```\n\n## Compatibility matrix\n\nGiven the rapid development of NATS compared to Gotify and the number of core libs they share in common (`x/crypto` mainly)\nit is very hard and annoying (or even impossible) to release versions of the plugin for the X latest versions of Gotify. Indeed these will cause conflicts when trying to import the plugin.\n\nThis is because for example a reasonably recent version of NATS is going to require `x/crypto@v0.17.0` when Gotify will be compiled with `v0.13.0` for example.\n\nI will try to put some effort at some point to make it better, but please assume that the released binaries are going to work for whichever version of Gotify was the stable one at the time.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-maurice%2Fgotify-nats-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomas-maurice%2Fgotify-nats-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-maurice%2Fgotify-nats-plugin/lists"}