Documentation ¶
Overview ¶
Package rfc822 implements methods for handling RFC822 messages.
Index ¶
- func Encrypt(kr *crypto.KeyRing, r io.Reader) ([]byte, error)
- func GetHeaderValue(literal []byte, key string) (string, error)
- func ParseContentType(val string) (string, map[string]string, error)
- func SetHeaderValue(literal []byte, key, val string) ([]byte, error)
- func Split(b []byte) ([]byte, []byte, error)
- type Header
- func (h *Header) Del(key string)
- func (h *Header) Entries(fn func(key, val string))
- func (h *Header) Fields(fields []string) []byte
- func (h *Header) FieldsNot(fields []string) []byte
- func (h *Header) Get(key string) string
- func (h *Header) GetLine(key string) []byte
- func (h *Header) GetRaw(key string) []byte
- func (h *Header) Has(key string) bool
- func (h *Header) Raw() []byte
- func (h *Header) Set(key, val string)
- type MIMEType
- type MultipartWriter
- type Part
- type Scanner
- type Section
- func (section *Section) Body() []byte
- func (section *Section) Children() []*Section
- func (section *Section) ContentType() (string, map[string]string, error)
- func (section *Section) Header() []byte
- func (section *Section) Identifier() []int
- func (section *Section) Literal() []byte
- func (section *Section) ParseHeader() *Header
- func (section *Section) Part(identifier ...int) *Section
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHeaderValue ¶
GetHeaderValue is a helper method that queries a header value in a message literal.
func SetHeaderValue ¶
SetHeaderValue is a helper method that sets a header value in a message literal.
Types ¶
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
func ParseHeader ¶
TODO: This is shitty -- should use a real generated parser like the IMAP parser or the RFC5322 parser.
type MultipartWriter ¶
type MultipartWriter struct {
// contains filtered or unexported fields
}
func NewMultipartWriter ¶
func NewMultipartWriter(w io.Writer, boundary string) *MultipartWriter
func (*MultipartWriter) Done ¶
func (w *MultipartWriter) Done() error
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
func (*Section) ContentType ¶
func (*Section) Identifier ¶
func (*Section) ParseHeader ¶
Click to show internal directories.
Click to hide internal directories.