customer

package
v0.0.0-...-3edd77d Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package Customer holds all the domain logic for the customer domain.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCustomerNotFound is returned when a customer is not found.
	ErrCustomerNotFound = errors.New("the customer was not found in the repository")
	// ErrCustomerAlreadyExists is returned when should not change an existing customer.
	ErrCustomerAlreadyExists = errors.New("the customer already exists in the repository")
	// ErrFailedToAddCustomer is returned when the customer could not be added to the repository.
	ErrFailedToAddCustomer = errors.New("failed to add the customer to the repository")
	// ErrUpdateCustomer is returned when the customer could not be updated in the repository.
	ErrUpdateCustomer = errors.New("failed to update the customer in the repository")
)

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Get(uuid.UUID) (aggregate.Customer, error)
	Add(aggregate.Customer) error
	Update(aggregate.Customer) error
}

CustomerRepository is a interface that defines the rules around what a customer repository has to be able to perform

Directories

Path Synopsis
Package memory is a in-memory implementation of the customer repository
Package memory is a in-memory implementation of the customer repository

Jump to

Keyboard shortcuts

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