gmailcontent

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

func DecodeBase64URLBytes(value string) ([]byte, error)

DecodeBase64URLBytes decodes Gmail body data with padded and standard fallbacks.

func DecodeBodyCharset

func DecodeBodyCharset(data []byte, contentType string) []byte

DecodeBodyCharset decodes a MIME body according to contentType.

func DecodeTransferEncoding

func DecodeTransferEncoding(data []byte, encoding string) []byte

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

func LooksLikeHTML(value string) bool

LooksLikeHTML reports whether value appears to contain an HTML document.

func StripHTMLTags

func StripHTMLTags(value string) string

StripHTMLTags removes script, style, and markup for plain-text presentation.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL