contracts

package
v0.70.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityStorage

type EntityStorage[Ent, ID any] struct {
	Subject func(testing.TB) (cache.EntityStorage[Ent, ID], frameless.OnePhaseCommitProtocol)
	MakeCtx func(testing.TB) context.Context
	MakeEnt func(testing.TB) Ent
}

func (EntityStorage[Ent, ID]) Benchmark

func (c EntityStorage[Ent, ID]) Benchmark(b *testing.B)

func (EntityStorage[Ent, ID]) Spec

func (c EntityStorage[Ent, ID]) Spec(s *testcase.Spec)

func (EntityStorage[Ent, ID]) Test

func (c EntityStorage[Ent, ID]) Test(t *testing.T)

type Manager

type Manager[Ent, ID any] struct {
	Subject func(testing.TB) ManagerSubject[Ent, ID]
	MakeCtx func(testing.TB) context.Context
	MakeEnt func(testing.TB) Ent
}

func (Manager[Ent, ID]) Benchmark

func (c Manager[Ent, ID]) Benchmark(b *testing.B)

func (Manager[Ent, ID]) ManagerSubject added in v0.63.0

func (c Manager[Ent, ID]) ManagerSubject() testcase.Var[ManagerSubject[Ent, ID]]

func (Manager[Ent, ID]) Spec

func (c Manager[Ent, ID]) Spec(s *testcase.Spec)

func (Manager[Ent, ID]) Test

func (c Manager[Ent, ID]) Test(t *testing.T)

type ManagerSubject added in v0.63.0

type ManagerSubject[Ent, ID any] struct {
	Cache         Cache[Ent, ID]
	Source        cache.Source[Ent, ID]
	CommitManager frameless.OnePhaseCommitProtocol
}

type SpySource added in v0.63.0

type SpySource[Ent, ID any] struct {
	cache.Source[Ent, ID]
	// contains filtered or unexported fields
}

func (*SpySource[Ent, ID]) FindByID added in v0.63.0

func (stub *SpySource[Ent, ID]) FindByID(ctx context.Context, id ID) (_ent Ent, _found bool, _err error)

type Storage

type Storage[Ent, ID any] struct {
	Subject func(testing.TB) cache.Storage[Ent, ID]
	Context func(testing.TB) context.Context
	MakeEnt func(testing.TB) Ent
}

func (Storage[Ent, ID]) Benchmark

func (c Storage[Ent, ID]) Benchmark(b *testing.B)

func (Storage[Ent, ID]) Spec

func (c Storage[Ent, ID]) Spec(s *testcase.Spec)

func (Storage[Ent, ID]) Test

func (c Storage[Ent, ID]) Test(t *testing.T)

Jump to

Keyboard shortcuts

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