Documentation
¶
Index ¶
Constants ¶
View Source
const (
ContentTypeMessageRfc822 = "message/rfc822"
)
Variables ¶
View Source
var ( ErrEmptyHeaderBlock = errors.New("empty header block") // ErrorMalformedBase64 name ErrorMalformedBase64 = errors.New("malformed base64") // ErrorMalformedHeader name ErrorMalformedHeader = errors.New("malformed header") // ErrorMissingBoundary name ErrorMissingBoundary = errors.New("missing boundary") // ErrorMissingContentType name ErrorMissingContentType = errors.New("missing Content-Type") // ErrorCharsetConversion name ErrorCharsetConversion = errors.New("character set conversion") // ErrorContentEncoding name ErrorContentEncoding = errors.New("content encoding") )
View Source
var ErrInvalidMediaParameter = errors.New("mime: invalid media parameter")
ErrInvalidMediaParameter is returned by ParseMediaType if the media type value was found but there was an error parsing the optional parameters
Functions ¶
func ParseMediaType ¶
ParseMediaType parses a media type value and any optional parameters, per RFC 1521. Media types are the values in Content-Type and Content-Disposition headers (RFC 2183). On success, ParseMediaType returns the media type converted to lowercase and trimmed of white space and a non-nil map. The returned map, params, maps from the lowercase attribute to the attribute value with its case preserved.
Types ¶
type Part ¶
type Part struct { Descriptor string ContentType string ContentParams map[string]string Disposition string DispositionParams map[string]string Encoding string Charset string Filename string Size int Lines int Parent *Part Subparts []*Part Header textproto.MIMEHeader HeaderReader io.Reader PartOffset, HeaderLen, PartLen int Epilogue []byte Errors []error // contains filtered or unexported fields }
func (*Part) Walk ¶
func (p *Part) Walk(v PartVisitor) error
type PartVisitor ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.