Documentation
¶
Index ¶
- func Cache[Entity any, ID comparable](cache CacheSubject[Entity, ID], source cacheSource[Entity, ID], ...) contract.Contract
- func EntityRepository[Entity any, ID comparable](subject cachepkg.EntityRepository[Entity, ID], ...) contract.Contract
- func HitRepository[EntID any](subject cachepkg.HitRepository[EntID], ...) contract.Contract
- func Repository[Entity any, ID comparable](subject cachepkg.Repository[Entity, ID], opts ...Option[Entity, ID]) contract.Contract
- type CacheSubject
- type Config
- type Option
- type SpySource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cache ¶
func Cache[Entity any, ID comparable]( cache CacheSubject[Entity, ID], source cacheSource[Entity, ID], repository cachepkg.Repository[Entity, ID], opts ...Option[Entity, ID], ) contract.Contract
func EntityRepository ¶
func EntityRepository[Entity any, ID comparable](subject cachepkg.EntityRepository[Entity, ID], commitManager comproto.OnePhaseCommitProtocol, opts ...Option[Entity, ID]) contract.Contract
func HitRepository ¶
func HitRepository[EntID any](subject cachepkg.HitRepository[EntID], commitManager comproto.OnePhaseCommitProtocol, opts ...crudcontracts.Option[cachepkg.Hit[EntID], cachepkg.HitID]) contract.Contract
func Repository ¶
func Repository[Entity any, ID comparable](subject cachepkg.Repository[Entity, ID], opts ...Option[Entity, ID]) contract.Contract
Types ¶
type CacheSubject ¶
type CacheSubject[Entity, ID any] interface { cachepkg.Interface[Entity, ID] crud.Creator[Entity] crud.ByIDFinder[Entity, ID] crud.AllFinder[Entity] crud.Updater[Entity] crud.ByIDDeleter[ID] crud.AllDeleter }
type Config ¶ added in v0.217.0
type Config[E any, ID comparable] struct { CRUD crudcontracts.Config[E, ID] MakeCache func(cache.Source[E, ID], cache.Repository[E, ID]) CacheSubject[E, ID] }
type Option ¶ added in v0.217.0
type Option[E any, ID comparable] interface { option.Option[Config[E, ID]] }
func CRUDOption ¶ added in v0.217.0
func CRUDOption[E any, ID comparable](opts ...crudcontracts.Option[E, ID]) Option[E, ID]
Click to show internal directories.
Click to hide internal directories.