Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[Entity any, ID comparable] func(testing.TB) CacheSubject[Entity, ID]
type CacheSubject ¶
type CacheSubject[Entity any, ID comparable] struct { Cache cacheCache[Entity, ID] Source cacheSource[Entity, ID] Repository cache.Repository[Entity, ID] MakeContext func() context.Context MakeEntity func() Entity // ChangeEntity is an optional configuration field // to express what Entity fields are allowed to be changed by the user of the Updater. // For example, if the changed Entity field is ignored by the Update method, // you can match this by not changing the Entity field as part of the ChangeEntity function. ChangeEntity func(*Entity) }
type EntityRepository ¶
type EntityRepository[Entity, ID any] func(testing.TB) EntityRepositorySubject[Entity, ID]
func (EntityRepository[Entity, ID]) Benchmark ¶
func (c EntityRepository[Entity, ID]) Benchmark(b *testing.B)
func (EntityRepository[Entity, ID]) Spec ¶
func (c EntityRepository[Entity, ID]) Spec(s *testcase.Spec)
func (EntityRepository[Entity, ID]) Test ¶
func (c EntityRepository[Entity, ID]) Test(t *testing.T)
type EntityRepositorySubject ¶ added in v0.132.0
type EntityRepositorySubject[Entity, ID any] struct { EntityRepository cache.EntityRepository[Entity, ID] CommitManager comproto.OnePhaseCommitProtocol MakeContext func() context.Context MakeEntity func() Entity // ChangeEntity is an optional configuration field // to express what Entity fields are allowed to be changed by the user of the Updater. // For example, if the changed Entity field is ignored by the Update method, // you can match this by not changing the Entity field as part of the ChangeEntity function. ChangeEntity func(*Entity) }
type HitRepository ¶ added in v0.131.0
type HitRepository[EntID any] func(tb testing.TB) HitRepositorySubject[EntID]
func (HitRepository[EntID]) Benchmark ¶ added in v0.131.0
func (c HitRepository[EntID]) Benchmark(b *testing.B)
func (HitRepository[EntID]) Spec ¶ added in v0.131.0
func (c HitRepository[EntID]) Spec(s *testcase.Spec)
func (HitRepository[EntID]) Test ¶ added in v0.131.0
func (c HitRepository[EntID]) Test(t *testing.T)
type HitRepositorySubject ¶ added in v0.131.0
type HitRepositorySubject[EntID any] struct { Resource cache.HitRepository[EntID] CommitManager comproto.OnePhaseCommitProtocol MakeContext func() context.Context MakeHit func() cache.Hit[EntID] }
type Repository ¶
type Repository[Entity, ID any] func(testing.TB) RepositorySubject[Entity, ID]
func (Repository[Entity, ID]) Benchmark ¶
func (c Repository[Entity, ID]) Benchmark(b *testing.B)
func (Repository[Entity, ID]) Spec ¶
func (c Repository[Entity, ID]) Spec(s *testcase.Spec)
func (Repository[Entity, ID]) Test ¶
func (c Repository[Entity, ID]) Test(t *testing.T)
type RepositorySubject ¶ added in v0.132.0
type RepositorySubject[Entity, ID any] struct { Repository cache.Repository[Entity, ID] MakeContext func() context.Context MakeEntity func() Entity // ChangeEntity is an optional configuration field // to express what Entity fields are allowed to be changed by the user of the Updater. // For example, if the changed Entity field is ignored by the Update method, // you can match this by not changing the Entity field as part of the ChangeEntity function. ChangeEntity func(*Entity) }
Click to show internal directories.
Click to hide internal directories.