summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2023-02-26 21:36:27 +0100
committerJannis M. Hoffmann <jannis@fehcom.de>2023-02-26 21:36:27 +0100
commit2abf462ca10c4ac8c4f815e608cad31851e966e3 (patch)
treeed18c4a4039a5972edc0b81ed79c9d57480f8e70 /README.md
parentd0ffe11bd365b68d4da252b39d06d99f75d8cacb (diff)
Specified the interface for qmauth
Changes to configuration Added qmauth version written in Python Slight changes to pagination
Diffstat (limited to 'README.md')
-rw-r--r--README.md84
1 files changed, 84 insertions, 0 deletions
diff --git a/README.md b/README.md
index 06185ec..3ab120c 100644
--- a/README.md
+++ b/README.md
@@ -143,3 +143,87 @@ Process overview
The Webserver acts as a proxy to the Application Server.
The Extractor is a stateless process that reads mails from a source.
+
+## Extractor Interface Definition
+
+Stateless Service - `net.fehcom.JWebmail.QMAuth.Maildir.repository` v0.1.0
+
+ struct MailAddress {
+ display_name: unicode_text,
+ address: unicode_text,
+ }
+
+ struct TopHead {
+ byte_size: uint64,
+ unread: bool,
+ date_received: iso8601,
+ message_handle: unicode_text,
+ head: Head,
+ }
+
+ struct Head {
+ date: iso8601,
+
+ from: Array[MailAddress],
+ sender: Array[MailAddress],
+ reply_to: Array[MailAddress],
+
+ to: Array[MailAddress],
+ cc: Array[MailAddress],
+ bcc: Array[MailAddress],
+
+ subject: unicode_text,
+ comments: unicode_text,
+ keywords: unicode_text,
+
+ mime: MIMEHeader,
+ }
+
+ sturct MIMEHeader {
+ content_maintype: unicode_text,
+ content_subtype: unicode_text,
+ content_disposition: unicode_text,
+ filename: unicode_text,
+ }
+
+ struct MIMEPart {
+ head: MIMEHeader,
+ body: Body,
+ }
+
+ enum Body {
+ discrete(unicode_text),
+ multipart{
+ preamble: unicode_text,
+ parts: Array[MIMEPart],
+ epilogue: unicode_text,
+ },
+ message(Message),
+ }
+
+ // body is either a string (discrete), an array (multipart) or object (message)
+ // depending on the content type
+ struct Message {
+ head: Head,
+ body: Body,
+ }
+
+ struct CountResult {
+ byte_size: uint64,
+ total_mails: uint32,
+ unread_mails: uint32,
+ }
+
+ fn __start__(maildir_directory: filepath, os_user: unicode_text, mail_user: unicode_text)
+
+ fn list(subfolder: unicode_text, start: uint32, end: uint32, sort_by: unicode_text) -> Array[TopHead]
+
+ fn count(folder: unicode_text) -> CountResult
+
+ fn read(folder: unicode_text, mid: unicode_text) -> Message
+
+ fn folders() -> Array[unicode_text]
+
+ fn move(mid: unicode_text, from_folder: unicode_text, to_folder: unicode_text)
+
+ fn search(pattern: unicode_text, folder: unicode_text) -> Array[Message]