angelos.lib.policy.message¶
Generate and verify messages.
-
class
angelos.lib.policy.message.
EnvelopePolicy
¶ Bases:
angelos.lib.policy.policy.Policy
Envelope handling policy.
-
static
open
(recipient: angelos.lib.policy.portfolio.PrivatePortfolio, sender: angelos.lib.policy.portfolio.Portfolio, envelope: angelos.document.envelope.Envelope) → Union[angelos.document.messages.Note, angelos.document.messages.Instant, angelos.document.messages.Mail, angelos.document.messages.Share, angelos.document.messages.Report]¶ Open an envelope and unveil the message.
-
static
receive
(recipient: angelos.lib.policy.portfolio.PrivatePortfolio, envelope: angelos.document.envelope.Envelope) → angelos.document.envelope.Envelope¶ Receive the envelope when it reaches its final domain.
-
static
route
(router: angelos.lib.policy.portfolio.PrivatePortfolio, envelope: angelos.document.envelope.Envelope) → angelos.document.envelope.Envelope¶ Sign an envelope header.
-
static
wrap
(sender: angelos.lib.policy.portfolio.PrivatePortfolio, recipient: angelos.lib.policy.portfolio.Portfolio, message: Union[angelos.document.messages.Note, angelos.document.messages.Instant, angelos.document.messages.Mail, angelos.document.messages.Share, angelos.document.messages.Report]) → angelos.document.envelope.Envelope¶ Wrap a message in an envelope.
-
static
-
class
angelos.lib.policy.message.
MailBuilder
(sender: angelos.lib.policy.portfolio.PrivatePortfolio, mail: angelos.document.messages.Mail)¶ Bases:
object
Mail building class.
-
add
(name: unicode, data: bytes, mime: unicode)¶ Add an attachment to the mail.
-
done
() → angelos.document.messages.Mail¶ Finalize the mail message.
-
draft
() → angelos.document.messages.Mail¶ Export draft mail document
-
message
(subject: unicode, body: unicode, reply: Union[angelos.document.messages.Mail, uuid.UUID] = None)¶ Add mail body, subject and reply-to.
-
-
class
angelos.lib.policy.message.
MessagePolicy
¶ Bases:
angelos.lib.policy.policy.Policy
Generate messages.
-
static
instant
(sender: angelos.lib.policy.portfolio.PrivatePortfolio, recipient: angelos.lib.policy.portfolio.Portfolio, data: bytes, mime: unicode, reply: angelos.document.messages.Instant = None) → angelos.document.messages.Instant¶ Issue an instant message.
-
static
mail
(sender: angelos.lib.policy.portfolio.PrivatePortfolio, recipient: angelos.lib.policy.portfolio.Portfolio) → angelos.lib.policy.message.MailBuilder¶ Compose a mail by using a mailbuilder.
-
static
note
(sender: angelos.lib.policy.portfolio.PrivatePortfolio, recipient: angelos.lib.policy.portfolio.Portfolio, body: unicode, reply: angelos.document.messages.Note = None) → angelos.document.messages.Note¶ Issue a note.
-
static
report
(sender: angelos.lib.policy.portfolio.PrivatePortfolio, recipient: angelos.lib.policy.portfolio.Portfolio) → angelos.lib.policy.message.ReportBuilder¶ Compose a report by using a mailbuilder.
Compose a share of documents by using a mailbuilder.
-
static
-
class
angelos.lib.policy.message.
MimeTypes
(value)¶ Bases:
enum.Enum
An enumeration.
-
AAC
= 'audio/aac'¶
-
BMP
= 'image/bmp'¶
-
CALENDAR
= 'text/calendar'¶
-
H261
= 'video/h261'¶
-
H263
= 'video/h263'¶
-
H264
= 'video/h264'¶
-
H265
= 'video/h265'¶
-
HTML
= 'text/html'¶
-
JPEG
= 'image/jpeg'¶
-
MARKDOWN
= 'text/markdown'¶
-
MP4
= 'video/mp4'¶
-
MP4_A
= 'audio/mp4'¶
-
MPEG
= 'video/mpeg'¶
-
MPEG_A
= 'audio/mpeg'¶
-
OGG
= 'video/ogg'¶
-
PNG
= 'image/png'¶
-
QUICKTIME
= 'video/quicktime'¶
-
RTF
= 'text/rtf'¶
-
TEXT
= 'text/plain'¶
-
TIFF
= 'image/tiff'¶
-
VCARD
= 'text/vcard'¶
-
VORBIS
= 'audio/vorbis'¶
-
WEBM
= 'audio/webm'¶
-
WEBP
= 'image/webp'¶
-
ZIP
= 'application/zip'¶
-
-
class
angelos.lib.policy.message.
ReportBuilder
(sender: angelos.lib.policy.portfolio.PrivatePortfolio, mail: angelos.document.messages.Mail)¶ Bases:
angelos.lib.policy.message.MailBuilder
Build a report message.
-
report
(message: Union[angelos.document.messages.Note, angelos.document.messages.Instant, angelos.document.messages.Mail, angelos.document.messages.Share, angelos.document.messages.Report], envelope: angelos.document.envelope.Envelope, claims: List[str], msg: unicode) → angelos.document.messages.Report¶ Create a Share message containing documents to be shared.
-
-
class
angelos.lib.policy.message.
ReportType
(value)¶ Bases:
enum.Enum
An enumeration.
-
ADULT
= 'Adult'¶
-
BLACKMAIL
= 'Blackmail'¶
-
CONSPIRACY
= 'Conspiracy'¶
-
DEFAMATION
= 'Defamation'¶
-
GRAPHIC
= 'Graphic'¶
-
HARASSMENT
= 'Harassment'¶
-
HARMFUL
= 'Harmful'¶
-
HATEFUL
= 'Hateful'¶
-
MENACE
= 'Menace'¶
-
OFFENSIVE
= 'Offensive'¶
-
SEDITION
= 'Sedition'¶
-
SOLICITATION
= 'Solicitation'¶
-
SPAM
= 'Spam'¶
-
SUSPICIOUS
= 'Suspicious'¶
-
UNSOLICITED
= 'Unsolicited'¶
-
Bases:
angelos.lib.policy.message.MailBuilder
Create a Share message containing documents to be shared.