session

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 36 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 Session

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

func New

func New(
	conn net.Conn,
	backend *backend.Backend,
	sessionID int,
	version version.Info,
	profiler profiling.CmdProfilerBuilder,
	eventCh chan<- events.Event,
	idleBulkTime time.Duration,
	panicHandler async.PanicHandler,
) *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

Jump to

Keyboard shortcuts

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