command

package
v0.0.0-...-57fdbbf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL