Documentation ¶
Index ¶
- Constants
- func OverwriteEditorUser(userID string) func(*Aggregate)
- func OverwriteResourceOwner(resourceOwner string) func(*Aggregate)
- type Aggregate
- type AggregateCreator
- type AggregateType
- type Aggregates
- type Columns
- type Event
- type EventType
- type Field
- type Filter
- type ObjectRoot
- type Operation
- type Query
- func (q *Query) AggregateIDFilter(id string) *Query
- func (q *Query) AggregateIDsFilter(ids ...string) *Query
- func (q *Query) AggregateTypeFilter(types ...AggregateType) *Query
- func (q *Query) CreationDateNewerFilter(time time.Time) *Query
- func (q *Query) EventTypesFilter(types ...EventType) *Query
- func (q *Query) ExcludedInstanceIDsFilter(instanceIDs ...string) *Query
- func (q *Query) InstanceIDFilter(instanceID string) *Query
- func (q *Query) LatestSequenceFilter(sequence uint64) *Query
- func (q *Query) ResourceOwnerFilter(resourceOwner string) *Query
- func (q *Query) SearchQuery() *SearchQuery
- func (q *Query) SequenceBetween(from, to uint64) *Query
- type SearchQuery
- type SearchQueryFactory
- func (factory *SearchQueryFactory) AddQuery() *query
- func (factory *SearchQueryFactory) Build() (*searchQuery, error)
- func (factory *SearchQueryFactory) Columns(columns Columns) *SearchQueryFactory
- func (factory *SearchQueryFactory) Limit(limit uint64) *SearchQueryFactory
- func (factory *SearchQueryFactory) OrderAsc() *SearchQueryFactory
- func (factory *SearchQueryFactory) OrderDesc() *SearchQueryFactory
- type Version
Constants ¶
View Source
const ( Columns_Event = iota Columns_Max_Sequence )
Variables ¶
This section is empty.
Functions ¶
func OverwriteEditorUser ¶
func OverwriteResourceOwner ¶
Types ¶
type Aggregate ¶
type Aggregate struct { ID string PreviousSequence uint64 Events []*Event Precondition *precondition // contains filtered or unexported fields }
func (*Aggregate) AppendEvent ¶
func (*Aggregate) SetPrecondition ¶
func (a *Aggregate) SetPrecondition(query *SearchQuery, validateFunc func(...*Event) error) *Aggregate
func (*Aggregate) Type ¶
func (a *Aggregate) Type() AggregateType
type AggregateCreator ¶
type AggregateCreator struct {
// contains filtered or unexported fields
}
func NewAggregateCreator ¶
func NewAggregateCreator(serviceName string) *AggregateCreator
func (*AggregateCreator) NewAggregate ¶
func (c *AggregateCreator) NewAggregate(ctx context.Context, id string, typ AggregateType, version Version, previousSequence uint64, opts ...option) (*Aggregate, error)
type AggregateType ¶
type AggregateType string
func (AggregateType) String ¶
func (at AggregateType) String() string
type Aggregates ¶
type Aggregates []*Aggregate
type Event ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func (*Filter) GetOperation ¶
type ObjectRoot ¶
type ObjectRoot struct { AggregateID string `json:"-"` Sequence uint64 `json:"-"` ResourceOwner string `json:"-"` InstanceID string `json:"-"` CreationDate time.Time `json:"-"` ChangeDate time.Time `json:"-"` }
func (*ObjectRoot) AppendEvent ¶
func (o *ObjectRoot) AppendEvent(event *Event)
func (*ObjectRoot) IsZero ¶
func (o *ObjectRoot) IsZero() bool
type Query ¶
type Query struct { Filters []*Filter // contains filtered or unexported fields }
func (*Query) AggregateIDFilter ¶
func (*Query) AggregateIDsFilter ¶
func (*Query) AggregateTypeFilter ¶
func (q *Query) AggregateTypeFilter(types ...AggregateType) *Query
func (*Query) CreationDateNewerFilter ¶
func (*Query) EventTypesFilter ¶
func (*Query) ExcludedInstanceIDsFilter ¶
func (*Query) InstanceIDFilter ¶
func (*Query) LatestSequenceFilter ¶
func (*Query) ResourceOwnerFilter ¶
func (*Query) SearchQuery ¶
func (q *Query) SearchQuery() *SearchQuery
SearchQuery returns the SearchQuery of the sub query
func (*Query) SequenceBetween ¶
type SearchQuery ¶
SearchQuery is deprecated. Use SearchQueryFactory
func NewSearchQuery ¶
func NewSearchQuery() *SearchQuery
NewSearchQuery is deprecated. Use SearchQueryFactory
func (*SearchQuery) AddQuery ¶
func (q *SearchQuery) AddQuery() *Query
func (*SearchQuery) OrderAsc ¶
func (q *SearchQuery) OrderAsc() *SearchQuery
func (*SearchQuery) OrderDesc ¶
func (q *SearchQuery) OrderDesc() *SearchQuery
func (*SearchQuery) SetLimit ¶
func (q *SearchQuery) SetLimit(limit uint64) *SearchQuery
func (*SearchQuery) Validate ¶
func (q *SearchQuery) Validate() error
type SearchQueryFactory ¶
type SearchQueryFactory struct {
// contains filtered or unexported fields
}
func FactoryFromSearchQuery ¶
func FactoryFromSearchQuery(q *SearchQuery) *SearchQueryFactory
FactoryFromSearchQuery is deprecated because it's for migration purposes. use NewSearchQueryFactory
func NewSearchQueryFactory ¶
func NewSearchQueryFactory() *SearchQueryFactory
func (*SearchQueryFactory) AddQuery ¶
func (factory *SearchQueryFactory) AddQuery() *query
func (*SearchQueryFactory) Build ¶
func (factory *SearchQueryFactory) Build() (*searchQuery, error)
func (*SearchQueryFactory) Columns ¶
func (factory *SearchQueryFactory) Columns(columns Columns) *SearchQueryFactory
func (*SearchQueryFactory) Limit ¶
func (factory *SearchQueryFactory) Limit(limit uint64) *SearchQueryFactory
func (*SearchQueryFactory) OrderAsc ¶
func (factory *SearchQueryFactory) OrderAsc() *SearchQueryFactory
func (*SearchQueryFactory) OrderDesc ¶
func (factory *SearchQueryFactory) OrderDesc() *SearchQueryFactory
Click to show internal directories.
Click to hide internal directories.