mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
refactor: no more pmapifactory
This commit is contained in:
@ -76,9 +76,6 @@ type ClientConfig struct {
|
||||
// The client ID.
|
||||
ClientID string
|
||||
|
||||
// The sentry DSN.
|
||||
SentryDSN string
|
||||
|
||||
// Timeout specifies the timeout from request to getting response headers to our API.
|
||||
// Passed to http.Client, empty means no timeout.
|
||||
Timeout time.Duration
|
||||
|
||||
@ -6,7 +6,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/getsentry/raven-go"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
@ -59,10 +58,6 @@ type tokenExpiration struct {
|
||||
|
||||
// NewClientManager creates a new ClientMan which manages clients configured with the given client config.
|
||||
func NewClientManager(config *ClientConfig) (cm *ClientManager) {
|
||||
if err := raven.SetDSN(config.SentryDSN); err != nil {
|
||||
logrus.WithError(err).Error("Could not set up sentry DSN")
|
||||
}
|
||||
|
||||
cm = &ClientManager{
|
||||
config: config,
|
||||
roundTripper: http.DefaultTransport,
|
||||
|
||||
Reference in New Issue
Block a user