Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DocumentBoundary = []byte("\n---\n")
DocumentBoundary determines where markdown files are chunked.
Functions ¶
func PathAutoJoin ¶
PathAutoJoin appends prefix to file path, if file path is relative, handles URL paths correctly.
Types ¶
type DocumentChunkReader ¶
type DocumentChunkReader struct {
// contains filtered or unexported fields
}
DocumentChunkReader provides a reader interface to a document reader. Seperates the stream into chunks by detecting provided boundary.
func NewDocumentChunkReader ¶
func NewDocumentChunkReader(r io.Reader, boundary []byte) *DocumentChunkReader
NewDocumentChunkReader returns a reader with pre-loaded buffer.
func (*DocumentChunkReader) Next ¶
func (d *DocumentChunkReader) Next() bool
Next returns "true" if there is another document that can be read in the stream.
type Message ¶
type Message struct { Source string // file from which the message is generated Current *Participant Date string Subject string From string ReplyTo string Comments string Keywords string To *[]Participant CC *[]Participant ListID string BCC *[]Participant UnsubscribeContact *Participant UnsubscribeLink *url.URL Attachments []string Body []byte Data map[string]interface{} }
Message models an email message.
func (*Message) MIMEHeader ¶
func (m *Message) MIMEHeader() textproto.MIMEHeader
MIMEHeader provides MIME fields for the renderer.
type Participant ¶
Participant is a person or agent in "to", "from", "cc", and "bcc" fields.
func (Participant) String ¶
func (p Participant) String() string
type ViperLoader ¶
type ViperLoader struct{}
ViperLoader constructs message using viper config parser from a markdown file.