resource

package
v0.300.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contract

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

Types

type Config

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

func (Config[ENT, ID]) Configure

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

func (*Config[ENT, ID]) Init

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

type ContractSubject

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

type Option

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

Jump to

Keyboard shortcuts

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