Documentation ¶
Overview ¶
Package provides a generic interface to define and interact with core domain model.
Index ¶
- type DomainAccessor
- type EventHandler
- type FieldAlias
- type PersistenceCompoundField
- type Schema
- func (schema *Schema) EntityTypes() map[entity.Key]*entity.Definition
- func (schema *Schema) EventHandler() EventHandler
- func (schema *Schema) ReadModels() map[string]*projection.Definition
- func (schema *Schema) Register(entity *entity.Definition)
- func (schema *Schema) RegisterReadModel(readModel *projection.Definition)
- func (schema *Schema) SetEventHandler(handler EventHandler)
- type UserCompoundField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DomainAccessor ¶
type EventHandler ¶
type EventHandler interface {
Handle(domain DomainAccessor, event interface{}) error
}
func EventHandlerFunc ¶
func EventHandlerFunc(f func(domain DomainAccessor, event interface{}) error) EventHandler
type FieldAlias ¶
type PersistenceCompoundField ¶
type PersistenceCompoundField interface { field.Field GetSubFieldNames() []string GetSubFields() []field.Field Type() reflect.Type MapCompoundValueToSlice(original interface{}) (storage []interface{}, err error) UnmapCompoundValueFromSlice(storage []interface{}) (original interface{}) AllowedNullElement() bool }
Fields implementing this interface are handled automatically by persistence, without need to implement own driver
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
func (*Schema) EntityTypes ¶
func (schema *Schema) EntityTypes() map[entity.Key]*entity.Definition
func (*Schema) EventHandler ¶
func (schema *Schema) EventHandler() EventHandler
func (*Schema) ReadModels ¶
func (schema *Schema) ReadModels() map[string]*projection.Definition
func (*Schema) Register ¶
func (schema *Schema) Register(entity *entity.Definition)
func (*Schema) RegisterReadModel ¶
func (schema *Schema) RegisterReadModel(readModel *projection.Definition)
func (*Schema) SetEventHandler ¶
func (schema *Schema) SetEventHandler(handler EventHandler)
type UserCompoundField ¶
type UserCompoundField interface {
GetSubFieldsStruct() field.StructType
}
Click to show internal directories.
Click to hide internal directories.