import cloudeng.io/file/content/processors
Package processor provides support for processing different content types.
Types
Type Email
type Email struct{}
Type EmailDoc
type EmailDoc struct {
From string // Email address of the sender
To []*mail.Address // List of recipient email addresses
Subject string // Subject of the email
Date string // Date the email was sent
Body []byte // Body of the email
Raw []byte // Raw email content
Labels []string // Labels or tags associated with the email
}
Methods
func (EmailDoc) Parse(rawEmail []byte) (EmailDoc, error)
Type HTML
type HTML struct{}
HTML provides support for processing HTML documents.
Methods
func (ho HTML) Parse(rd io.Reader) (HTMLDoc, error)
Type HTMLDoc
type HTMLDoc struct {
// contains filtered or unexported fields
}
Methods
func (ho HTMLDoc) HREFs(base string) ([]string, error)
HREFs returns the hrefs found in the provided HTML document.
func (ho HTMLDoc) Title() string