mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
Store factory to make store optional
This commit is contained in:
@ -18,25 +18,17 @@
|
||||
package users
|
||||
|
||||
import (
|
||||
"github.com/ProtonMail/proton-bridge/internal/store"
|
||||
"github.com/ProtonMail/proton-bridge/internal/users/credentials"
|
||||
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||
)
|
||||
|
||||
type Configer interface {
|
||||
ClearData() error
|
||||
GetDBDir() string
|
||||
GetVersion() string
|
||||
GetIMAPCachePath() string
|
||||
GetAPIConfig() *pmapi.ClientConfig
|
||||
}
|
||||
|
||||
type PreferenceProvider interface {
|
||||
Get(key string) string
|
||||
GetBool(key string) bool
|
||||
GetInt(key string) int
|
||||
Set(key string, value string)
|
||||
}
|
||||
|
||||
type PanicHandler interface {
|
||||
HandlePanic()
|
||||
}
|
||||
@ -62,3 +54,8 @@ type ClientManager interface {
|
||||
CheckConnection() error
|
||||
SetUserAgent(clientName, clientVersion, os string)
|
||||
}
|
||||
|
||||
type StoreMaker interface {
|
||||
New(user store.BridgeUser) (*store.Store, error)
|
||||
Remove(userID string) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user