refactor: no more pmapifactory

This commit is contained in:
James Houlahan
2020-04-08 13:07:13 +02:00
parent 5bf4d9c6f5
commit db02eb694d
22 changed files with 70 additions and 76 deletions

View File

@ -24,12 +24,13 @@ import (
"github.com/ProtonMail/proton-bridge/internal/preferences"
"github.com/ProtonMail/proton-bridge/pkg/config"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ProtonMail/proton-bridge/pkg/logs"
"github.com/abiosoft/ishell"
)
var (
log = config.GetLogEntry("frontend/cli") //nolint[gochecknoglobals]
log = logs.GetLogEntry("frontend/cli") //nolint[gochecknoglobals]
)
type frontendCLI struct {

View File

@ -26,10 +26,11 @@ import (
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/ProtonMail/proton-bridge/pkg/config"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ProtonMail/proton-bridge/pkg/logs"
)
var (
log = config.GetLogEntry("frontend") // nolint[unused]
log = logs.GetLogEntry("frontend") // nolint[unused]
)
// Frontend is an interface to be implemented by each frontend type (cli, gui, html).

View File

@ -43,6 +43,7 @@ import (
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/ProtonMail/proton-bridge/internal/preferences"
"github.com/ProtonMail/proton-bridge/pkg/config"
"github.com/ProtonMail/proton-bridge/pkg/logs"
"github.com/ProtonMail/proton-bridge/pkg/ports"
"github.com/ProtonMail/proton-bridge/pkg/useragent"
@ -58,7 +59,7 @@ import (
"github.com/therecipe/qt/widgets"
)
var log = config.GetLogEntry("frontend-qt")
var log = logs.GetLogEntry("frontend-qt")
var accountMutex = &sync.Mutex{}
// API between Bridge and Qt.

View File

@ -26,9 +26,10 @@ import (
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/ProtonMail/proton-bridge/pkg/config"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ProtonMail/proton-bridge/pkg/logs"
)
var log = config.GetLogEntry("frontend-nogui") //nolint[gochecknoglobals]
var log = logs.GetLogEntry("frontend-nogui") //nolint[gochecknoglobals]
type FrontendHeadless struct{}