Documentation ¶
Index ¶
- type RentUseCase
- func (r *RentUseCase) AddRent(user _entities.User, data helper.RentRequest) (_entities.Rent, error)
- func (r *RentUseCase) GetAll() ([]_entities.Rent, error)
- func (r *RentUseCase) GetByBook(id uint) ([]_entities.Rent, error)
- func (r *RentUseCase) GetByID(id uint) (_entities.Rent, error)
- func (r *RentUseCase) GetByUser(id uint) ([]_entities.Rent, error)
- func (r *RentUseCase) GetOneByUser(id uint, userId uint) (_entities.Rent, error)
- func (r *RentUseCase) IsBookRented(bookId uint) (bool, error)
- func (r *RentUseCase) Return(id uint) error
- func (r *RentUseCase) Update(rent _entities.Rent) (_entities.Rent, error)
- type RentUseCaseInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RentUseCase ¶
type RentUseCase struct {
// contains filtered or unexported fields
}
func (*RentUseCase) AddRent ¶
func (r *RentUseCase) AddRent(user _entities.User, data helper.RentRequest) (_entities.Rent, error)
func (*RentUseCase) GetOneByUser ¶
func (*RentUseCase) IsBookRented ¶
func (r *RentUseCase) IsBookRented(bookId uint) (bool, error)
func (*RentUseCase) Return ¶
func (r *RentUseCase) Return(id uint) error
type RentUseCaseInterface ¶
type RentUseCaseInterface interface { GetAll() ([]_entities.Rent, error) GetByID(id uint) (_entities.Rent, error) GetByUser(id uint) ([]_entities.Rent, error) GetOneByUser(bookId uint, userId uint) (_entities.Rent, error) AddRent(user _entities.User, rent helper.RentRequest) (_entities.Rent, error) Update(rent _entities.Rent) (_entities.Rent, error) Return(id uint) error IsBookRented(bookId uint) (bool, error) GetByBook(id uint) ([]_entities.Rent, error) }
func NewRentUseCase ¶
func NewRentUseCase(rentRepository _rentRepository.RentRepositoryInterface, addressRepository _addressRepository.AddressRepositoryInterface) RentUseCaseInterface
Click to show internal directories.
Click to hide internal directories.