Documentation
¶
Index ¶
- func BestBodyForDisplay(part *gmail.MessagePart) (string, bool)
- func BestBodyHTML(part *gmail.MessagePart) string
- func BestBodyText(part *gmail.MessagePart) string
- func DecodeBase64URLBytes(value string) ([]byte, error)
- func DecodeBodyCharset(data []byte, contentType string) []byte
- func DecodeTransferEncoding(data []byte, encoding string) []byte
- func FindPartBody(part *gmail.MessagePart, mimeType string) string
- func LooksLikeHTML(value string) bool
- func StripHTMLTags(value string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BestBodyForDisplay ¶
func BestBodyForDisplay(part *gmail.MessagePart) (string, bool)
BestBodyForDisplay returns the preferred display body and whether it is HTML.
func BestBodyHTML ¶
func BestBodyHTML(part *gmail.MessagePart) string
BestBodyHTML prefers an HTML body and falls back to plain text.
func BestBodyText ¶
func BestBodyText(part *gmail.MessagePart) string
BestBodyText prefers a plain body and falls back to HTML.
func DecodeBase64URLBytes ¶
DecodeBase64URLBytes decodes Gmail body data with padded and standard fallbacks.
func DecodeBodyCharset ¶
DecodeBodyCharset decodes a MIME body according to contentType.
func DecodeTransferEncoding ¶
DecodeTransferEncoding conservatively decodes MIME transfer encoding.
func FindPartBody ¶
func FindPartBody(part *gmail.MessagePart, mimeType string) string
FindPartBody finds and decodes the first nested part matching mimeType.
func LooksLikeHTML ¶
LooksLikeHTML reports whether value appears to contain an HTML document.
func StripHTMLTags ¶
StripHTMLTags removes script, style, and markup for plain-text presentation.
Types ¶
This section is empty.