customer

package
v0.0.0-...-0b5492d Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customer

type Customer struct {
	// contains filtered or unexported fields
}

Customer entity (and also root aggregate).

func Hydrate

func Hydrate(id CustomerID, fullName domain.FullName, email domain.Email) Customer

Hydrate instantiates customer from a previous stored state

func NewCustomer

func NewCustomer(ctx context.Context, email domain.Email, policy domain.UniqueEmailPolicy) (Customer, error)

NewCustomer creates a customer

func (Customer) Email

func (c Customer) Email() domain.Email

func (Customer) FullName

func (c Customer) FullName() domain.FullName

func (Customer) ID

func (c Customer) ID() CustomerID

func (*Customer) UpdateInfo

func (c *Customer) UpdateInfo(fullName domain.FullName)

type CustomerID

type CustomerID struct {
	// contains filtered or unexported fields
}

func MustParseCustomerID

func MustParseCustomerID(
	id string,
) CustomerID

func NewCustomerID

func NewCustomerID() CustomerID

func ParseCustomerID

func ParseCustomerID(s string) (CustomerID, error)

func (CustomerID) Id

func (c CustomerID) Id() uuid.UUID

func (CustomerID) IsZero

func (c CustomerID) IsZero() bool

func (CustomerID) String

func (c CustomerID) String() string

Jump to

Keyboard shortcuts

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