Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) AttachPublicKey ¶
func (*Parser) NewVisitor ¶
func (p *Parser) NewVisitor(defaultRule VisitorRule) *Visitor
type Part ¶
type Part struct { Header message.Header Body []byte // contains filtered or unexported fields }
func (*Part) ConvertMetaCharset ¶
func (*Part) ConvertToUTF8 ¶
type Visitor ¶
type Visitor struct {
// contains filtered or unexported fields
}
func (*Visitor) RegisterRule ¶
func (v *Visitor) RegisterRule(contentTypeRegex string, fn VisitorRule) *Visitor
RegisterRule defines what to do when visiting a part whose content type matches the given regular expression. If a part matches multiple rules, the one registered first will be used.
type VisitorRule ¶
type Walker ¶
type Walker struct {
// contains filtered or unexported fields
}
func (*Walker) RegisterContentDispositionHandler ¶
func (w *Walker) RegisterContentDispositionHandler(dispRegExp string, fn HandlerFunc) *Walker
RegisterContentDispositionHandler registers a handler that will be called when a part's content disposition matches the given regular expression. If a part matches multiple handlers, the one registered first will be chosen.
func (*Walker) RegisterContentTypeHandler ¶
func (w *Walker) RegisterContentTypeHandler(typeRegExp string, fn HandlerFunc) *Walker
RegisterContentTypeHandler registers a handler that will be called when a part's content type matches the given regular expression. If a part matches multiple handlers, the one registered first will be chosen.
func (*Walker) RegisterDefaultHandler ¶
func (w *Walker) RegisterDefaultHandler(fn HandlerFunc) *Walker
RegisterDefaultHandler registers a handler that will be called on every part that doesn't match a registered content type/disposition handler.