Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorEmptyUserInput = errors.New("user input contains empty fields") ErrorInvalidBirthdate = errors.New("users birthdate is invalid. It should be in the format of day-month-year") )
Functions ¶
This section is empty.
Types ¶
type Customer ¶
type Customer struct { ID entity.ID FirstName string LastName string Gender string Birthdate string // contains filtered or unexported fields }
Customer entity which represents unique customers
func (*Customer) GetCLastUpdateTimestamp ¶
func (*Customer) GetCreationTimestamp ¶
type Manager ¶
type Manager interface { Create(ctx context.Context, c Customer) (entity.ID, error) Update(ctx context.Context, c Customer) error Get(ctx context.Context, id entity.ID) (Customer, error) }
func NewManager ¶
func NewManager(r repository) Manager
type MySqlRepository ¶
type MySqlRepository struct {
// contains filtered or unexported fields
}
func NewMySqlRepository ¶
func NewMySqlRepository(client *sql.DB) (*MySqlRepository, error)
func (MySqlRepository) Create ¶
func (m MySqlRepository) Create(ctx context.Context, c Customer) error
Click to show internal directories.
Click to hide internal directories.