Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildQuery ¶
func BuildQuery(name string, instance projection.EntityOrProjectionInstance, source projection.EntityProjectionOtherSource) (string, []interface{})
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func New ¶
func New(persistence Persistence) *Engine
func (*Engine) ProjectionRepository ¶
func (engine *Engine) ProjectionRepository(name string) domain.ProjectionProvider
func (*Engine) WrapEntityRepository ¶
func (engine *Engine) WrapEntityRepository(repository entity.Repository) entity.Repository
type Persistence ¶
type Persistence interface { Entity(name entity.Key) entity.Repository ProjectionRepository(name string) ProjectionRepository ProjectionFactory(name string) ProjectionFactory }
interface Persistence specifies persistence port for for Engine
type ProjectionFactory ¶
type ProjectionFactory interface {
CreateFromMap(values map[string]interface{}) projection.Instance
}
type ProjectionListenFunc ¶
type ProjectionListenFunc func(instance projection.Instance, previousInstance projection.Instance)
type ProjectionProvider ¶
type ProjectionProvider interface { domain.ProjectionProvider Name() string Invalidate(instance entity.Instance, previousVersion entity.Instance) InvalidateOnProjectionChange(instance projection.Instance, previousInstance projection.Instance) Close() }
type ProjectionRepository ¶
type ProjectionRepository interface { Get(entityId int64) (instance projection.Instance, found bool) FindAll() ([]projection.Instance, error) FindByQuery(query string, params []interface{}, orderBy []query.OrderClause) ([]projection.Instance, error) Store(id int64, instance projection.Instance) DeleteAll() Delete(id int64) }
Click to show internal directories.
Click to hide internal directories.