ehmocks

package
v2.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandHandlerMock

type CommandHandlerMock struct {
	mock.Mock
}

CommandHandlerMock is a mock implementation of eh.CommandHandler

func (*CommandHandlerMock) HandleCommand

func (c *CommandHandlerMock) HandleCommand(ctx context.Context, command eh.Command) error

type EntityFake

type EntityFake struct {
	ID uuid.UUID
}

func (*EntityFake) EntityID

func (e *EntityFake) EntityID() uuid.UUID

type EventStoreMock

type EventStoreMock struct {
	mock.Mock
}

func (*EventStoreMock) Close

func (e *EventStoreMock) Close() error

func (*EventStoreMock) Load

func (e *EventStoreMock) Load(ctx context.Context, u uuid.UUID) ([]eh.Event, error)

func (*EventStoreMock) LoadFrom

func (e *EventStoreMock) LoadFrom(ctx context.Context, id uuid.UUID, version int) ([]eh.Event, error)

func (*EventStoreMock) Save

func (e *EventStoreMock) Save(ctx context.Context, events []eh.Event, originalVersion int) error

type ReadRepoMock

type ReadRepoMock struct {
	mock.Mock
}

func (*ReadRepoMock) Close

func (r *ReadRepoMock) Close() error

func (*ReadRepoMock) Find

func (r *ReadRepoMock) Find(ctx context.Context, u uuid.UUID) (eh.Entity, error)

func (*ReadRepoMock) FindAll

func (r *ReadRepoMock) FindAll(ctx context.Context) ([]eh.Entity, error)

func (*ReadRepoMock) InnerRepo

func (r *ReadRepoMock) InnerRepo(ctx context.Context) eh.ReadRepo

func (*ReadRepoMock) Remove

func (r *ReadRepoMock) Remove(ctx context.Context, uuid uuid.UUID) error

func (*ReadRepoMock) Save

func (r *ReadRepoMock) Save(ctx context.Context, entity eh.Entity) error

type VersionedEntityMock

type VersionedEntityMock struct {
	mock.Mock
}

func (*VersionedEntityMock) AggregateVersion

func (s *VersionedEntityMock) AggregateVersion() int

func (*VersionedEntityMock) EntityID

func (s *VersionedEntityMock) EntityID() uuid.UUID

Jump to

Keyboard shortcuts

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