From 6ac9b1bb3a515aea46fab67ed5fc9a508392f39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Tue, 11 Feb 2025 20:09:29 +0100 Subject: [PATCH] Add README.md --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b36e5c9 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# natstonotify + +Small service which uses NATS to create notifications. + +## Usage + +```text +NAME: + natstonotify - NATS-powered notification service + +USAGE: + natstonotify [global options] [command [command options]] + +COMMANDS: + server Start the server + notify, n Send a notification + help, h Shows a list of commands or help for one command + +GLOBAL OPTIONS: + --help, -h show help +``` + +## Message format + +The services expects messages published to `home2rjusnet.notifications`. + +The messages should contain the following as JSON. + +```go +type BusNotification struct { + ID uint32 `json:"id,omitempty"` + Summary string `json:"summary"` + Body string `json:"body,omitempty"` + Timeout time.Duration `json:"timeout,omitempty"` +} +``` +