resource

package
v0.81.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract[Ent, ID, V any] struct {
	Subject func(testing.TB) ContractSubject[Ent, ID]
	MakeCtx func(testing.TB) context.Context
	MakeEnt func(testing.TB) Ent
	MakeV   func(testing.TB) V
}

func (Contract[Ent, ID, V]) Benchmark

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

func (Contract[Ent, ID, V]) Spec

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

func (Contract[Ent, ID, V]) Test

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

type ContractSubject

type ContractSubject[Ent, ID any] struct {
	Resource interface {
		crud.Creator[Ent]
		crud.Finder[Ent, ID]
		crud.Updater[Ent]
		crud.Deleter[ID]
		pubsub.CreatorPublisher[Ent]
		pubsub.UpdaterPublisher[Ent]
		pubsub.DeleterPublisher[ID]
	}
	MetaAccessor  meta.MetaAccessor
	CommitManager comproto.OnePhaseCommitProtocol
}

type Subscriber

type Subscriber[Ent, ID any] interface {
	pubsub.CreatorSubscriber[Ent]
	pubsub.UpdaterSubscriber[Ent]
	pubsub.DeleterSubscriber[ID]
}

Jump to

Keyboard shortcuts

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