domain

package
v0.0.0-...-fa5135e Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFutureCreatedAt  = errors.New("domain: account creation time cannot be in the future")
	ErrFutureUpdatedAt  = errors.New("domain: account modification time cannot be in the future")
	ErrInvalidUpdatedAt = errors.New("domain: account modification time cannot be prior to account creation time")
	ErrFutureDeletedAt  = errors.New("domain: account deleton time cannot be in the future")
	ErrInvalidDeletedAt = errors.New("domain: account deletion time cannot be prior to account creation or modification time")
)

Errors that are potentially thrown during account interactions.

Functions

This section is empty.

Types

type Account

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

func NewAccount

func NewAccount(parameters AccountParameters) (Account, error)

func ReconstituteAccount

func ReconstituteAccount(parameters AccountParameters) Account

func (Account) CreatedAt

func (a Account) CreatedAt() time.Time

func (Account) DeletedAt

func (a Account) DeletedAt() *time.Time

func (Account) GivenName

func (a Account) GivenName() string

func (*Account) SetCreatedAt

func (a *Account) SetCreatedAt(t time.Time) error

func (*Account) SetDeletedAt

func (a *Account) SetDeletedAt(t time.Time) error

func (*Account) SetGivenName

func (a *Account) SetGivenName(name string)

func (*Account) SetSurname

func (a *Account) SetSurname(name string)

func (*Account) SetUUID

func (a *Account) SetUUID(uuid u.UUID)

func (*Account) SetUpdatedAt

func (a *Account) SetUpdatedAt(t time.Time) error

func (*Account) SetUsername

func (a *Account) SetUsername(username string)

func (Account) Surname

func (a Account) Surname() string

func (Account) UUID

func (a Account) UUID() u.UUID

func (Account) UpdatedAt

func (a Account) UpdatedAt() time.Time

func (Account) Username

func (a Account) Username() string

type AccountParameters

type AccountParameters struct {
	UUID      u.UUID
	GivenName string
	Surname   string
	Username  string
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time
}

Jump to

Keyboard shortcuts

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