Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureCRLF ¶
Types ¶
type Capabilities ¶
type Capabilities struct { Implementation string `managesieve:"IMPLEMENTATION"` // MUST be present SASL []string `managesieve:"SASL"` // Sieve []string `managesieve:"SIEVE"` // MUST be present StartTLS bool `managesieve:"STARTTLS"` // MaxRedirects int `managesieve:"MAXREDIRECTS"` // may be missing; 0 = no limit Notify []string `managesieve:"NOTIFY"` // may be empty if the server does not support enotify Language string `managesieve:"LANGUAGE"` // RFC4656; empty = i-default (RFC2277) Owner string `managesieve:"OWNER"` // may be present only when authenticated Version string `managesieve:"VERSION"` // MUST be present }
func ParseCapabilities ¶
func ParseCapabilities(content []string) (capabilities *Capabilities, err error)
type Client ¶
type Client interface { Close() error RawCmd(format string, args ...any) ([]string, string, error) Login(user, pass string) (string, error) StartTLS() (string, error) Logout() error Capability() (string, error) HaveSpace(name string, size int64) (string, error) ListScripts() ([]Script, string, error) }
type Logger ¶
type Logger interface { SetOutput(w io.Writer) SetPrefix(string) Printf(string, ...any) Println(...any) }
Logger represents the logger functionalities required by the client
type OptionFn ¶
type OptionFn func(params *parameters) error
func WithDialTimeout ¶
func WithLogger ¶
type RawCommand ¶
type RawCommand string
type WireCommand ¶
type WireCommand = string
const ( Authenticate WireCommand = `AUTHENTICATE` StartTLS WireCommand = `STARTTLS` Logout WireCommand = `LOGOUT` Capability WireCommand = `CAPABILITY` HaveSpace WireCommand = `HAVESPACE` PutScript WireCommand = `PUTSCRIPT` ListScripts WireCommand = `LISTSCRIPTS` SetActive WireCommand = `SETACTIVE` GetScript WireCommand = `GETSCRIPT` DeleteScript WireCommand = `DELETESCRIPT` RenameScript WireCommand = `RENAMESCRIPT` CheckScript WireCommand = `CHECKSCRIPT` NoOp WireCommand = `NOOP` Unauthenticate WireCommand = `UNAUTHENTICATE` )
Click to show internal directories.
Click to hide internal directories.