repository

package
v0.0.0-...-da7c574 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Paginate

func Paginate(page, perPage int) func(db *gorm.DB) *gorm.DB

Types

type UserRepository

type UserRepository interface {
	RegisterUser(ctx context.Context, tx *gorm.DB, user entity.User) (entity.User, error)
	GetAllUserWithPagination(ctx context.Context, tx *gorm.DB, req dto.PaginationRequest) (dto.GetAllUserRepositoryResponse, error)
	GetUserById(ctx context.Context, tx *gorm.DB, userId string) (entity.User, error)
	GetUserByEmail(ctx context.Context, tx *gorm.DB, email string) (entity.User, error)
	CheckEmail(ctx context.Context, tx *gorm.DB, email string) (entity.User, bool, error)
	UpdateUser(ctx context.Context, tx *gorm.DB, user entity.User) (entity.User, error)
	DeleteUser(ctx context.Context, tx *gorm.DB, userId string) error
}

func NewUserRepository

func NewUserRepository(db *gorm.DB) UserRepository

Jump to

Keyboard shortcuts

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