Documentation ¶
Index ¶
- type RentRepository
- func (r *RentRepository) AddRent(rent _entities.Rent) (_entities.Rent, error)
- func (r *RentRepository) Delete(id uint) error
- func (r *RentRepository) GetAll() ([]_entities.Rent, error)
- func (r *RentRepository) GetByBook(id uint) ([]_entities.Rent, error)
- func (r *RentRepository) GetByID(id uint) (_entities.Rent, error)
- func (r *RentRepository) GetByUser(id uint) ([]_entities.Rent, error)
- func (r *RentRepository) GetOneByUser(bookId uint, userId uint) (_entities.Rent, error)
- func (r *RentRepository) HasRent(book uint) (bool, error)
- func (r *RentRepository) Update(rent _entities.Rent) (_entities.Rent, error)
- type RentRepositoryInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RentRepository ¶
type RentRepository struct {
// contains filtered or unexported fields
}
func (*RentRepository) Delete ¶
func (r *RentRepository) Delete(id uint) error
func (*RentRepository) GetByBook ¶
func (r *RentRepository) GetByBook(id uint) ([]_entities.Rent, error)
func (*RentRepository) GetByUser ¶
func (r *RentRepository) GetByUser(id uint) ([]_entities.Rent, error)
func (*RentRepository) GetOneByUser ¶
type RentRepositoryInterface ¶
type RentRepositoryInterface interface { GetAll() ([]_entities.Rent, error) GetByID(id uint) (_entities.Rent, error) GetByBook(id uint) ([]_entities.Rent, error) GetByUser(id uint) ([]_entities.Rent, error) GetOneByUser(bookId uint, userId uint) (_entities.Rent, error) AddRent(rent _entities.Rent) (_entities.Rent, error) Update(rent _entities.Rent) (_entities.Rent, error) Delete(id uint) error HasRent(book uint) (bool, error) }
func NewRentRepository ¶
func NewRentRepository(db *gorm.DB, redis *redis.Client) RentRepositoryInterface
Click to show internal directories.
Click to hide internal directories.