Documentation ¶
Index ¶
- type ModelRepository
- func (*ModelRepository[Model, ID]) Delete(ctx context.Context, a Model) error
- func (*ModelRepository[Model, ID]) Fetch(ctx context.Context, id ID) (Model, error)
- func (*ModelRepository[Model, ID]) Save(ctx context.Context, a Model) error
- func (*ModelRepository[Model, ID]) Use(ctx context.Context, id ID, fn func(Model) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelRepository ¶
type ModelRepository[Model model.Model[ID], ID model.ID] struct { // contains filtered or unexported fields }
ModelRepository is a Nats KV backed model repository.
func (*ModelRepository[Model, ID]) Delete ¶
func (*ModelRepository[Model, ID]) Delete(ctx context.Context, a Model) error
Delete implements model.Repository
func (*ModelRepository[Model, ID]) Fetch ¶
func (*ModelRepository[Model, ID]) Fetch(ctx context.Context, id ID) (Model, error)
Fetch implements model.Repository
Click to show internal directories.
Click to hide internal directories.