Documentation ¶
Index ¶
- Variables
- type CarsRepository
- func (c *CarsRepository) CreateCar(car *models.Car) (*models.Car, error)
- func (c *CarsRepository) DeleteCar(id string) (string, error)
- func (c *CarsRepository) GetCarByID(id string) (*models.Car, error)
- func (c *CarsRepository) GetCars(limit, offset *int) ([]*models.Car, error)
- func (c *CarsRepository) UpdateCar(id string, car *models.Car) (*models.Car, error)
- type DriversRepository
- func (d *DriversRepository) CreateDriver(driver *models.Driver) (*models.Driver, error)
- func (d *DriversRepository) Delete(id string) (string, error)
- func (d *DriversRepository) GetDriverByID(id string) (*models.Driver, error)
- func (d *DriversRepository) GetDrivers(limit, offset *int) ([]*models.Driver, error)
- func (d *DriversRepository) Update(id string, driver *models.Driver) (*models.Driver, error)
- type UsersRepository
- func (u *UsersRepository) CreateUser(user *models.User) (*models.User, error)
- func (u *UsersRepository) DeleteUser(id string) (string, error)
- func (u *UsersRepository) GetAllUsers(limit, offset *int) ([]*models.User, error)
- func (u *UsersRepository) GetUserByEmail(email string) (*models.User, error)
- func (u *UsersRepository) GetUserByField(field, value string) (*models.User, error)
- func (u *UsersRepository) GetUserByID(id string) (*models.User, error)
- func (u *UsersRepository) UpdateRefresh(user *models.User, refreshToken string) (*models.User, error)
- func (u *UsersRepository) UpdateUser(id string, user *models.User) (*models.User, error)
- type WaybillsRepository
- func (w *WaybillsRepository) CreateWaybill(waybill *models.Waybill) (*models.Waybill, error)
- func (w *WaybillsRepository) DeleteWaybill(id string) (string, error)
- func (w *WaybillsRepository) GetAllWaybills(limit, offset *int) ([]*models.Waybill, error)
- func (w *WaybillsRepository) GetAllWaybillsByUserID(id string, limit, offset *int) ([]*models.Waybill, error)
- func (w *WaybillsRepository) GetWaybillByID(id string) (*models.Waybill, error)
- func (w *WaybillsRepository) UpdateWaybill(id string, waybill *models.Waybill) (*models.Waybill, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DB *gorm.DB
)
Functions ¶
This section is empty.
Types ¶
type CarsRepository ¶
func (*CarsRepository) GetCarByID ¶
func (c *CarsRepository) GetCarByID(id string) (*models.Car, error)
type DriversRepository ¶
func (*DriversRepository) CreateDriver ¶
func (*DriversRepository) GetDriverByID ¶
func (d *DriversRepository) GetDriverByID(id string) (*models.Driver, error)
func (*DriversRepository) GetDrivers ¶
func (d *DriversRepository) GetDrivers(limit, offset *int) ([]*models.Driver, error)
type UsersRepository ¶
func (*UsersRepository) CreateUser ¶
func (*UsersRepository) DeleteUser ¶
func (u *UsersRepository) DeleteUser(id string) (string, error)
func (*UsersRepository) GetAllUsers ¶
func (u *UsersRepository) GetAllUsers(limit, offset *int) ([]*models.User, error)
func (*UsersRepository) GetUserByEmail ¶
func (u *UsersRepository) GetUserByEmail(email string) (*models.User, error)
func (*UsersRepository) GetUserByField ¶
func (u *UsersRepository) GetUserByField(field, value string) (*models.User, error)
func (*UsersRepository) GetUserByID ¶
func (u *UsersRepository) GetUserByID(id string) (*models.User, error)
func (*UsersRepository) UpdateRefresh ¶
func (*UsersRepository) UpdateUser ¶
type WaybillsRepository ¶
func (*WaybillsRepository) CreateWaybill ¶
func (*WaybillsRepository) DeleteWaybill ¶
func (w *WaybillsRepository) DeleteWaybill(id string) (string, error)
func (*WaybillsRepository) GetAllWaybills ¶
func (w *WaybillsRepository) GetAllWaybills(limit, offset *int) ([]*models.Waybill, error)
func (*WaybillsRepository) GetAllWaybillsByUserID ¶
func (*WaybillsRepository) GetWaybillByID ¶
func (w *WaybillsRepository) GetWaybillByID(id string) (*models.Waybill, error)
func (*WaybillsRepository) UpdateWaybill ¶
Click to show internal directories.
Click to hide internal directories.