Documentation
¶
Index ¶
- type AppointmentRepository
- func (r *AppointmentRepository) AddTimeSlot(timeSlot *model.TimeSlot) (string, error)
- func (r *AppointmentRepository) CreateAppointment(appointment *model.Appointment) (string, error)
- func (r *AppointmentRepository) GetAllAppointments(userId string) (map[string]model.Appointment, error)
- func (r *AppointmentRepository) GetAppointmentById(appointmentId string) (*model.Appointment, error)
- func (r *AppointmentRepository) GetTimeSlotById(timeSlotId string) (*model.TimeSlot, error)
- func (r *AppointmentRepository) GetTimeSlotsByExpertId(expertId string) ([]*model.TimeSlot, error)
- func (r *AppointmentRepository) UpdateTimeSlotAvailability(timeSlotId string, available bool) error
- type AuthRepository
- type EvaluationRepository
- func (c *EvaluationRepository) AddVideoEvaluation(videoEvaluation model.Emotion) (string, error)
- func (c *EvaluationRepository) AddVoiceEvaluation(voiceEvaluation model.VoiceEvaluation) (string, error)
- func (c *EvaluationRepository) GetVideoEvaluationById(evaluationId string) (*model.Emotion, error)
- func (c *EvaluationRepository) GetVoiceEvaluationById(evaluationId string) (*model.VoiceEvaluation, error)
- type ExpertRepository
- func (r *ExpertRepository) AddExpert(expert *model.Expert) (string, error)
- func (r *ExpertRepository) GetAllExperts() (map[string]*model.Expert, error)
- func (r *ExpertRepository) GetExpertById(expertId string) (*model.Expert, error)
- func (r *ExpertRepository) UpdateExpert(expertId string, schedule []model.Schedule) error
- type LessonRepository
- type LevelRepository
- func (c *LevelRepository) AddLevel(level model.Level) (string, error)
- func (c *LevelRepository) AddSectionToLevel(levelId string, sectionId string) error
- func (c *LevelRepository) GetAllLevels() (map[string]model.Level, error)
- func (c *LevelRepository) GetLevelById(levelId string) (*model.Level, error)
- type QuestionRepository
- func (c *QuestionRepository) AddQuestion(question model.Question) (string, error)
- func (c *QuestionRepository) GetEvaluationByQuestionId(questionId string) (string, error)
- func (c *QuestionRepository) GetHint(questionId string) (string, error)
- func (c *QuestionRepository) GetQuestionById(questionId string) (*model.Question, error)
- type SectionRepository
- func (c *SectionRepository) AddLessonToSection(sectionId string, lessonId string) error
- func (c *SectionRepository) AddQuestionToSection(sectionId string, questionId string) error
- func (c *SectionRepository) AddSection(section model.Section) (string, error)
- func (c *SectionRepository) DeleteSectionProgress(userId string, sectionId string) error
- func (c *SectionRepository) GetNextSectionId(sectionId string) (string, error)
- func (c *SectionRepository) GetNoOfItems(sectionId string, itemType string) (int, error)
- func (c *SectionRepository) GetQuestionsAndLessons(sectionId string) ([]string, []string, error)
- func (c *SectionRepository) GetSectionById(sectionId string) (*response.Section, error)
- func (c *SectionRepository) GetTimeStamp(userId string, sectionId string) (int64, error)
- func (c *SectionRepository) StoreSectionProgress(userId string, sectionId string) (*model.SectionProgress, error)
- func (c *SectionRepository) UpdateSectionProgress(userId string, sectionId string, xp int) (int, int, error)
- type TestRepository
- func (c *TestRepository) ClearTestSession(sessionId string, sectionId string) error
- func (c *TestRepository) GetAllQuestionResults(sessionId string, sectionId string) ([]model.TestAnswerEval, error)
- func (c *TestRepository) GetTestSession(sessionId string, sectionId string) (*model.TestSession, error)
- func (c *TestRepository) StoreQuestionResult(sessionId string, sectionId string, testEval *model.TestAnswerEval) error
- func (c *TestRepository) StoreTestSession(sessionId string, sectionId string) error
- type UserCourseRepository
- func (r *UserCourseRepository) AddUserCourse(userId string, levelsForUser *response.LevelsForUser) error
- func (c *UserCourseRepository) GetUserCourse(userId string) (*model.UserCourse, error)
- func (c *UserCourseRepository) GetUserProgress(userId string) (*model.UserProgress, error)
- func (c *UserCourseRepository) UpdateUserProgress(userId string, levelInc bool) error
- type UserRepository
- func (c *UserRepository) CreateNewUser(user model.User) (string, error)
- func (c *UserRepository) GetUserById(userId string) (*model.User, error)
- func (c *UserRepository) GetUserDetailsFromEmail(email string) (*model.User, error)
- func (c *UserRepository) GetXP(userId string) (int, error)
- func (c *UserRepository) UpdateUserXP(userId string, xp int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppointmentRepository ¶
type AppointmentRepository struct {
// contains filtered or unexported fields
}
func NewAppointmentRepository ¶
func NewAppointmentRepository(db *db.Client) *AppointmentRepository
func (*AppointmentRepository) AddTimeSlot ¶
func (r *AppointmentRepository) AddTimeSlot(timeSlot *model.TimeSlot) (string, error)
func (*AppointmentRepository) CreateAppointment ¶
func (r *AppointmentRepository) CreateAppointment(appointment *model.Appointment) (string, error)
func (*AppointmentRepository) GetAllAppointments ¶
func (r *AppointmentRepository) GetAllAppointments(userId string) (map[string]model.Appointment, error)
func (*AppointmentRepository) GetAppointmentById ¶
func (r *AppointmentRepository) GetAppointmentById(appointmentId string) (*model.Appointment, error)
func (*AppointmentRepository) GetTimeSlotById ¶
func (r *AppointmentRepository) GetTimeSlotById(timeSlotId string) (*model.TimeSlot, error)
func (*AppointmentRepository) GetTimeSlotsByExpertId ¶
func (r *AppointmentRepository) GetTimeSlotsByExpertId(expertId string) ([]*model.TimeSlot, error)
func (*AppointmentRepository) UpdateTimeSlotAvailability ¶
func (r *AppointmentRepository) UpdateTimeSlotAvailability(timeSlotId string, available bool) error
type AuthRepository ¶
type AuthRepository struct {
// contains filtered or unexported fields
}
func NewAuthRepository ¶
func NewAuthRepository(auth *auth.Client) *AuthRepository
func (*AuthRepository) VerifyFirebaseToken ¶
func (c *AuthRepository) VerifyFirebaseToken(token string) (bool, string, error)
type EvaluationRepository ¶
type EvaluationRepository struct {
// contains filtered or unexported fields
}
func NewEvaluation ¶
func NewEvaluation(db *db.Client) *EvaluationRepository
func (*EvaluationRepository) AddVideoEvaluation ¶
func (c *EvaluationRepository) AddVideoEvaluation(videoEvaluation model.Emotion) (string, error)
func (*EvaluationRepository) AddVoiceEvaluation ¶
func (c *EvaluationRepository) AddVoiceEvaluation(voiceEvaluation model.VoiceEvaluation) (string, error)
func (*EvaluationRepository) GetVideoEvaluationById ¶
func (c *EvaluationRepository) GetVideoEvaluationById(evaluationId string) (*model.Emotion, error)
func (*EvaluationRepository) GetVoiceEvaluationById ¶
func (c *EvaluationRepository) GetVoiceEvaluationById(evaluationId string) (*model.VoiceEvaluation, error)
type ExpertRepository ¶
type ExpertRepository struct {
// contains filtered or unexported fields
}
func NewExpertRepository ¶
func NewExpertRepository(db *db.Client) *ExpertRepository
func (*ExpertRepository) AddExpert ¶
func (r *ExpertRepository) AddExpert(expert *model.Expert) (string, error)
func (*ExpertRepository) GetAllExperts ¶
func (r *ExpertRepository) GetAllExperts() (map[string]*model.Expert, error)
func (*ExpertRepository) GetExpertById ¶
func (r *ExpertRepository) GetExpertById(expertId string) (*model.Expert, error)
func (*ExpertRepository) UpdateExpert ¶
func (r *ExpertRepository) UpdateExpert(expertId string, schedule []model.Schedule) error
type LessonRepository ¶
type LessonRepository struct {
// contains filtered or unexported fields
}
func NewLessonRepository ¶
func NewLessonRepository(db *db.Client) *LessonRepository
func (*LessonRepository) AddLesson ¶
func (r *LessonRepository) AddLesson(lesson model.Lesson) (string, error)
func (*LessonRepository) GetLessonById ¶
func (r *LessonRepository) GetLessonById(lessonId string) (*model.Lesson, error)
type LevelRepository ¶
type LevelRepository struct {
// contains filtered or unexported fields
}
func NewLevelRepository ¶
func NewLevelRepository(db *db.Client) *LevelRepository
func (*LevelRepository) AddLevel ¶
func (c *LevelRepository) AddLevel(level model.Level) (string, error)
func (*LevelRepository) AddSectionToLevel ¶
func (c *LevelRepository) AddSectionToLevel(levelId string, sectionId string) error
func (*LevelRepository) GetAllLevels ¶
func (c *LevelRepository) GetAllLevels() (map[string]model.Level, error)
func (*LevelRepository) GetLevelById ¶
func (c *LevelRepository) GetLevelById(levelId string) (*model.Level, error)
type QuestionRepository ¶
type QuestionRepository struct {
// contains filtered or unexported fields
}
func NewQuestionRepository ¶
func NewQuestionRepository(db *db.Client) *QuestionRepository
func (*QuestionRepository) AddQuestion ¶
func (c *QuestionRepository) AddQuestion(question model.Question) (string, error)
func (*QuestionRepository) GetEvaluationByQuestionId ¶
func (c *QuestionRepository) GetEvaluationByQuestionId(questionId string) (string, error)
func (*QuestionRepository) GetHint ¶
func (c *QuestionRepository) GetHint(questionId string) (string, error)
func (*QuestionRepository) GetQuestionById ¶
func (c *QuestionRepository) GetQuestionById(questionId string) (*model.Question, error)
type SectionRepository ¶
type SectionRepository struct {
// contains filtered or unexported fields
}
func NewSectionRepository ¶
func NewSectionRepository(db *db.Client, rdb *redis.Client) *SectionRepository
func (*SectionRepository) AddLessonToSection ¶
func (c *SectionRepository) AddLessonToSection(sectionId string, lessonId string) error
func (*SectionRepository) AddQuestionToSection ¶
func (c *SectionRepository) AddQuestionToSection(sectionId string, questionId string) error
func (*SectionRepository) AddSection ¶
func (c *SectionRepository) AddSection(section model.Section) (string, error)
func (*SectionRepository) DeleteSectionProgress ¶
func (c *SectionRepository) DeleteSectionProgress(userId string, sectionId string) error
func (*SectionRepository) GetNextSectionId ¶
func (c *SectionRepository) GetNextSectionId(sectionId string) (string, error)
func (*SectionRepository) GetNoOfItems ¶
func (c *SectionRepository) GetNoOfItems(sectionId string, itemType string) (int, error)
func (*SectionRepository) GetQuestionsAndLessons ¶
func (c *SectionRepository) GetQuestionsAndLessons(sectionId string) ([]string, []string, error)
func (*SectionRepository) GetSectionById ¶
func (c *SectionRepository) GetSectionById(sectionId string) (*response.Section, error)
func (*SectionRepository) GetTimeStamp ¶
func (c *SectionRepository) GetTimeStamp(userId string, sectionId string) (int64, error)
func (*SectionRepository) StoreSectionProgress ¶
func (c *SectionRepository) StoreSectionProgress(userId string, sectionId string) (*model.SectionProgress, error)
func (*SectionRepository) UpdateSectionProgress ¶
type TestRepository ¶
type TestRepository struct {
// contains filtered or unexported fields
}
func NewTestRepository ¶
func NewTestRepository(rdb *redis.Client) *TestRepository
func (*TestRepository) ClearTestSession ¶
func (c *TestRepository) ClearTestSession(sessionId string, sectionId string) error
func (*TestRepository) GetAllQuestionResults ¶
func (c *TestRepository) GetAllQuestionResults(sessionId string, sectionId string) ([]model.TestAnswerEval, error)
func (*TestRepository) GetTestSession ¶
func (c *TestRepository) GetTestSession(sessionId string, sectionId string) (*model.TestSession, error)
func (*TestRepository) StoreQuestionResult ¶
func (c *TestRepository) StoreQuestionResult(sessionId string, sectionId string, testEval *model.TestAnswerEval) error
func (*TestRepository) StoreTestSession ¶
func (c *TestRepository) StoreTestSession(sessionId string, sectionId string) error
type UserCourseRepository ¶
type UserCourseRepository struct {
// contains filtered or unexported fields
}
func NewUserCourseRepository ¶
func NewUserCourseRepository(db *db.Client) *UserCourseRepository
func (*UserCourseRepository) AddUserCourse ¶
func (r *UserCourseRepository) AddUserCourse(userId string, levelsForUser *response.LevelsForUser) error
func (*UserCourseRepository) GetUserCourse ¶
func (c *UserCourseRepository) GetUserCourse(userId string) (*model.UserCourse, error)
func (*UserCourseRepository) GetUserProgress ¶
func (c *UserCourseRepository) GetUserProgress(userId string) (*model.UserProgress, error)
func (*UserCourseRepository) UpdateUserProgress ¶
func (c *UserCourseRepository) UpdateUserProgress(userId string, levelInc bool) error
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(db *db.Client) *UserRepository
func (*UserRepository) CreateNewUser ¶
func (c *UserRepository) CreateNewUser(user model.User) (string, error)
func (*UserRepository) GetUserById ¶
func (c *UserRepository) GetUserById(userId string) (*model.User, error)
func (*UserRepository) GetUserDetailsFromEmail ¶
func (c *UserRepository) GetUserDetailsFromEmail(email string) (*model.User, error)
func (*UserRepository) UpdateUserXP ¶
func (c *UserRepository) UpdateUserXP(userId string, xp int) error
Click to show internal directories.
Click to hide internal directories.