refactor: make pmapi.Client the interface
This commit is contained in:
@ -19,6 +19,7 @@ package imap
|
||||
|
||||
import (
|
||||
"github.com/ProtonMail/proton-bridge/internal/bridge"
|
||||
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||
)
|
||||
|
||||
type configProvider interface {
|
||||
@ -43,7 +44,7 @@ type bridgeUser interface {
|
||||
Logout() error
|
||||
CloseConnection(address string)
|
||||
GetStore() storeUserProvider
|
||||
GetTemporaryPMAPIClient() bridge.PMAPIProvider
|
||||
GetTemporaryPMAPIClient() pmapi.Client
|
||||
}
|
||||
|
||||
type bridgeWrap struct {
|
||||
|
||||
@ -21,7 +21,7 @@ import (
|
||||
"errors"
|
||||
"strings"
|
||||
|
||||
"github.com/ProtonMail/proton-bridge/internal/bridge"
|
||||
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||
imapquota "github.com/emersion/go-imap-quota"
|
||||
goIMAPBackend "github.com/emersion/go-imap/backend"
|
||||
)
|
||||
@ -34,7 +34,7 @@ type imapUser struct {
|
||||
panicHandler panicHandler
|
||||
backend *imapBackend
|
||||
user bridgeUser
|
||||
client bridge.PMAPIProvider
|
||||
client pmapi.Client
|
||||
|
||||
storeUser storeUserProvider
|
||||
storeAddress storeAddressProvider
|
||||
|
||||
Reference in New Issue
Block a user