-
Notifications
You must be signed in to change notification settings - Fork 469
/
wire_cluster.go
49 lines (44 loc) · 2.02 KB
/
wire_cluster.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
47
48
49
package cluster
import (
"github.com/devtron-labs/devtron/pkg/cluster"
"github.com/devtron-labs/devtron/pkg/cluster/repository"
"github.com/google/wire"
)
//depends on sql,user,K8sUtil, logger, enforcer, TODO
var ClusterWireSet = wire.NewSet(
repository.NewClusterRepositoryImpl,
wire.Bind(new(repository.ClusterRepository), new(*repository.ClusterRepositoryImpl)),
cluster.NewClusterServiceImplExtended,
wire.Bind(new(cluster.ClusterService), new(*cluster.ClusterServiceImplExtended)),
NewClusterRestHandlerImpl,
wire.Bind(new(ClusterRestHandler), new(*ClusterRestHandlerImpl)),
NewClusterRouterImpl,
wire.Bind(new(ClusterRouter), new(*ClusterRouterImpl)),
repository.NewEnvironmentRepositoryImpl,
wire.Bind(new(repository.EnvironmentRepository), new(*repository.EnvironmentRepositoryImpl)),
cluster.NewEnvironmentServiceImpl,
wire.Bind(new(cluster.EnvironmentService), new(*cluster.EnvironmentServiceImpl)),
NewEnvironmentRestHandlerImpl,
wire.Bind(new(EnvironmentRestHandler), new(*EnvironmentRestHandlerImpl)),
NewEnvironmentRouterImpl,
wire.Bind(new(EnvironmentRouter), new(*EnvironmentRouterImpl)),
)
//minimal wire to be used with EA
var ClusterWireSetEa = wire.NewSet(
repository.NewClusterRepositoryImpl,
wire.Bind(new(repository.ClusterRepository), new(*repository.ClusterRepositoryImpl)),
cluster.NewClusterServiceImpl,
wire.Bind(new(cluster.ClusterService), new(*cluster.ClusterServiceImpl)),
NewClusterRestHandlerImpl,
wire.Bind(new(ClusterRestHandler), new(*ClusterRestHandlerImpl)),
NewClusterRouterImpl,
wire.Bind(new(ClusterRouter), new(*ClusterRouterImpl)),
repository.NewEnvironmentRepositoryImpl,
wire.Bind(new(repository.EnvironmentRepository), new(*repository.EnvironmentRepositoryImpl)),
cluster.NewEnvironmentServiceImpl,
wire.Bind(new(cluster.EnvironmentService), new(*cluster.EnvironmentServiceImpl)),
NewEnvironmentRestHandlerImpl,
wire.Bind(new(EnvironmentRestHandler), new(*EnvironmentRestHandlerImpl)),
NewEnvironmentRouterImpl,
wire.Bind(new(EnvironmentRouter), new(*EnvironmentRouterImpl)),
)