Documentation ¶
Index ¶
- Variables
- type Backend
- func (b *Backend) AddUser(ctx context.Context, userID string, conn connector.Connector, ...) (bool, error)
- func (b *Backend) Close(ctx context.Context) error
- func (b *Backend) GetDelimiter() string
- func (b *Backend) GetMailboxMessageCounts(ctx context.Context, userID string) (map[imap.MailboxID]int, error)
- func (b *Backend) GetState(ctx context.Context, username string, password []byte, sessionID int) (*state.State, error)
- func (b *Backend) NewUserID() string
- func (b *Backend) ReleaseState(ctx context.Context, st *state.State) error
- func (b *Backend) RemoveUser(ctx context.Context, userID string, removeFiles bool) error
- type StateUserInterfaceImpl
- func (s *StateUserInterfaceImpl) GenerateUIDValidity() (imap.UID, error)
- func (s *StateUserInterfaceImpl) GetDB() db.Client
- func (s *StateUserInterfaceImpl) GetDelimiter() string
- func (s *StateUserInterfaceImpl) GetRecoveredMessageHashesMap() *utils.MessageHashesMap
- func (s *StateUserInterfaceImpl) GetRecoveryMailboxID() db.MailboxIDPair
- func (s *StateUserInterfaceImpl) GetRemote() state.Connector
- func (s *StateUserInterfaceImpl) GetStore() *store.WriteControlledStore
- func (s *StateUserInterfaceImpl) GetUserID() string
- func (s *StateUserInterfaceImpl) QueueOrApplyStateUpdate(ctx context.Context, tx db.Transaction, updates ...state.Update) error
- func (s *StateUserInterfaceImpl) ReleaseState(ctx context.Context, st *state.State) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoSuchUser = errors.New("no such user") ErrLoginBlocked = errors.New("too many login attempts") )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func (*Backend) AddUser ¶
func (b *Backend) AddUser(ctx context.Context, userID string, conn connector.Connector, passphrase []byte, uidValidityGenerator imap.UIDValidityGenerator) (bool, error)
AddUser adds a new user to the backend. It returns true if the user's database was created, false if it already existed.
func (*Backend) GetDelimiter ¶ added in v0.10.0
func (*Backend) GetMailboxMessageCounts ¶ added in v0.14.0
func (*Backend) ReleaseState ¶ added in v0.12.0
type StateUserInterfaceImpl ¶ added in v0.12.0
type StateUserInterfaceImpl struct {
// contains filtered or unexported fields
}
StateUserInterfaceImpl should be used to interface with the user type from a State type. This is meant to control the API boundary layer.
func (*StateUserInterfaceImpl) GenerateUIDValidity ¶ added in v0.15.0
func (s *StateUserInterfaceImpl) GenerateUIDValidity() (imap.UID, error)
func (*StateUserInterfaceImpl) GetDB ¶ added in v0.12.0
func (s *StateUserInterfaceImpl) GetDB() db.Client
func (*StateUserInterfaceImpl) GetDelimiter ¶ added in v0.12.0
func (s *StateUserInterfaceImpl) GetDelimiter() string
func (*StateUserInterfaceImpl) GetRecoveredMessageHashesMap ¶ added in v0.17.0
func (s *StateUserInterfaceImpl) GetRecoveredMessageHashesMap() *utils.MessageHashesMap
func (*StateUserInterfaceImpl) GetRecoveryMailboxID ¶ added in v0.14.0
func (s *StateUserInterfaceImpl) GetRecoveryMailboxID() db.MailboxIDPair
func (*StateUserInterfaceImpl) GetRemote ¶ added in v0.12.0
func (s *StateUserInterfaceImpl) GetRemote() state.Connector
func (*StateUserInterfaceImpl) GetStore ¶ added in v0.12.0
func (s *StateUserInterfaceImpl) GetStore() *store.WriteControlledStore
func (*StateUserInterfaceImpl) GetUserID ¶ added in v0.12.0
func (s *StateUserInterfaceImpl) GetUserID() string
func (*StateUserInterfaceImpl) QueueOrApplyStateUpdate ¶ added in v0.12.0
func (s *StateUserInterfaceImpl) QueueOrApplyStateUpdate(ctx context.Context, tx db.Transaction, updates ...state.Update) error
func (*StateUserInterfaceImpl) ReleaseState ¶ added in v0.12.0
Click to show internal directories.
Click to hide internal directories.