mocks

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityMapper

type EntityMapper struct {
	SetEntityFunc  func(entity.E, int64) error
	SetEntityCount int32
	GetEntityFunc  func(entity.Subset) (entity.E, error)
	GetEntityCount int32
	DelEntityFunc  func(entity.Subset) error
	DelEntityCount int32
}

EntityMapper mocks entity.Mapper.

func NewEntityMapper

func NewEntityMapper() *EntityMapper

NewEntityMapper returns a entity service mock ready for usage.

func (*EntityMapper) DelEntity

func (m *EntityMapper) DelEntity(subset entity.Subset) error

DelEntity mocks entity.Mapper.

func (*EntityMapper) GetEntity

func (m *EntityMapper) GetEntity(subset entity.Subset) (entity.E, error)

GetEntity mocks entity.Mapper.

func (*EntityMapper) SetEntity

func (m *EntityMapper) SetEntity(e entity.E, ts int64) error

SetEntity mocks entity.Mapper.

type EventMapper

type EventMapper struct {
	SetEventFunc   func(event.E, ulid.ID) error
	SetEventCount  int32
	ListEventFunc  func(event.Subset) ([]event.E, error)
	ListEventCount int32
}

EventMapper mocks event.Mapper.

func NewEventMapper

func NewEventMapper() *EventMapper

NewEventMapper returns a event service mock ready for usage.

func (*EventMapper) ListEvent

func (s *EventMapper) ListEvent(subset event.Subset) ([]event.E, error)

ListEvent mocks event.Mapper.

func (*EventMapper) SetEvent

func (s *EventMapper) SetEvent(e event.E, id ulid.ID) error

SetEvent mocks event.Mapper.

type SectorEntitiesMapper

type SectorEntitiesMapper struct {
	GetEntitiesFunc           func(sector.EntitiesSubset) (sector.Entities, error)
	GetEntitiesCount          int32
	AddEntityToSectorFunc     func(ulid.ID, ulid.ID) error
	AddEntityToSectorCount    int32
	RemoveEntityToSectorFunc  func(ulid.ID, ulid.ID) error
	RemoveEntityToSectorCount int32
}

SectorEntitiesMapper mocks sector.EntitiesMapper.

func NewSectorEntitiesMapper

func NewSectorEntitiesMapper() *SectorEntitiesMapper

NewSectorEntitiesMapper returns a event service mock ready for usage.

func (*SectorEntitiesMapper) AddEntityToSector

func (m *SectorEntitiesMapper) AddEntityToSector(entityID ulid.ID, sectorID ulid.ID) error

AddEntityToSector mocks sector.EntitiesMapper.

func (*SectorEntitiesMapper) GetEntities

func (m *SectorEntitiesMapper) GetEntities(subset sector.EntitiesSubset) (sector.Entities, error)

GetEntities mocks sector.EntitiesMapper.

func (*SectorEntitiesMapper) RemoveEntityToSector

func (m *SectorEntitiesMapper) RemoveEntityToSector(entityID ulid.ID, sectorID ulid.ID) error

RemoveEntityToSector mocks sector.EntitiesMapper.

type SectorMapper

type SectorMapper struct {
	SetSectorFunc  func(sector.S) error
	SetSectorCount int32
	GetSectorFunc  func(sector.Subset) (sector.S, error)
	GetSectorCount int32
}

SectorMapper mocks sector.Mapper.

func NewSectorMapper

func NewSectorMapper() *SectorMapper

NewSectorMapper returns a s service mock ready for usage.

func (*SectorMapper) GetSector

func (m *SectorMapper) GetSector(subset sector.Subset) (sector.S, error)

GetSector mocks sector.Mapper.

func (*SectorMapper) SetSector

func (m *SectorMapper) SetSector(s sector.S) error

SetSector mocks sector.Mapper.

Jump to

Keyboard shortcuts

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