-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwire_gen.go
44 lines (39 loc) · 1.73 KB
/
wire_gen.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
// Code generated by Wire. DO NOT EDIT.
//go:generate go run -mod=mod github.com/google/wire/cmd/wire
//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"
)
// Injectors from wire.go:
func InitializeApp() (*App, error) {
sugaredLogger := logger.NewSugardLogger()
config, err := sql.GetConfig()
if err != nil {
return nil, err
}
db, err := sql.NewDbConnection(config, sugaredLogger)
if err != nil {
return nil, err
}
chartRepoRepositoryImpl := sql.NewChartRepoRepositoryImpl(db)
helmRepoManagerImpl := pkg.NewHelmRepoManagerImpl(sugaredLogger)
dockerArtifactStoreRepositoryImpl := sql.NewDockerArtifactStoreRepositoryImpl(db)
ociRegistryConfigRepositoryImpl := sql.NewOCIRegistryConfigRepositoryImpl(db)
appStoreRepositoryImpl := sql.NewAppStoreRepositoryImpl(sugaredLogger, db)
appStoreApplicationVersionRepositoryImpl := sql.NewAppStoreApplicationVersionRepositoryImpl(sugaredLogger, db)
configuration, err := internals.ParseConfiguration()
if err != nil {
return nil, err
}
defaultSettingsGetterImpl := registry.NewDefaultSettingsGetter(sugaredLogger)
settingsFactoryImpl := registry.NewSettingsFactoryImpl(defaultSettingsGetterImpl)
syncServiceImpl := pkg.NewSyncServiceImpl(chartRepoRepositoryImpl, sugaredLogger, helmRepoManagerImpl, dockerArtifactStoreRepositoryImpl, ociRegistryConfigRepositoryImpl, appStoreRepositoryImpl, appStoreApplicationVersionRepositoryImpl, configuration, settingsFactoryImpl)
app := NewApp(sugaredLogger, db, syncServiceImpl)
return app, nil
}