resource

package
v0.94.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 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[Entity, ID, V any] struct {
	MakeSubject func(testing.TB) ContractSubject[Entity, ID]
	MakeContext func(testing.TB) context.Context
	MakeEntity  func(testing.TB) Entity
	MakeV       func(testing.TB) V
}

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

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

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

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

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

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

type ContractSubject

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

type Subscriber

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

Jump to

Keyboard shortcuts

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