Documentation
¶
Index ¶
- Variables
- func InitAPI() (*http.API, error)
- func InitGRPC() (*grpc.GRPC, error)
- func NewEventManagerWithHandlers(eventBus bus.EventBus, userCreatedHandler *handler.UserCreatedHandler) *manager.EventManager
- func ProvideTypedCache(factory *cache.Factory) contract.TypedCache
- func ProvideUserRepository(txManager transactions.TransactionManager, cache contract.TypedCache) repository.UserRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 数据持久化层 PersistenceSet = wire.NewSet(transactions.NewGormTransactionManager, common.NewAreaRepository, common.NewMailRepository, common.NewSmsRepository, cache.NewCacheFactory, ProvideTypedCache, ProvideUserRepository, ) // 基础设施层 InfrastructureSet = wire.NewSet( PersistenceSet, bus.NewInMemoryEventBus, publisher.NewDomainEventPublisher, wire.Bind(new(bus.EventBus), new(*bus.InMemoryEventBus)), ) // 领域层 DomainSet = wire.NewSet( InfrastructureSet, service3.NewAreaDomainService, service3.NewMailDomainService, service3.NewSmsDomainService, service3.NewValidCodeDomainService, service.NewUserDomainService, ) // 应用层 ApplicationSet = wire.NewSet( DomainSet, common2.NewAreaApplicationService, common2.NewValidCodeAppService, service2.NewUserApplicationService, NewEventManagerWithHandlers, handler.NewUserCreatedHandler, ) // API聚合层 APISet = wire.NewSet( ApplicationSet, common3.NewAreaController, common3.NewValidCodeController, debug.NewDebugController, http.NewAPI, ) // gRPC聚合层 GRPCSet = wire.NewSet( ApplicationSet, service4.NewUserService, grpc.NewGRPC, ) )
Functions ¶
func NewEventManagerWithHandlers ¶
func NewEventManagerWithHandlers( eventBus bus.EventBus, userCreatedHandler *handler.UserCreatedHandler, ) *manager.EventManager
NewEventManagerWithHandlers 注册事件处理器
func ProvideTypedCache ¶
func ProvideTypedCache(factory *cache.Factory) contract.TypedCache
ProvideTypedCache 缓存工厂
func ProvideUserRepository ¶
func ProvideUserRepository( txManager transactions.TransactionManager, cache contract.TypedCache, ) repository.UserRepository
ProvideUserRepository 提供用户仓储装饰器
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.