Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FindAllCriteria ¶
type OverviewCriteria ¶
type UserRepository ¶
type UserRepository interface { WithTx(tx *gorm.DB) UserRepository TransactWithDefaultRetry(ctx context.Context, operation func(tx *gorm.DB) error) error FindOneByID(ctx context.Context, id uint) (user *entities.User, err error) FindOneByIDForUpdate(ctx context.Context, id uint) (*entities.User, error) FindOneByEmailWithExclusiveLock(ctx context.Context, email string) (*entities.User, error) FindAll(ctx context.Context, pagination *models.Pagination) (page *models.Page[*entities.User], err error) FindAllByCriteria( ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[FindAllCriteria], ) (page *models.Page[*entities.User], err error) Overview( ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[OverviewCriteria], ) (page *models.Page[*userModels.SenderOverview], err error) Create(ctx context.Context, user *entities.User) (*entities.User, error) Save(ctx context.Context, user *entities.User) (*entities.User, error) DeleteByID(ctx context.Context, id uint) error Count(ctx context.Context) (int64, error) }
func NewUserRepository ¶
func NewUserRepository( userEntityRepository persistence.EntityRepository[entities.User], queryTemplateEngine sqlTemplate.QueryTemplateEngine, ) UserRepository
NewUserRepository creates a new user repository.
Click to show internal directories.
Click to hide internal directories.