Messages Service

This commit is contained in:
Ben Toogood
2020-10-15 16:59:23 +01:00
parent 62918d0537
commit d5e5ea6012
10 changed files with 892 additions and 688 deletions

38
messages/README.md Normal file
View File

@@ -0,0 +1,38 @@
# Messages Service
The messages service is a simplified service for sending messages, much like email. You can send a message using the CLI:
```bash
> micro messages send --to=John --from=Barry --subject=HelloWorld --text="Hello John"
```
And then list the messages a user has recieved:
```bash
> micro messages list --user=John
{
"messages": [
{
"id": "78efd836-ca51-4163-af43-65985f7c6587",
"to": "John",
"from": "Barry",
"subject": "HelloWorld",
"text": "Hello John",
"sent_at": "1602777240"
}
]
}
```
Or lookup an individual email by ID:
```bash
> micro messages read --id=78efd836-ca51-4163-af43-65985f7c6587
{
"message": {
"id": "78efd836-ca51-4163-af43-65985f7c6587",
"to": "John",
"from": "Barry",
"subject": "HelloWorld",
"text": "Hello John",
"sent_at": "1602777240"
}
}
```