-
Notifications
You must be signed in to change notification settings - Fork 3
/
wire.go
46 lines (41 loc) · 1.72 KB
/
wire.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//go:build wireinject
// +build wireinject
package main
import (
"github.com/devtron-labs/chart-sync/internals"
"github.com/devtron-labs/chart-sync/internals/logger"
"github.com/devtron-labs/chart-sync/internals/sql"
"github.com/devtron-labs/chart-sync/pkg"
"github.com/devtron-labs/common-lib/helmLib/registry"
"github.com/google/wire"
)
func InitializeApp() (*App, error) {
wire.Build(
NewApp,
logger.NewSugardLogger,
sql.GetConfig,
internals.ParseConfiguration,
sql.NewDbConnection,
sql.NewDockerArtifactStoreRepositoryImpl,
wire.Bind(new(sql.DockerArtifactStoreRepository), new(*sql.DockerArtifactStoreRepositoryImpl)),
sql.NewOCIRegistryConfigRepositoryImpl,
wire.Bind(new(sql.OCIRegistryConfigRepository), new(*sql.OCIRegistryConfigRepositoryImpl)),
sql.NewChartRepoRepositoryImpl,
wire.Bind(new(sql.ChartRepoRepository), new(*sql.ChartRepoRepositoryImpl)),
sql.NewAppStoreRepositoryImpl,
wire.Bind(new(sql.AppStoreRepository), new(*sql.AppStoreRepositoryImpl)),
sql.NewAppStoreApplicationVersionRepositoryImpl,
wire.Bind(new(sql.AppStoreApplicationVersionRepository), new(*sql.AppStoreApplicationVersionRepositoryImpl)),
pkg.NewHelmRepoManagerImpl,
wire.Bind(new(pkg.HelmRepoManager), new(*pkg.HelmRepoManagerImpl)),
pkg.NewSyncServiceImpl,
wire.Bind(new(pkg.SyncService), new(*pkg.SyncServiceImpl)),
registry.NewSettingsFactoryImpl,
wire.Bind(new(registry.SettingsFactory), new(*registry.SettingsFactoryImpl)),
registry.NewDefaultSettingsGetter,
wire.Bind(new(registry.DefaultSettingsGetter), new(*registry.DefaultSettingsGetterImpl)),
//sql.NewRemoteConnectionRepositoryImpl,
//wire.Bind(new(sql.RemoteConnectionRepository), new(*sql.RemoteConnectionRepositoryImpl)),
)
return &App{}, nil
}