test

package
v0.0.0-...-75a04d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeResourceChangedEvent

func MakeResourceChangedEvent(id, deviceID string, content pb.Content, eventMetadata pb.EventMetadata) event.EventUnmarshaler

func MakeResourcePublishedEvent

func MakeResourcePublishedEvent(resource pb.Resource, eventMetadata pb.EventMetadata) event.EventUnmarshaler

func MakeResourceRetrievePending

func MakeResourceRetrievePending(deviceId, resourceId string, resourceInterface string, eventMetadata pb.EventMetadata) event.EventUnmarshaler

func MakeResourceRetrieved

func MakeResourceRetrieved(deviceId, resourceId string, status pb.Status, content pb.Content, eventMetadata pb.EventMetadata) event.EventUnmarshaler

func MakeResourceStateSnapshotTaken

func MakeResourceStateSnapshotTaken(isPublished bool, resource pb.Resource, latestResourceChange pb.ResourceChanged, eventMetadata pb.EventMetadata) event.EventUnmarshaler

func MakeResourceUnpublishedEvent

func MakeResourceUnpublishedEvent(id, deviceID string, eventMetadata pb.EventMetadata) event.EventUnmarshaler

func MakeResourceUpdatePending

func MakeResourceUpdatePending(deviceId, resourceId string, content pb.Content, eventMetadata pb.EventMetadata) event.EventUnmarshaler

func MakeResourceUpdated

func MakeResourceUpdated(deviceId, resourceId string, status pb.Status, content pb.Content, eventMetadata pb.EventMetadata) event.EventUnmarshaler

Types

type MockEventStore

type MockEventStore struct {
	// contains filtered or unexported fields
}

func NewMockEventStore

func NewMockEventStore() *MockEventStore

func (*MockEventStore) Append

func (e *MockEventStore) Append(groupId, aggregateId string, ev event.EventUnmarshaler)

func (*MockEventStore) GetInstanceId

func (s *MockEventStore) GetInstanceId(ctx context.Context, groupId, aggregateId string) (int64, error)

func (*MockEventStore) LoadFromSnapshot

func (s *MockEventStore) LoadFromSnapshot(ctx context.Context, queries []eventstore.SnapshotQuery, eventHandler event.Handler) error

func (*MockEventStore) LoadFromVersion

func (s *MockEventStore) LoadFromVersion(ctx context.Context, queries []eventstore.VersionQuery, eventHandler event.Handler) error

func (*MockEventStore) LoadUpToVersion

func (s *MockEventStore) LoadUpToVersion(ctx context.Context, queries []eventstore.VersionQuery, eventHandler event.Handler) error

LoadUpToVersion loads aggragate events up to a specific version.

func (*MockEventStore) RemoveInstanceId

func (s *MockEventStore) RemoveInstanceId(ctx context.Context, instanceId int64) error

func (*MockEventStore) RemoveUpToVersion

func (s *MockEventStore) RemoveUpToVersion(ctx context.Context, queries []eventstore.VersionQuery) error

RemoveUpToVersion deletes the aggragates events up to a specific version.

func (*MockEventStore) Save

func (s *MockEventStore) Save(ctx context.Context, groupId, aggregateId string, events []event.Event) (concurrencyException bool, err error)

func (*MockEventStore) SaveSnapshot

func (s *MockEventStore) SaveSnapshot(ctx context.Context, groupId, aggregateId string, event event.Event) (concurrencyException bool, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL