Documentation
¶
Index ¶
- type AuditCRUDRepository
- func (acr *AuditCRUDRepository[E, ID]) Change(ctx context.Context, entity E) (E, error)
- func (acr *AuditCRUDRepository[E, ID]) Create(ctx context.Context, entity E) (E, error)
- func (acr *AuditCRUDRepository[E, ID]) Delete(ctx context.Context, id ID) error
- func (acr *AuditCRUDRepository[E, ID]) Find(ctx context.Context, id ID) (E, error)
- func (acr *AuditCRUDRepository[E, ID]) List(ctx context.Context, limit, offset int) ([]E, error)
- type AuditOwnedRepository
- func (aor *AuditOwnedRepository[E, ID, OwnerID]) Change(ctx context.Context, ownerID OwnerID, entity E) (E, error)
- func (aor *AuditOwnedRepository[E, ID, OwnerID]) Create(ctx context.Context, ownerID OwnerID, entity E) (E, error)
- func (aor *AuditOwnedRepository[E, ID, OwnerID]) Delete(ctx context.Context, ownerID OwnerID, id ID) error
- func (aor *AuditOwnedRepository[E, ID, OwnerID]) DeleteAll(ctx context.Context, ownerID OwnerID) error
- func (aor *AuditOwnedRepository[E, ID, OwnerID]) Find(ctx context.Context, ownerID OwnerID, id ID) (E, error)
- func (aor *AuditOwnedRepository[E, ID, OwnerID]) List(ctx context.Context, ownerID OwnerID, limit, offset int) ([]E, error)
- func (aor *AuditOwnedRepository[E, ID, OwnerID]) ListAll(ctx context.Context, ownerID OwnerID) ([]E, error)
- func (aor *AuditOwnedRepository[E, ID, OwnerID]) ListAllByOwners(ctx context.Context, ownerIDs ...OwnerID) (map[OwnerID][]E, error)
- func (aor *AuditOwnedRepository[E, ID, OwnerID]) Save(ctx context.Context, ownerID OwnerID, owned []E) ([]E, error)
- type AuditableEntity
- type AuditableMapper
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
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)
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
Click to show internal directories.
Click to hide internal directories.