Documentation
¶
Overview ¶
Package domain provides domain services and their dependency injection setup. This module is responsible for providing domain services and interfaces, while keeping implementation details in the infrastructure layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide( fx.Annotate( NewUserService, fx.As(new(user.Service)), ), fx.Annotate( NewFormService, fx.As(new(form.Service)), ), NewStores, ), )
Module provides all domain layer dependencies
Functions ¶
func NewFormService ¶
func NewFormService(p FormServiceParams) (form.Service, error)
NewFormService creates a new form service with dependencies
func NewUserService ¶
func NewUserService(p UserServiceParams) (user.Service, error)
NewUserService creates a new user service with dependencies
Types ¶
type FormServiceParams ¶
type FormServiceParams struct { fx.In Store form.Repository EventPublisher event.Publisher Logger logging.Logger }
FormServiceParams contains dependencies for creating a form service
type StoreParams ¶ added in v0.1.5
StoreParams groups store dependencies
type Stores ¶ added in v0.1.5
type Stores struct { fx.Out UserStore user.Repository FormStore form.Repository FormSubmissionStore form.SubmissionStore }
Stores groups all store implementations
func NewStores ¶ added in v0.1.5
func NewStores(p StoreParams) (Stores, error)
NewStores creates new store instances
type UserServiceParams ¶
UserServiceParams contains dependencies for creating a user service
Click to show internal directories.
Click to hide internal directories.