Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DoctorRepository ¶
type DoctorRepository interface { GetAllDoctors() ([]*models.Doctor, error) GetDoctorByID(id int) (*models.Doctor, error) AddDoctor(doctor *models.Doctor) error UpdateDoctor(doctor *models.Doctor) error DeleteDoctor(id int) error }
DoctorRepository defines the interface for doctor-related data operations
func NewDoctorRepository ¶
func NewDoctorRepository(db *sql.DB) DoctorRepository
NewDoctorRepository initializes a new doctor repository
type PatientRepository ¶
type PatientRepository interface { AddPatient(patient *models.Patient) error GetPatientByID(id int) (*models.Patient, error) GetAllPatients() ([]*models.Patient, error) UpdatePatient(patient *models.Patient) error DeletePatient(id int) error }
PatientRepository is the interface for Patient repository
func NewPatientRepository ¶
func NewPatientRepository(db *sql.DB) PatientRepository
NewPatientRepository initializes a new patient repository
type UserRepository ¶
type UserRepository interface { // GetUser returns a user by the given ID GetUserByID(id int) (*models.User, error) // AddUser adds a new user AddUser(user *models.User) error // DeleteUser deletes a user by the given ID DeleteUser(id int) error // UpdateUser updates a user UpdateUser(user *models.User) error }
UserRepository is the interface for User repository
Click to show internal directories.
Click to hide internal directories.