valueobject

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DotJoiner = "."
)

Variables

This section is empty.

Functions

func NewAssociation

func NewAssociation(from, to *obj, relationship arch.RelationType) arch.Relation

func NewComposition

func NewComposition(from, to *obj) arch.Relation

func NewDependence

func NewDependence(from, to *obj) arch.Relation

func NewEmbedding

func NewEmbedding(from, to *obj) arch.Relation

func NewEmptyRelationPos

func NewEmptyRelationPos() arch.RelationPos

func NewImplementation

func NewImplementation(from, to *obj) arch.Relation

func NewObj

func NewObj(o arch.Object) *obj

func NewRelationMeta

func NewRelationMeta(t arch.RelationType, fp, tp arch.Position) arch.RelationMeta

func NewRelationPos

func NewRelationPos(f, t arch.Position) arch.RelationPos

Types

type Aggregate

type Aggregate struct {
	*Entity
	Name string
}

func NewAggregate

func NewAggregate(e *Entity, name string) *Aggregate

func (Aggregate) Domain

func (do Aggregate) Domain() string

func (Aggregate) Identifier

func (do Aggregate) Identifier() arch.ObjIdentifier

func (Aggregate) OriginIdentifier

func (do Aggregate) OriginIdentifier() arch.ObjIdentifier

type AggregateGroup

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

func NewAggregateGroup

func NewAggregateGroup(a *Aggregate, domain string) *AggregateGroup

func (*AggregateGroup) Aggregate

func (agg *AggregateGroup) Aggregate() (*Aggregate, error)

func (AggregateGroup) Domain

func (dg AggregateGroup) Domain() string

func (AggregateGroup) DomainClasses

func (dg AggregateGroup) DomainClasses() []*DomainClass

func (AggregateGroup) DomainFunctions

func (dg AggregateGroup) DomainFunctions() []*DomainFunction

func (AggregateGroup) DomainGenerals

func (dg AggregateGroup) DomainGenerals() []*DomainGeneral

func (AggregateGroup) DomainInterfaces

func (dg AggregateGroup) DomainInterfaces() []*DomainInterface

func (*AggregateGroup) DomainName

func (agg *AggregateGroup) DomainName() string

func (*AggregateGroup) IsValid

func (agg *AggregateGroup) IsValid() bool

type Association

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

func (*Association) AssociationType

func (a *Association) AssociationType() arch.RelationType

func (Association) From

func (r Association) From() arch.Object

func (*Association) Refer

func (a *Association) Refer() arch.Object

func (Association) Type

func (r Association) Type() arch.RelationType

type Attr

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

func NewAttr

func NewAttr(o arch.Object) *Attr

func (Attr) Identifier

func (o Attr) Identifier() arch.ObjIdentifier

func (Attr) Position

func (o Attr) Position() arch.Position

type Class

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

func NewClass

func NewClass(o arch.Object, as []arch.ObjIdentifier, ms []arch.ObjIdentifier) *Class

func (*Class) AppendAttribute

func (k *Class) AppendAttribute(id *ident)

func (*Class) AppendMethod

func (k *Class) AppendMethod(id *ident)

func (*Class) Attributes

func (k *Class) Attributes() []*ident

func (Class) Identifier

func (o Class) Identifier() arch.ObjIdentifier

func (*Class) Methods

func (k *Class) Methods() []*ident

func (Class) Position

func (o Class) Position() arch.Position

type CodeHandler

type CodeHandler struct {
	Scope   string
	ObjRepo repository.ObjectRepository
	RelRepo repository.RelationRepository
	// contains filtered or unexported fields
}

func (*CodeHandler) LinkHandler

func (ch *CodeHandler) LinkHandler(link *code.Link)

func (*CodeHandler) NodeHandler

func (ch *CodeHandler) NodeHandler(node *code.Node)

type ComponentType

type ComponentType string
const (
	GeneralComponent    ComponentType = "general"
	FunctionComponent   ComponentType = "function"
	ClassComponent      ComponentType = "class"
	InterfaceComponent  ComponentType = "interface"
	EntityComponent     ComponentType = "entity"
	VOComponent         ComponentType = "valueobject"
	RepositoryComponent ComponentType = "repository"
	FactoryComponent    ComponentType = "factory"
)

type Composition

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

func (*Composition) Child

func (c *Composition) Child() arch.Object

func (Composition) From

func (r Composition) From() arch.Object

func (Composition) Type

func (r Composition) Type() arch.RelationType

type Dependence

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

func (*Dependence) DependsOn

func (d *Dependence) DependsOn() arch.Object

func (Dependence) From

func (r Dependence) From() arch.Object

func (Dependence) Type

func (r Dependence) Type() arch.RelationType

type DomainAttr

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

func NewDomainAttr

func NewDomainAttr(attr *Attr, d string) *DomainAttr

func (DomainAttr) Domain

func (do DomainAttr) Domain() string

func (DomainAttr) Identifier

func (do DomainAttr) Identifier() arch.ObjIdentifier

func (DomainAttr) OriginIdentifier

func (do DomainAttr) OriginIdentifier() arch.ObjIdentifier

type DomainClass

type DomainClass struct {
	Attributes []*DomainAttr
	Methods    []*DomainFunction
	// contains filtered or unexported fields
}

func NewDomainClass

func NewDomainClass(cla *Class, d string, attrs []*DomainAttr, methods []*DomainFunction) *DomainClass

func (DomainClass) Domain

func (do DomainClass) Domain() string

func (DomainClass) Identifier

func (do DomainClass) Identifier() arch.ObjIdentifier

func (DomainClass) OriginIdentifier

func (do DomainClass) OriginIdentifier() arch.ObjIdentifier

type DomainFunction

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

func NewDomainFunction

func NewDomainFunction(f *Function, d string) *DomainFunction

func (DomainFunction) Domain

func (do DomainFunction) Domain() string

func (DomainFunction) Identifier

func (do DomainFunction) Identifier() arch.ObjIdentifier

func (DomainFunction) OriginIdentifier

func (do DomainFunction) OriginIdentifier() arch.ObjIdentifier

type DomainGeneral

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

func NewDomainGeneral

func NewDomainGeneral(g *General, d string) *DomainGeneral

func (DomainGeneral) Domain

func (do DomainGeneral) Domain() string

func (DomainGeneral) Identifier

func (do DomainGeneral) Identifier() arch.ObjIdentifier

func (DomainGeneral) OriginIdentifier

func (do DomainGeneral) OriginIdentifier() arch.ObjIdentifier

type DomainGroup

type DomainGroup interface {
	Group
	Domain() string
	DomainGenerals() []*DomainGeneral
	DomainFunctions() []*DomainFunction
	DomainClasses() []*DomainClass
	DomainInterfaces() []*DomainInterface
}

type DomainInterface

type DomainInterface struct {
	Methods []*DomainFunction
	// contains filtered or unexported fields
}

func NewDomainInterface

func NewDomainInterface(i *Interface, d string, methods []*DomainFunction) *DomainInterface

func (DomainInterface) Domain

func (do DomainInterface) Domain() string

func (DomainInterface) Identifier

func (do DomainInterface) Identifier() arch.ObjIdentifier

func (DomainInterface) OriginIdentifier

func (do DomainInterface) OriginIdentifier() arch.ObjIdentifier

type Embedding

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

func (*Embedding) Embedded

func (e *Embedding) Embedded() arch.Object

func (Embedding) From

func (r Embedding) From() arch.Object

func (Embedding) Type

func (r Embedding) Type() arch.RelationType

type Entities

type Entities []*Entity

func (Entities) Objects

func (es Entities) Objects() []arch.Object

type Entity

type Entity struct {
	*DomainClass
}

func NewEntity

func NewEntity(cla *DomainClass) *Entity

func (Entity) Domain

func (do Entity) Domain() string

func (Entity) Identifier

func (do Entity) Identifier() arch.ObjIdentifier

func (Entity) OriginIdentifier

func (do Entity) OriginIdentifier() arch.ObjIdentifier

type EntityGroup

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

func NewEntityGroup

func NewEntityGroup(domain string, classes ...arch.Object) *EntityGroup

func (EntityGroup) Domain

func (dg EntityGroup) Domain() string

func (EntityGroup) DomainClasses

func (dg EntityGroup) DomainClasses() []*DomainClass

func (EntityGroup) DomainFunctions

func (dg EntityGroup) DomainFunctions() []*DomainFunction

func (EntityGroup) DomainGenerals

func (dg EntityGroup) DomainGenerals() []*DomainGeneral

func (EntityGroup) DomainInterfaces

func (dg EntityGroup) DomainInterfaces() []*DomainInterface

func (*EntityGroup) Entities

func (eg *EntityGroup) Entities() Entities

type Function

type Function struct {
	Receiver *ident
	// contains filtered or unexported fields
}

func NewFunction

func NewFunction(o arch.Object, r arch.ObjIdentifier) *Function

func (Function) Identifier

func (o Function) Identifier() arch.ObjIdentifier

func (Function) Position

func (o Function) Position() arch.Position

type General

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

func NewGeneral

func NewGeneral(o arch.Object) *General

func (General) Identifier

func (o General) Identifier() arch.ObjIdentifier

func (General) Position

func (o General) Position() arch.Position

type Group

type Group interface {
	Name() string
	SubGroups() []Group
	AppendGroups(...Group)
	Objects() []arch.Object
	AppendObjects(...arch.Object)
	Classes() []*Class
	Generals() []*General
	Functions() []*Function
	Interfaces() []*Interface
}

func NewGroup

func NewGroup(name string, objs ...arch.Object) Group

type Implementation

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

func (Implementation) From

func (r Implementation) From() arch.Object

func (*Implementation) Implemented

func (i *Implementation) Implemented(ifc arch.Object)

func (*Implementation) Implements

func (i *Implementation) Implements() []arch.Object

func (Implementation) Type

func (r Implementation) Type() arch.RelationType

type Interface

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

func NewInterface

func NewInterface(o arch.Object, ms []arch.Object) *Interface

func (*Interface) Append

func (i *Interface) Append(m *InterfaceMethod)

func (Interface) Identifier

func (o Interface) Identifier() arch.ObjIdentifier

func (*Interface) Methods

func (i *Interface) Methods() []*ident

func (Interface) Position

func (o Interface) Position() arch.Position

type InterfaceMethod

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

func (InterfaceMethod) Identifier

func (o InterfaceMethod) Identifier() arch.ObjIdentifier

func (InterfaceMethod) Position

func (o InterfaceMethod) Position() arch.Position

type MissingReceiver added in v0.2.0

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

func (*MissingReceiver) AppendMethod added in v0.2.0

func (k *MissingReceiver) AppendMethod(id *ident)

func (MissingReceiver) Identifier added in v0.2.0

func (o MissingReceiver) Identifier() arch.ObjIdentifier

func (MissingReceiver) Position added in v0.2.0

func (o MissingReceiver) Position() arch.Position

type StringObj

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

func NewStringObj

func NewStringObj(v string) *StringObj

func (StringObj) Identifier

func (o StringObj) Identifier() arch.ObjIdentifier

func (StringObj) Position

func (o StringObj) Position() arch.Position

type VOGroup

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

func NewVOGroup

func NewVOGroup(domain string, vos ...arch.Object) *VOGroup

func (VOGroup) Domain

func (dg VOGroup) Domain() string

func (VOGroup) DomainClasses

func (dg VOGroup) DomainClasses() []*DomainClass

func (VOGroup) DomainFunctions

func (dg VOGroup) DomainFunctions() []*DomainFunction

func (VOGroup) DomainGenerals

func (dg VOGroup) DomainGenerals() []*DomainGeneral

func (VOGroup) DomainInterfaces

func (dg VOGroup) DomainInterfaces() []*DomainInterface

func (*VOGroup) ValueObjects

func (eg *VOGroup) ValueObjects() ValueObjects

type ValueObject

type ValueObject struct {
	*DomainClass
}

func NewValueObject

func NewValueObject(cla *DomainClass) *ValueObject

func (ValueObject) Domain

func (do ValueObject) Domain() string

func (ValueObject) Identifier

func (do ValueObject) Identifier() arch.ObjIdentifier

func (ValueObject) OriginIdentifier

func (do ValueObject) OriginIdentifier() arch.ObjIdentifier

type ValueObjects

type ValueObjects []*ValueObject

func (ValueObjects) Objects

func (vos ValueObjects) Objects() []arch.Object

Jump to

Keyboard shortcuts

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