block-accounting/backend/internal/factory/wire.go

35 lines
842 B
Go
Raw Normal View History

2024-05-24 17:44:24 +00:00
//go:build wireinject
// +build wireinject
package factory
import (
2024-06-03 21:54:17 +00:00
"github.com/emochka2007/block-accounting/internal/infrastructure/repository"
2024-05-24 17:44:24 +00:00
"github.com/emochka2007/block-accounting/internal/pkg/config"
"github.com/emochka2007/block-accounting/internal/service"
"github.com/google/wire"
)
func ProvideService(c config.Config) (service.Service, func(), error) {
wire.Build(
repository.ProvideDatabaseConnection,
provideRedisConnection,
provideLogger,
provideRedisCache,
provideUsersRepository,
provideUsersInteractor,
provideTxRepository,
provideOrganizationsRepository,
provideOrganizationsInteractor,
provideTxInteractor,
2024-05-25 13:00:21 +00:00
provideChainInteractor,
2024-05-24 17:44:24 +00:00
provideAuthRepository,
provideJWTInteractor,
interfaceSet,
provideRestServer,
service.NewService,
)
return &service.ServiceImpl{}, func() {}, nil
}