Documentation ¶
Index ¶
- Constants
- func GenerateTableName(streamName string) string
- type Client
- func (c *Client) Conn() interface{}
- func (c *Client) Delete(ctx context.Context, collection string) error
- func (c *Client) Exists(ctx context.Context, collection string) (bool, error)
- func (c *Client) Insert(ctx context.Context, collection string, values map[string]interface{}) error
- func (c *Client) Remove(ctx context.Context, collection string, identifiers map[string]interface{}) error
- func (c *Client) Reset(ctx context.Context, collection string) error
- func (c *Client) Update(ctx context.Context, collection string, values map[string]interface{}, ...) error
- type DomainEventIterator
- func (it *DomainEventIterator) Close()
- func (it *DomainEventIterator) Current() (*eventstore.DomainEvent, error)
- func (it *DomainEventIterator) Error() error
- func (it *DomainEventIterator) IsEmpty() (bool, error)
- func (it *DomainEventIterator) Next() bool
- func (it *DomainEventIterator) Rewind()
- func (it *DomainEventIterator) ToList() ([]eventstore.DomainEvent, error)
- type PersistenceStrategy
- func (ps PersistenceStrategy) AddStreamToStreamsTable(ctx context.Context, streamName string) error
- func (ps PersistenceStrategy) AppendTo(ctx context.Context, streamName string, events []eventstore.DomainEvent) error
- func (ps PersistenceStrategy) CreateEventStreamsTable(ctx context.Context) error
- func (ps PersistenceStrategy) CreateProjectionsTable(ctx context.Context) error
- func (ps PersistenceStrategy) CreateSchema(ctx context.Context, streamName string) error
- func (ps PersistenceStrategy) DeleteStream(ctx context.Context, streamName string) error
- func (ps PersistenceStrategy) DropSchema(ctx context.Context, streamName string) error
- func (ps PersistenceStrategy) FetchAllStreamNames(ctx context.Context) ([]string, error)
- func (ps PersistenceStrategy) HasStream(ctx context.Context, streamName string) (bool, error)
- func (ps PersistenceStrategy) Load(ctx context.Context, streamName string, fromNumber, count int, ...) (eventstore.DomainEventIterator, error)
- func (ps PersistenceStrategy) MergeAndLoad(ctx context.Context, count int, streams ...eventstore.LoadStreamParameter) (eventstore.DomainEventIterator, error)
- func (ps PersistenceStrategy) RemoveStreamFromStreamsTable(ctx context.Context, streamName string) error
- type ProjectionManager
- func (pm ProjectionManager) CreateProjection(ctx context.Context, projectionName string, state interface{}, ...) error
- func (pm ProjectionManager) DeleteProjection(ctx context.Context, projectionName string) error
- func (pm ProjectionManager) FetchProjectionStatus(ctx context.Context, projectionName string) (eventstore.Status, error)
- func (pm ProjectionManager) LoadProjection(ctx context.Context, projectionName string) (map[string]int, interface{}, error)
- func (pm ProjectionManager) PersistProjection(ctx context.Context, projectionName string, state interface{}, ...) error
- func (pm ProjectionManager) ProjectionExists(ctx context.Context, projectionName string) (bool, error)
- func (pm ProjectionManager) ResetProjection(ctx context.Context, projectionName string, state interface{}) error
- func (pm ProjectionManager) UpdateProjectionStatus(ctx context.Context, projectionName string, status eventstore.Status) error
Constants ¶
View Source
const ( EventStreamsTable = "event_streams" ProjectionsTable = "projections" )
Variables ¶
This section is empty.
Functions ¶
func GenerateTableName ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type DomainEventIterator ¶ added in v0.2.0
type DomainEventIterator struct {
// contains filtered or unexported fields
}
func NewDomainEventIterator ¶ added in v0.2.0
func (*DomainEventIterator) Close ¶ added in v0.2.0
func (it *DomainEventIterator) Close()
func (*DomainEventIterator) Current ¶ added in v0.2.0
func (it *DomainEventIterator) Current() (*eventstore.DomainEvent, error)
func (*DomainEventIterator) Error ¶ added in v0.2.0
func (it *DomainEventIterator) Error() error
func (*DomainEventIterator) IsEmpty ¶ added in v0.3.0
func (it *DomainEventIterator) IsEmpty() (bool, error)
func (*DomainEventIterator) Next ¶ added in v0.2.0
func (it *DomainEventIterator) Next() bool
func (*DomainEventIterator) Rewind ¶ added in v0.2.0
func (it *DomainEventIterator) Rewind()
func (*DomainEventIterator) ToList ¶ added in v0.2.0
func (it *DomainEventIterator) ToList() ([]eventstore.DomainEvent, error)
type PersistenceStrategy ¶
type PersistenceStrategy struct {
// contains filtered or unexported fields
}
func NewPersistenceStrategy ¶
func NewPersistenceStrategy(db *pgxpool.Pool) *PersistenceStrategy
func (PersistenceStrategy) AddStreamToStreamsTable ¶
func (ps PersistenceStrategy) AddStreamToStreamsTable(ctx context.Context, streamName string) error
func (PersistenceStrategy) AppendTo ¶
func (ps PersistenceStrategy) AppendTo(ctx context.Context, streamName string, events []eventstore.DomainEvent) error
func (PersistenceStrategy) CreateEventStreamsTable ¶
func (ps PersistenceStrategy) CreateEventStreamsTable(ctx context.Context) error
func (PersistenceStrategy) CreateProjectionsTable ¶
func (ps PersistenceStrategy) CreateProjectionsTable(ctx context.Context) error
func (PersistenceStrategy) CreateSchema ¶
func (ps PersistenceStrategy) CreateSchema(ctx context.Context, streamName string) error
func (PersistenceStrategy) DeleteStream ¶
func (ps PersistenceStrategy) DeleteStream(ctx context.Context, streamName string) error
func (PersistenceStrategy) DropSchema ¶
func (ps PersistenceStrategy) DropSchema(ctx context.Context, streamName string) error
func (PersistenceStrategy) FetchAllStreamNames ¶
func (ps PersistenceStrategy) FetchAllStreamNames(ctx context.Context) ([]string, error)
func (PersistenceStrategy) Load ¶
func (ps PersistenceStrategy) Load(ctx context.Context, streamName string, fromNumber, count int, matcher eventstore.MetadataMatcher) (eventstore.DomainEventIterator, error)
func (PersistenceStrategy) MergeAndLoad ¶
func (ps PersistenceStrategy) MergeAndLoad(ctx context.Context, count int, streams ...eventstore.LoadStreamParameter) (eventstore.DomainEventIterator, error)
func (PersistenceStrategy) RemoveStreamFromStreamsTable ¶
func (ps PersistenceStrategy) RemoveStreamFromStreamsTable(ctx context.Context, streamName string) error
type ProjectionManager ¶
type ProjectionManager struct {
// contains filtered or unexported fields
}
func NewProjectionManager ¶
func NewProjectionManager(db *pgxpool.Pool) *ProjectionManager
func (ProjectionManager) CreateProjection ¶
func (pm ProjectionManager) CreateProjection(ctx context.Context, projectionName string, state interface{}, status eventstore.Status) error
func (ProjectionManager) DeleteProjection ¶
func (pm ProjectionManager) DeleteProjection(ctx context.Context, projectionName string) error
func (ProjectionManager) FetchProjectionStatus ¶
func (pm ProjectionManager) FetchProjectionStatus(ctx context.Context, projectionName string) (eventstore.Status, error)
func (ProjectionManager) LoadProjection ¶
func (ProjectionManager) PersistProjection ¶
func (ProjectionManager) ProjectionExists ¶
func (ProjectionManager) ResetProjection ¶
func (pm ProjectionManager) ResetProjection(ctx context.Context, projectionName string, state interface{}) error
func (ProjectionManager) UpdateProjectionStatus ¶
func (pm ProjectionManager) UpdateProjectionStatus(ctx context.Context, projectionName string, status eventstore.Status) error
Click to show internal directories.
Click to hide internal directories.