Documentation
¶
Index ¶
- func BuildWhereClause(attributes map[string]values.Value) Q.Expression
- type DomainFunction
- type DomainFunctionAccessor
- type DomainFunctionContext
- type DomainFunctionFunc
- type DomainFunctionKey
- type Engine
- func (engine *Engine) AwaitProcessingAllEvents()
- func (engine *Engine) Close()
- func (engine *Engine) Entity(name entity.Key) EntityAccessor
- func (engine *Engine) Function(key DomainFunctionKey) DomainFunctionAccessor
- func (engine *Engine) GetEntityRevisionRepository() EntityRevisionRepository
- func (engine *Engine) GetEntityRevisionService() *EntityRevisionService
- func (engine *Engine) GetEntityTypeService() *EntityTypeService
- func (engine *Engine) Projection(name string) ProjectionAccessor
- func (engine *Engine) SetFunctions(functions []DomainFunction)
- func (engine *Engine) SetSchema(schema *domainModel.Schema)
- type EngineDomainAccessor
- type EntityAccessor
- type EntityFactory
- type EntityRevision
- type EntityRevisionRepository
- type EntityRevisionService
- type EntityTypeService
- type EventProcessorDaemon
- type EventsRepository
- type Persistence
- type ProjectionAccessor
- type ProjectionProvider
- type StoredEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWhereClause ¶
func BuildWhereClause(attributes map[string]values.Value) Q.Expression
TODO: find the proper place
Types ¶
type DomainFunction ¶
type DomainFunction struct {
// contains filtered or unexported fields
}
func NewDomainFunction ¶
func NewDomainFunction(key DomainFunctionKey, function interface{}) DomainFunction
TODO - when golang finally has got generics: func(ctx DomainFunctionContext, input INPUT_TYPE) (OUTPUT_TYPE, error)
type DomainFunctionAccessor ¶
type DomainFunctionContext ¶
type DomainFunctionContext interface {
Entity(name entity.Key) EntityAccessor
}
type DomainFunctionFunc ¶
type DomainFunctionKey ¶
type DomainFunctionKey string
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func NewEngine ¶
func NewEngine( entityExecutorProvider entity.ExecutorProvider, domainPersistence Persistence, ) *Engine
func (*Engine) AwaitProcessingAllEvents ¶
func (engine *Engine) AwaitProcessingAllEvents()
func (*Engine) Entity ¶
func (engine *Engine) Entity(name entity.Key) EntityAccessor
/ TODO - strong typing: type EntityTypeID string
func (*Engine) Function ¶
func (engine *Engine) Function(key DomainFunctionKey) DomainFunctionAccessor
func (*Engine) GetEntityRevisionRepository ¶
func (engine *Engine) GetEntityRevisionRepository() EntityRevisionRepository
func (*Engine) GetEntityRevisionService ¶
func (engine *Engine) GetEntityRevisionService() *EntityRevisionService
func (*Engine) GetEntityTypeService ¶
func (engine *Engine) GetEntityTypeService() *EntityTypeService
func (*Engine) Projection ¶
func (engine *Engine) Projection(name string) ProjectionAccessor
func (*Engine) SetFunctions ¶
func (engine *Engine) SetFunctions(functions []DomainFunction)
TODO: this should be probably part of domain model specification
func (*Engine) SetSchema ¶
func (engine *Engine) SetSchema(schema *domainModel.Schema)
type EngineDomainAccessor ¶
type EngineDomainAccessor Engine
TODO
func (*EngineDomainAccessor) Entity ¶
func (d *EngineDomainAccessor) Entity(key entity.Key) entity.Accessor
func (*EngineDomainAccessor) Projection ¶
func (d *EngineDomainAccessor) Projection(key string) projection.Accessor
type EntityAccessor ¶
type EntityFactory ¶
type EntityRevision ¶
type EntityRevisionRepository ¶
type EntityRevisionRepository interface {
Find(entityTableName entity.Key, entityId int64) ([]EntityRevision, error)
}
type EntityRevisionService ¶
type EntityRevisionService struct {
// contains filtered or unexported fields
}
func (EntityRevisionService) Find ¶
func (s EntityRevisionService) Find(entityType *entity.Definition, entityId int64) ([]EntityRevision, error)
type EntityTypeService ¶
type EntityTypeService struct {
// contains filtered or unexported fields
}
func (EntityTypeService) GetEntityType ¶
func (s EntityTypeService) GetEntityType(name entity.Key) (*entity.Definition, error)
func (EntityTypeService) GetEntityTypes ¶
func (s EntityTypeService) GetEntityTypes() []*entity.Definition
func (EntityTypeService) GetReadModel ¶
func (s EntityTypeService) GetReadModel(name string) (*projection.Definition, error)
type EventProcessorDaemon ¶
type EventProcessorDaemon struct {
// contains filtered or unexported fields
}
func NewEventProcessorDaemon ¶
func NewEventProcessorDaemon(engine *Engine) *EventProcessorDaemon
func (*EventProcessorDaemon) Close ¶
func (d *EventProcessorDaemon) Close() error
func (*EventProcessorDaemon) Name ¶
func (d *EventProcessorDaemon) Name() string
func (*EventProcessorDaemon) Shutdown ¶
func (d *EventProcessorDaemon) Shutdown(ctx context.Context) error
func (*EventProcessorDaemon) Start ¶
func (d *EventProcessorDaemon) Start()
type EventsRepository ¶
type EventsRepository interface { FindUnprocessed(limit int) []*StoredEvent Store(event *StoredEvent) Remove(id int64) }
type Persistence ¶
type Persistence interface { SetSchema(schema *model.Schema) error GetEntityInstanceFactory() EntityFactory GetEntityRevisionRepository() EntityRevisionRepository Entity(name entity.Key) entity.Repository Projection(name string) ProjectionProvider Events() EventsRepository }
Persistence interface defines contract of root/entry point for persistence port.
type ProjectionAccessor ¶
type ProjectionAccessor interface { projection.Accessor }
type ProjectionProvider ¶
type ProjectionProvider interface { GetAll() ([]projection.Instance, error) Get(entityId int64) (projection.Instance, error) // TODO: query should be DTO with tree structure containing clauses/conditions FindByQuery(query string, params []interface{}, strings []query.OrderClause) ([]projection.Instance, error) EnsureFullyConverged() }
type StoredEvent ¶
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package entity contains all logic for entity definition, entity commands, entity events, and manipulation with entities.
|
Package entity contains all logic for entity definition, entity commands, entity events, and manipulation with entities. |
Package fields provides basic set of fields usable to define domain model
|
Package fields provides basic set of fields usable to define domain model |
internal
|
|
Package provides a generic interface to define and interact with core domain model.
|
Package provides a generic interface to define and interact with core domain model. |
testing
|
|
x
|
|
Click to show internal directories.
Click to hide internal directories.