holder

package
v0.0.0-...-f9fc8b0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Code generated by ddd-domain-gen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	Local  = HolderType{"local"}
	Remote = HolderType{"remote"}
)

Functions

This section is empty.

Types

type Holder

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

func MustNew

func MustNew(uuid string, name string, bday time.Time, hTyp HolderType) *Holder

MustNew returns a guaranteed-to-be-valid Holder or panics

func New

func New(uuid string, name string, bday time.Time, hTyp HolderType) (*Holder, error)

New returns a guaranteed-to-be-valid Holder or an error

func UnmarshalFromRepository

func UnmarshalFromRepository(uuid string, name string, bday time.Time, hTyp HolderType) *Holder

UnmarshalFromRepository unmarshals Holder from the repository so that non-constructable private fields can still be initialized from (private) repository state

Important: DO NEVER USE THIS METHOD EXCEPT FROM THE REPOSITORY Reason: This method initializes private state, so you could corrupt the domain.

func (Holder) Equal

func (h Holder) Equal(v interface{}) bool

Equal answers whether v is equivalent to h Always returns false if v is not a Holder

func (Holder) String

func (h Holder) String() string

String implements the fmt.Stringer interface and returns the native format of Holder

type HolderType

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

func (HolderType) String

func (p HolderType) String() string

Jump to

Keyboard shortcuts

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