Documentation
¶
Index ¶
Constants ¶
View Source
const ( SomeIdentityMinLength = 1 SomeIdentityMaxLength = 64 SomeIdentityPattern = "[0-9A-Za-z-_]+" )
Variables ¶
View Source
var SomeIdentityRegexp = regexp.MustCompile(SomeIdentityPattern)
Functions ¶
This section is empty.
Types ¶
type EventPublisher ¶
type EventPublisher interface {
Publish(event Event)
}
EventPublisher Event の出版インターフェース
type EventSubscriber ¶
type EventSubscriber interface {
Handle(event Event)
}
EventSubscriber Event の購読インターフェース
type Identity ¶
type Identity interface { ValueObject }
Identity 何らかのドメインを識別するIDを表現した値オブジェクトの概念インターフェース
type SomeIdentity ¶
type SomeIdentity struct { Identity // contains filtered or unexported fields }
SomeIdentity 何らかのドメインを識別するIDを表現した値オブジェクト
func NewSomeIdentity ¶
func NewSomeIdentity(id string) *SomeIdentity
func (*SomeIdentity) ID ¶
func (si *SomeIdentity) ID() string
func (*SomeIdentity) String ¶
func (si *SomeIdentity) String() string
type SomeValueObject ¶
type SomeValueObject[V comparable] struct { ValueObject // contains filtered or unexported fields }
SomeValueObject 何らかの型の値を1つ持つ値オブジェクト
func NewSomeValueObject ¶
func NewSomeValueObject[V comparable](value V) *SomeValueObject[V]
func (*SomeValueObject[V]) String ¶
func (svo *SomeValueObject[V]) String() string
func (*SomeValueObject[V]) Value ¶
func (svo *SomeValueObject[V]) Value() V
type ValueObject ¶
type ValueObject interface {
SameValueAs(other ValueObject) bool
}
ValueObject DDDにおける値オブジェクトの概念インターフェース
Click to show internal directories.
Click to hide internal directories.