decorators

package
v2.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByIDFinder

type ByIDFinder[Entity eh.Entity] struct {
	eh.ReadRepo
	// contains filtered or unexported fields
}

ByIDFinder is a decorator for ReadRepo that adds a FindById method.

func NewByIdFinder

func NewByIdFinder[Entity eh.Entity](readRepo eh.ReadRepo) *ByIDFinder[Entity]

NewByIdFinder decorates a read repo with a FindById method.

func (*ByIDFinder[Entity]) FindById

func (r *ByIDFinder[Entity]) FindById(ctx context.Context, id ids.Id) (Entity, error)

Jump to

Keyboard shortcuts

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