resource

package
v0.235.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contract

func Contract[Entity any, ID comparable](subject ContractSubject[Entity, ID], opts ...Option[Entity, ID]) contract.Contract

Types

type Config added in v0.217.0

type Config[Entity any, ID comparable] struct {
	CRUD          crudcontracts.Config[Entity, ID]
	MetaAccessor  meta.MetaAccessor
	CommitManager comproto.OnePhaseCommitProtocol
}

func (Config[Entity, ID]) Configure added in v0.217.0

func (c Config[Entity, ID]) Configure(t *Config[Entity, ID])

func (*Config[Entity, ID]) Init added in v0.217.0

func (c *Config[Entity, ID]) Init()

type ContractSubject

type ContractSubject[Entity any, ID comparable] interface {
	crud.Creator[Entity]
	crud.Finder[Entity, ID]
	crud.Updater[Entity]
	crud.Deleter[ID]
}

type Option added in v0.217.0

type Option[Entity any, ID comparable] interface {
	option.Option[Config[Entity, ID]]
}

Jump to

Keyboard shortcuts

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