Documentation
¶
Index ¶
Constants ¶
View Source
const VersionMajor = 0
View Source
const VersionMinor = 1
View Source
const VersionPatch = 0
View Source
const VersionStr = "0.1"
View Source
const VersionSuppl = ""
Variables ¶
View Source
var ( ErrUserAlreadyExists = errors.New("imap: user already exists") ErrUserDoesntExists = errors.New("imap: user doesn't exists") )
Functions ¶
This section is empty.
Types ¶
type AppendLimitBackend ¶
type AppendLimitBackend interface {
appendlimit.Backend
// SetMessageLimit sets new value for limit.
// nil pointer means no limit.
SetMessageLimit(val *uint32) error
}
AppendLimitBackend is extension for main backend interface (backend.Backend) which allows to set append limit value for testing and administration purposes.
type AppendLimitMbox ¶
type AppendLimitMbox interface {
CreateMessageLimit() *uint32
// SetMessageLimit sets new value for limit.
// nil pointer means no limit.
SetMessageLimit(val *uint32) error
}
AppendLimitMbox is extension for backend.Mailbox interface which allows to set append limit value for testing and administration purposes.
type AppendLimitUser ¶
type AppendLimitUser interface {
appendlimit.User
// SetMessageLimit sets new value for limit.
// nil pointer means no limit.
SetMessageLimit(val *uint32) error
}
AppendLimitUser is extension for backend.User interface which allows to set append limit value for testing and administration purposes.
type IMAPUsersDB ¶
type UsersDB ¶
type UsersDB interface {
// CreateUser creates new user with specified username.
//
// No mailboxes are created for new user, even INBOX. This should be done
// manually using CreateMailbox.
//
// It is error to create user which already exists. ErrUserAlreadyExists
// will be returned in this case.
CreateUser(username, password string) error
// DeleteUser deletes user account from backend storage, along with all
// mailboxes and messages.
//
// It is error to delete user which doesn't exists. ErrUserDoesntExists
// will be returned in this case.
DeleteUser(username string) error
// SetUserPassword updates password of existsing user.
//
// It is error to update user which doesn't exists. ErrUserDoesntExists
// will be returned in this case.
SetUserPassword(username, newPassword string) error
}
UsersDB is additional backend interface that allows external code to perform administrative actions on backend's storage related to users.
Click to show internal directories.
Click to hide internal directories.