Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateContactCommand ¶
type CreateContactCommand struct { Name string `json:"name" validate:"required"` Email string `json:"email" validate:"required,email"` Message string `json:"message" validate:"required"` DateAdd time.Time `json:"dateAdd"` }
CreateContactCommand is a struct that contains contact data
type CreateContactCommandHandler ¶
type CreateContactCommandHandler struct { ContactFactory factory.IContactFactory ContactRepository repository.ContactRepository ContactCreatedEventHandler event.IEventHandler Logger logger.ILogger }
CreateContactCommandHandler is a struct that implements CommandHandler interface and handle CreateContactCommand
func (*CreateContactCommandHandler) GetName ¶
func (c *CreateContactCommandHandler) GetName() string
GetName returns command name @return string
func (*CreateContactCommandHandler) Handle ¶
func (c *CreateContactCommandHandler) Handle(command CreateContactCommand)
Handle handles command CreateContactCommand and create contact in database and send mail to admin with event ContactCreatedEvent @param command CreateContactCommand struct that contains contact data @return void
Click to show internal directories.
Click to hide internal directories.