domain

package
v0.0.0-...-bb92df6 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: OSL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GenderMale for male customers
	GenderMale = "male"
	// GenderFemale for female customers
	GenderFemale = "female"
	// GenderOther for other customers
	GenderOther = "other"
	// GenderUnknown unknown
	GenderUnknown = ""
)

Variables

View Source
var (
	// ErrCustomerNotFoundError - semantic error returned if no customer was found
	ErrCustomerNotFoundError = errors.New("Customer not found")
)

Functions

This section is empty.

Types

type Address

type Address struct {
	ID                     string
	RegionCode             string
	CountryCode            string
	Company                string
	Street                 string
	StreetNr               string
	AdditionalAddressLines []string
	Telephone              string
	PostCode               string
	City                   string
	Firstname              string
	Lastname               string
	Email                  string
	Prefix                 string
	DefaultBilling         bool
	DefaultShipping        bool
}

Address data of a customer

type Customer

type Customer interface {
	GetID() string
	GetPersonalData() PersonData
	GetAddresses() []Address
	GetDefaultShippingAddress() *Address
	GetDefaultBillingAddress() *Address
}

Customer data interface

type CustomerIdentityService

type CustomerIdentityService interface {
	GetByIdentity(ctx context.Context, identity auth.Identity) (Customer, error)
}

CustomerIdentityService to retrieve customers by Identity

type PersonData

type PersonData struct {
	// Gender male, female, other, unknown
	Gender     string
	FirstName  string
	LastName   string
	MiddleName string
	MainEmail  string
	// Prefix such as (mr, mrs, ms) string
	Prefix      string
	Birthday    time.Time
	Nationality string
}

PersonData contains personal data

Jump to

Keyboard shortcuts

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