Documentation ¶
Index ¶
- type DBDriverRepository
- type DBTripRepository
- type DBUserRepository
- type DriverRepository
- type MockRepository
- func (repo *MockRepository) AddDriver(driver models.User) error
- func (repo *MockRepository) FinishTripForDriver(driver models.User) error
- func (repo *MockRepository) GetDrivers(pageSize uint, pageNum uint) ([]models.User, error)
- func (repo *MockRepository) GetDriversByStatus(pageSize uint, pageNum uint, isOnTrip bool) ([]models.User, error)
- func (repo *MockRepository) GetUserByEmail(email string) (models.User, error)
- func (repo *MockRepository) StartNewTripForDriver(driver models.User) error
- type TripRepository
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBDriverRepository ¶
type DBDriverRepository struct {
// contains filtered or unexported fields
}
func NewDBDriverRepository ¶
func NewDBDriverRepository(db *sqlx.DB) *DBDriverRepository
func (*DBDriverRepository) AddDriver ¶
func (repo *DBDriverRepository) AddDriver(driver models.User) error
func (*DBDriverRepository) GetDrivers ¶
func (*DBDriverRepository) GetDriversByStatus ¶
type DBTripRepository ¶
type DBTripRepository struct {
// contains filtered or unexported fields
}
func NewDBTripRepository ¶
func NewDBTripRepository(db *sqlx.DB) *DBTripRepository
func (*DBTripRepository) FinishTripForDriver ¶
func (repo *DBTripRepository) FinishTripForDriver(driverId uint) error
func (*DBTripRepository) StartNewTripForDriver ¶
func (repo *DBTripRepository) StartNewTripForDriver(driverId uint) error
type DBUserRepository ¶
type DBUserRepository struct {
// contains filtered or unexported fields
}
func NewDBUserRepository ¶
func NewDBUserRepository(db *sqlx.DB) *DBUserRepository
func (*DBUserRepository) GetUserByEmail ¶
func (repo *DBUserRepository) GetUserByEmail(email string) (models.User, error)
type DriverRepository ¶
type MockRepository ¶
func NewMockRepository ¶
func NewMockRepository(initialUsers ...models.User) *MockRepository
func (*MockRepository) FinishTripForDriver ¶
func (repo *MockRepository) FinishTripForDriver(driver models.User) error
func (*MockRepository) GetDrivers ¶
func (*MockRepository) GetDriversByStatus ¶
func (*MockRepository) GetUserByEmail ¶
func (repo *MockRepository) GetUserByEmail(email string) (models.User, error)
func (*MockRepository) StartNewTripForDriver ¶
func (repo *MockRepository) StartNewTripForDriver(driver models.User) error
type TripRepository ¶
Click to show internal directories.
Click to hide internal directories.