mirror of
https://github.com/emo2007/block-accounting.git
synced 2024-11-10 04:36:26 +00:00
35 lines
835 B
Go
35 lines
835 B
Go
//go:build wireinject
|
|
// +build wireinject
|
|
|
|
package factory
|
|
|
|
import (
|
|
"github.com/emochka2007/block-accounting/internal/pkg/config"
|
|
"github.com/emochka2007/block-accounting/internal/service"
|
|
"github.com/emochka2007/block-accounting/internal/usecase/repository"
|
|
"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,
|
|
provideChainInteractor,
|
|
provideAuthRepository,
|
|
provideJWTInteractor,
|
|
interfaceSet,
|
|
provideRestServer,
|
|
service.NewService,
|
|
)
|
|
|
|
return &service.ServiceImpl{}, func() {}, nil
|
|
}
|