session

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package session handles IMAP commands received from clients within a single IMAP session (one client connection).

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCreateInbox = errors.New("cannot create INBOX")
	ErrDeleteInbox = errors.New("cannot delete INBOX")
	ErrReadOnly    = errors.New("the mailbox is read-only")

	ErrTLSUnavailable       = errors.New("TLS is unavailable")
	ErrNotAuthenticated     = errors.New("session is not authenticated")
	ErrAlreadyAuthenticated = errors.New("session is already authenticated")

	ErrNotImplemented = errors.New("not implemented")
)
View Source
var ErrFlagRecentIsReserved = errors.New(`system flag \Recent is reserved`)

Functions

This section is empty.

Types

type IMAPCommand

type IMAPCommand struct {
	*proto.Command
	// contains filtered or unexported fields
}

type ParserError

type ParserError struct {
	// contains filtered or unexported fields
}

func (*ParserError) Error

func (pe *ParserError) Error() string

type Session

type Session struct {
	// contains filtered or unexported fields
}

func New

func New(conn net.Conn, backend *backend.Backend, sessionID int, eventCh chan<- events.Event) *Session

func (*Session) Serve

func (s *Session) Serve(ctx context.Context) error

func (*Session) SetIncomingLogger

func (s *Session) SetIncomingLogger(w io.Writer)

func (*Session) SetOutgoingLogger

func (s *Session) SetOutgoingLogger(w io.Writer)

func (*Session) SetTLSConfig

func (s *Session) SetTLSConfig(cfg *tls.Config)

func (*Session) WriteResponse

func (s *Session) WriteResponse(res string) error

type UnmarshalError

type UnmarshalError struct {
	// contains filtered or unexported fields
}

func (*UnmarshalError) Error

func (e *UnmarshalError) Error() string

Jump to

Keyboard shortcuts

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