Documentation ¶
Index ¶
- Variables
- func ParseAddress(input string) ([]*mail.Address, error)
- func ParseAddressList(input string) ([]*mail.Address, error)
- func ParseDateTime(input string) (time.Time, error)
- func ValidateMessageHeaderFields(literal []byte) error
- type BacktrackingByteScanner
- func (bs *BacktrackingByteScanner) Read(dst []byte) (int, error)
- func (bs *BacktrackingByteScanner) ReadByte() (byte, error)
- func (bs *BacktrackingByteScanner) ReadBytes(delim byte) ([]byte, error)
- func (bs *BacktrackingByteScanner) RestoreState(scope BacktrackingByteScannerScope)
- func (bs *BacktrackingByteScanner) SaveState() BacktrackingByteScannerScope
- type BacktrackingByteScannerScope
- type Parser
- type ParserState
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidMessage = errors.New("invalid rfc5322 message")
Functions ¶
func ValidateMessageHeaderFields ¶ added in v0.17.0
ValidateMessageHeaderFields checks the headers of message to verify that: * From and Date are present. * If From has multiple addresses, a Sender field must be present. * If Both From and Sender are present and they contain one address, they must not be equal.
Types ¶
type BacktrackingByteScanner ¶
type BacktrackingByteScanner struct {
// contains filtered or unexported fields
}
func NewBacktrackingByteScanner ¶
func NewBacktrackingByteScanner(data []byte) *BacktrackingByteScanner
func (*BacktrackingByteScanner) Read ¶
func (bs *BacktrackingByteScanner) Read(dst []byte) (int, error)
func (*BacktrackingByteScanner) ReadByte ¶
func (bs *BacktrackingByteScanner) ReadByte() (byte, error)
func (*BacktrackingByteScanner) ReadBytes ¶
func (bs *BacktrackingByteScanner) ReadBytes(delim byte) ([]byte, error)
func (*BacktrackingByteScanner) RestoreState ¶
func (bs *BacktrackingByteScanner) RestoreState(scope BacktrackingByteScannerScope)
func (*BacktrackingByteScanner) SaveState ¶
func (bs *BacktrackingByteScanner) SaveState() BacktrackingByteScannerScope
type BacktrackingByteScannerScope ¶
type BacktrackingByteScannerScope struct {
// contains filtered or unexported fields
}
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) RestoreState ¶
func (p *Parser) RestoreState(s ParserState)
func (*Parser) SaveState ¶
func (p *Parser) SaveState() ParserState
type ParserState ¶
type ParserState struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.