Documentation ¶
Index ¶
- type IMiddlewareStudentRepo
- type IStudentRepo
- type IStudentService
- type Student
- type StudentController
- func (sc *StudentController) GetRegisteredSubjects(c *gin.Context)
- func (sc *StudentController) GetRegisteredTutors(c *gin.Context)
- func (sc *StudentController) Profile(c *gin.Context)
- func (sc *StudentController) RegisterSubject(c *gin.Context)
- func (sc *StudentController) RegisterTutor(c *gin.Context)
- func (sc *StudentController) SignUp(c *gin.Context)
- type StudentRepo
- type StudentService
- func (ss *StudentService) GetRegisteredSubjects(userId primitive.ObjectID) ([]*subject.Subject, error)
- func (ss *StudentService) GetRegisteredTutors(userId primitive.ObjectID) ([]*utils.StudentRegisteredTutorRes, error)
- func (ss *StudentService) GetStudent(id primitive.ObjectID) (*Student, error)
- func (ss *StudentService) RegisterSubject(subjectId primitive.ObjectID, userId primitive.ObjectID) error
- func (ss *StudentService) RegisterTutor(tutorId primitive.ObjectID, userId primitive.ObjectID) error
- func (ss *StudentService) SignUpStudent(student *Student) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMiddlewareStudentRepo ¶
type IStudentRepo ¶
type IStudentService ¶
type IStudentService interface { SignUpStudent(student *Student) error GetStudent(id primitive.ObjectID) (*Student, error) RegisterSubject(subjectId primitive.ObjectID, userId primitive.ObjectID) error GetRegisteredSubjects(userId primitive.ObjectID) ([]*subject.Subject, error) RegisterTutor(tutorId primitive.ObjectID, userId primitive.ObjectID) error GetRegisteredTutors(userId primitive.ObjectID) ([]*utils.StudentRegisteredTutorRes, error) }
type StudentController ¶
type StudentController struct {
// contains filtered or unexported fields
}
func NewStudentController ¶
func NewStudentController(studentService IStudentService) *StudentController
func (*StudentController) GetRegisteredSubjects ¶
func (sc *StudentController) GetRegisteredSubjects(c *gin.Context)
func (*StudentController) GetRegisteredTutors ¶
func (sc *StudentController) GetRegisteredTutors(c *gin.Context)
func (*StudentController) Profile ¶
func (sc *StudentController) Profile(c *gin.Context)
func (*StudentController) RegisterSubject ¶
func (sc *StudentController) RegisterSubject(c *gin.Context)
func (*StudentController) RegisterTutor ¶
func (sc *StudentController) RegisterTutor(c *gin.Context)
func (*StudentController) SignUp ¶
func (sc *StudentController) SignUp(c *gin.Context)
type StudentRepo ¶
type StudentRepo struct {
// contains filtered or unexported fields
}
func NewStudentRepo ¶
func NewStudentRepo(db db.IDatabase) *StudentRepo
func (*StudentRepo) CreateStudent ¶
func (sr *StudentRepo) CreateStudent(Student *Student) error
func (*StudentRepo) GetStudent ¶
func (sr *StudentRepo) GetStudent(filter interface{}) (*Student, error)
func (*StudentRepo) StudentExists ¶
func (sr *StudentRepo) StudentExists(filter interface{}) (bool, error)
func (*StudentRepo) UpdateStudent ¶
func (sr *StudentRepo) UpdateStudent(filter interface{}, update interface{}) error
type StudentService ¶
type StudentService struct {
// contains filtered or unexported fields
}
func NewStudentService ¶
func NewStudentService( studentRepo IStudentRepo, verificationTokenManager utils.IVerificationTokenManager, accessTokenManager utils.IAccessTokenManager, emailManager utils.IEmailManager, subjectRepo subject.IStudentSubjectRepo, tutorRepo tutor.IStudentTutorRepo, studentSubjectTutorRepo subject.IStudentSubjectTutorRepo, baseUrl string, ) *StudentService
func (*StudentService) GetRegisteredSubjects ¶
func (*StudentService) GetRegisteredTutors ¶
func (ss *StudentService) GetRegisteredTutors(userId primitive.ObjectID) ([]*utils.StudentRegisteredTutorRes, error)
func (*StudentService) GetStudent ¶
func (ss *StudentService) GetStudent(id primitive.ObjectID) (*Student, error)
func (*StudentService) RegisterSubject ¶
func (*StudentService) RegisterTutor ¶
func (*StudentService) SignUpStudent ¶
func (ss *StudentService) SignUpStudent(student *Student) error
Click to show internal directories.
Click to hide internal directories.