mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-07 06:57:37 +03:00
The intention is to keep to repo root clean while the list of packages is slowly growing. Additionally, a bunch of small (~30 LoC) files in the repo root is merged into a single maddy.go file, for the same reason. Most of the internal code is moved into the internal/ directory. Go toolchain will make it impossible to import these packages from external applications. Some packages are renamed and moved into the pkg/ directory in the root. According to https://github.com/golang-standards/project-layout this is the de-facto standard to place "library code that's ok to use by external applications" in. To clearly define the purpose of top-level directories, README.md files are added to each.
16 lines
500 B
Go
16 lines
500 B
Go
package module
|
|
|
|
import imapbackend "github.com/emersion/go-imap/backend"
|
|
|
|
// Storage interface is a slightly modified go-imap's Backend interface
|
|
// (authentication is removed).
|
|
type Storage interface {
|
|
// GetOrCreateUser returns User associated with user account specified by
|
|
// name.
|
|
//
|
|
// If it doesn't exists - it should be created.
|
|
GetOrCreateUser(username string) (imapbackend.User, error)
|
|
|
|
// Extensions returns list of IMAP extensions supported by backend.
|
|
IMAPExtensions() []string
|
|
}
|