GODT-1779: Remove go-imap

This commit is contained in:
James Houlahan
2022-08-26 17:00:21 +02:00
parent 3b0bc1ca15
commit 39433fe707
593 changed files with 12725 additions and 91626 deletions

36
tests/api_test.go Normal file
View File

@ -0,0 +1,36 @@
package tests
import (
"github.com/Masterminds/semver/v3"
"github.com/ProtonMail/gluon/rfc822"
"gitlab.protontech.ch/go/liteapi"
"gitlab.protontech.ch/go/liteapi/server"
)
type API interface {
SetMinAppVersion(*semver.Version)
GetHostURL() string
AddCallWatcher(func(server.Call), ...string)
AddUser(username, password, address string) (userID, addrID string, err error)
RevokeUser(userID string) error
GetLabels(userID string) ([]liteapi.Label, error)
AddLabel(userID, name string, labelType liteapi.LabelType) (string, error)
GetMessages(userID string) ([]liteapi.Message, error)
AddMessage(userID, addrID string, labelIDs []string, sender, recipient, subject, body string, mimeType rfc822.MIMEType, read, starred bool) (string, error)
Close()
}
type fakeAPI struct {
*server.Server
}
func newFakeAPI() *fakeAPI {
return &fakeAPI{
Server: server.NewTLS(),
}
}