generated from PenaSide/GolangTemplate
30 lines
723 B
Go
30 lines
723 B
Go
package initialize
|
|
|
|
import (
|
|
"github.com/sirupsen/logrus"
|
|
"golang.org/x/oauth2"
|
|
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/client"
|
|
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/models"
|
|
)
|
|
|
|
type ClientsDeps struct {
|
|
Logger *logrus.Logger
|
|
GoogleURL *models.GoogleURL
|
|
AmocrmURL *models.AmocrmURL
|
|
AuthURL *models.AuthMicroServiceURL
|
|
AmocrmOAuthConfiguration *oauth2.Config
|
|
}
|
|
|
|
type Clients struct {
|
|
AuthClient *client.AuthClient
|
|
}
|
|
|
|
func NewClients(deps *ClientsDeps) *Clients {
|
|
return &Clients{
|
|
AuthClient: client.NewAuthClient(&client.AuthClientDeps{
|
|
Logger: deps.Logger,
|
|
URLs: deps.AuthURL,
|
|
}),
|
|
}
|
|
}
|