resource

package
v0.147.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 11 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 any] func(testing.TB) ContractSubject[Entity, ID]

func (Contract[Entity, ID]) Benchmark

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

func (Contract[Entity, ID]) Spec

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

func (Contract[Entity, ID]) Test

func (c Contract[Entity, ID]) 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]
	}
	MetaAccessor  meta.MetaAccessor
	CommitManager comproto.OnePhaseCommitProtocol

	MakeContext func() context.Context
	MakeEntity  func() Entity
}

Jump to

Keyboard shortcuts

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