repository

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditCRUDRepository

type AuditCRUDRepository[E AuditableEntity[ID], ID comparable] struct {
	// contains filtered or unexported fields
}

func NewAuditCRUDRepository

func NewAuditCRUDRepository[E AuditableEntity[ID], ID comparable](
	next domain.CRUDRepository[E, ID],
	source string,
	mapper AuditableMapper[ID],
	auditClient client.DataAuditClient,
	log logger.Logger,
) *AuditCRUDRepository[E, ID]

func (*AuditCRUDRepository[E, ID]) Change

func (acr *AuditCRUDRepository[E, ID]) Change(ctx context.Context, entity E) (E, error)

func (*AuditCRUDRepository[E, ID]) Create

func (acr *AuditCRUDRepository[E, ID]) Create(ctx context.Context, entity E) (E, error)

func (*AuditCRUDRepository[E, ID]) Delete

func (acr *AuditCRUDRepository[E, ID]) Delete(ctx context.Context, id ID) error

func (*AuditCRUDRepository[E, ID]) Find

func (acr *AuditCRUDRepository[E, ID]) Find(ctx context.Context, id ID) (E, error)

func (*AuditCRUDRepository[E, ID]) List

func (acr *AuditCRUDRepository[E, ID]) List(ctx context.Context, limit, offset int) ([]E, error)

type AuditOwnedRepository

type AuditOwnedRepository[E AuditableEntity[ID], ID comparable, OwnerID comparable] struct {
	// contains filtered or unexported fields
}

func (*AuditOwnedRepository[E, ID, OwnerID]) Change

func (aor *AuditOwnedRepository[E, ID, OwnerID]) Change(ctx context.Context, ownerID OwnerID, entity E) (E, error)

func (*AuditOwnedRepository[E, ID, OwnerID]) Create

func (aor *AuditOwnedRepository[E, ID, OwnerID]) Create(ctx context.Context, ownerID OwnerID, entity E) (E, error)

func (*AuditOwnedRepository[E, ID, OwnerID]) Delete

func (aor *AuditOwnedRepository[E, ID, OwnerID]) Delete(ctx context.Context, ownerID OwnerID, id ID) error

func (*AuditOwnedRepository[E, ID, OwnerID]) DeleteAll

func (aor *AuditOwnedRepository[E, ID, OwnerID]) DeleteAll(ctx context.Context, ownerID OwnerID) error

func (*AuditOwnedRepository[E, ID, OwnerID]) Find

func (aor *AuditOwnedRepository[E, ID, OwnerID]) Find(ctx context.Context, ownerID OwnerID, id ID) (E, error)

func (*AuditOwnedRepository[E, ID, OwnerID]) List

func (aor *AuditOwnedRepository[E, ID, OwnerID]) List(ctx context.Context, ownerID OwnerID, limit, offset int) ([]E, error)

func (*AuditOwnedRepository[E, ID, OwnerID]) ListAll

func (aor *AuditOwnedRepository[E, ID, OwnerID]) ListAll(ctx context.Context, ownerID OwnerID) ([]E, error)

func (*AuditOwnedRepository[E, ID, OwnerID]) ListAllByOwners

func (aor *AuditOwnedRepository[E, ID, OwnerID]) ListAllByOwners(ctx context.Context, ownerIDs ...OwnerID) (map[OwnerID][]E, error)

func (*AuditOwnedRepository[E, ID, OwnerID]) Save

func (aor *AuditOwnedRepository[E, ID, OwnerID]) Save(ctx context.Context, ownerID OwnerID, owned []E) ([]E, error)

type AuditableEntity

type AuditableEntity[ID comparable] interface {
	domain.Entity[ID]
	pkgdomain.Auditable
}

type AuditableMapper

type AuditableMapper[ID comparable] func(entity domain.Entity[ID]) pkgdomain.Auditable

Jump to

Keyboard shortcuts

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