Documentation
¶
Index ¶
- 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
- type BaseAuditCRUDRepository
- func (acr *BaseAuditCRUDRepository[E, ID]) Change(ctx context.Context, entity E) (E, error)
- func (acr *BaseAuditCRUDRepository[E, ID]) Create(ctx context.Context, entity E) (E, error)
- func (acr *BaseAuditCRUDRepository[E, ID]) Delete(ctx context.Context, id ID) error
- func (acr *BaseAuditCRUDRepository[E, ID]) Find(ctx context.Context, id ID) (E, error)
- func (acr *BaseAuditCRUDRepository[E, ID]) GetAuditClient() client.DataAuditClient
- func (acr *BaseAuditCRUDRepository[E, ID]) GetLogger() logger.Logger
- func (acr *BaseAuditCRUDRepository[E, ID]) GetSource() string
- func (acr *BaseAuditCRUDRepository[E, ID]) List(ctx context.Context, limit, offset int) ([]E, error)
- func (acr *BaseAuditCRUDRepository[E, ID]) Unwrap() domain.CRUDRepository[E, ID]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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[E domain.Entity[ID], ID comparable] func(entity E) pkgdomain.Auditable
type BaseAuditCRUDRepository ¶ added in v0.0.13
type BaseAuditCRUDRepository[E AuditableEntity[ID], ID comparable] struct { // contains filtered or unexported fields }
func NewBaseAuditCRUDRepository ¶ added in v0.0.13
func NewBaseAuditCRUDRepository[E AuditableEntity[ID], ID comparable]( next domain.CRUDRepository[E, ID], source string, mapper AuditableMapper[E, ID], auditClient client.DataAuditClient, log logger.Logger, ) *BaseAuditCRUDRepository[E, ID]
func (*BaseAuditCRUDRepository[E, ID]) Change ¶ added in v0.0.13
func (acr *BaseAuditCRUDRepository[E, ID]) Change(ctx context.Context, entity E) (E, error)
func (*BaseAuditCRUDRepository[E, ID]) Create ¶ added in v0.0.13
func (acr *BaseAuditCRUDRepository[E, ID]) Create(ctx context.Context, entity E) (E, error)
func (*BaseAuditCRUDRepository[E, ID]) Delete ¶ added in v0.0.13
func (acr *BaseAuditCRUDRepository[E, ID]) Delete(ctx context.Context, id ID) error
func (*BaseAuditCRUDRepository[E, ID]) Find ¶ added in v0.0.13
func (acr *BaseAuditCRUDRepository[E, ID]) Find(ctx context.Context, id ID) (E, error)
func (*BaseAuditCRUDRepository[E, ID]) GetAuditClient ¶ added in v0.0.13
func (acr *BaseAuditCRUDRepository[E, ID]) GetAuditClient() client.DataAuditClient
func (*BaseAuditCRUDRepository[E, ID]) GetLogger ¶ added in v0.0.13
func (acr *BaseAuditCRUDRepository[E, ID]) GetLogger() logger.Logger
func (*BaseAuditCRUDRepository[E, ID]) GetSource ¶ added in v0.0.13
func (acr *BaseAuditCRUDRepository[E, ID]) GetSource() string
func (*BaseAuditCRUDRepository[E, ID]) List ¶ added in v0.0.13
func (acr *BaseAuditCRUDRepository[E, ID]) List(ctx context.Context, limit, offset int) ([]E, error)
func (*BaseAuditCRUDRepository[E, ID]) Unwrap ¶ added in v0.0.13
func (acr *BaseAuditCRUDRepository[E, ID]) Unwrap() domain.CRUDRepository[E, ID]
Unwrap get decorable repository
Click to show internal directories.
Click to hide internal directories.