interfaces

package
v0.0.0-...-038e035 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppointmentHandler

type AppointmentHandler interface {
	CreateAppointment(c *fiber.Ctx) error
	GetAllAppointments(c *fiber.Ctx) error
	GetAppointmentByID(c *fiber.Ctx) error
}

type AppointmentRepository

type AppointmentRepository interface {
	AddTimeSlot(timeSlot *model.TimeSlot) (string, error)
	GetTimeSlotById(timeSlotId string) (*model.TimeSlot, error)
	GetTimeSlotsByExpertId(expertId string) ([]*model.TimeSlot, error)
	CreateAppointment(appointment *model.Appointment) (string, error)
	UpdateTimeSlotAvailability(timeSlotId string, available bool) error
	GetAllAppointments(userId string) (map[string]model.Appointment, error)
	GetAppointmentById(appointmentId string) (*model.Appointment, error)
}

type AppointmentRoutes

type AppointmentRoutes interface {
	AppointmentRoutes(app *fiber.App)
}

type AppointmentService

type AppointmentService interface {
	CreateAppointment(timeSlotId string, userId string) (*response.CreateAppointmentResponse, error)
	GetAllAppointments(userId string) ([]response.GetAllAppointmentsResponse, error)
	GetAppointmentById(appointmentId string) (*response.GetAppointmentByIdResponse, error)
}

type AuthHandler

type AuthHandler interface {
	Login(c *fiber.Ctx) error
	Register(c *fiber.Ctx) error
}

type AuthRepository

type AuthRepository interface {
	VerifyFirebaseToken(token string) (bool, string, error)
}

type AuthRoutes

type AuthRoutes interface {
	AuthRoutes(app *fiber.App)
}

type AuthService

type AuthService interface {
	Login(reqBody *request.LoginRequest) (*response.AuthResponse, error)
	Register(reqBody *request.RegisterRequest) (*response.AuthResponse, error)
}

type EvaluationHandler

type EvaluationHandler interface {
	EvaluateSubjectiveAnswer(c *fiber.Ctx) error
	EvaluateObjectiveAnswer(c *fiber.Ctx) error
	EvaluateVoiceAnswer(c *fiber.Ctx) error
}

type EvaluationRepository

type EvaluationRepository interface {
	AddVoiceEvaluation(voiceEvaluation model.VoiceEvaluation) (string, error)
	GetVoiceEvaluationById(evaluationId string) (*model.VoiceEvaluation, error)
	GetVideoEvaluationById(evaluationId string) (*model.Emotion, error)
	AddVideoEvaluation(videoEvaluation model.Emotion) (string, error)
}

type EvaluationService

type EvaluationService interface {
	EvaluateSubjectiveAnswer(userId string, req *request.EvaluateSubjectiveAnswerReq) (*response.EvaluateSubjectiveAnswerResponse, error)
	EvaluateObjectiveAnswer(userId string, req *request.EvaluateObjectiveAnswerReq) (*response.EvaluateObjectiveAnswerResponse, error)
	EvaluateVoiceAnswer(userId string, req *request.EvaluateVoiceAnswerReq, buf []byte) (*response.EvaluateVoiceAnswerResponse, error)
}

type ExpertHandler

type ExpertHandler interface {
	AddExpert(c *fiber.Ctx) error
	GetExpertById(c *fiber.Ctx) error
	GetAllExperts(c *fiber.Ctx) error
	GetExpertSchedule(c *fiber.Ctx) error
}

type ExpertRepository

type ExpertRepository interface {
	AddExpert(expert *model.Expert) (string, error)
	GetExpertById(expertId string) (*model.Expert, error)
	GetAllExperts() (map[string]*model.Expert, error)
	UpdateExpert(expertId string, schedule []model.Schedule) error
}

type ExpertService

type ExpertService interface {
	AddExpert(req *request.AddExpertRequest) (*response.AddExpertResponse, error)
	GetExpertById(expertId string) (*response.GetExpertResponse, error)
	GetAllExperts() ([]*response.GetExpertResponse, error)
	GetExpertSchedule(expertId string) (*response.GetExpertScheduleResponse, error)
}

type GeminiService

type GeminiService interface {
	GenerateUserCourse(user model.User, levelDetails []map[string]string) (*response.LevelsForUser, error)
	EvaluateUserAnswer(user *model.User, question *model.Question, userAnswer []string) (*model.UserAnswerEvalutaion, error)
	FormatVoiceEvaluationResponse(obtainedVoiceEvaluation *response.VoiceEvaluation, desiredVoiceEvaluation *model.VoiceEvaluation) (*model.UserAnswerEvalutaion, error)
	EvaluateTestAnswer(Answer string, question *model.Question, obtainedVideoEvaluation *response.QuestionResult, desiredVideoEvaluation *model.Emotion) (*model.TestAnswerEval, error)
}

type LessonHandler

type LessonHandler interface {
	AddLesson(c *fiber.Ctx) error
}

type LessonRepository

type LessonRepository interface {
	AddLesson(lesson model.Lesson) (string, error)
	GetLessonById(lessonId string) (*model.Lesson, error)
}

type LessonRoutes

type LessonRoutes interface {
	LessonRoutes(app *fiber.App)
}

type LessonService

type LessonService interface {
	AddLesson(req *request.AddLessonRequest) (*response.AddLessonResponse, error)
}

type LevelHandler

type LevelHandler interface {
	AddLevel(c *fiber.Ctx) error
	AddCompleteLevel(c *fiber.Ctx) error
}

type LevelRepository

type LevelRepository interface {
	AddLevel(level model.Level) (string, error)
	AddSectionToLevel(levelId string, sectionId string) error
	GetAllLevels() (map[string]model.Level, error)
	GetLevelById(levelId string) (*model.Level, error)
}

type LevelRoutes

type LevelRoutes interface {
	LevelRoutes(app *fiber.App)
}

type LevelService

type LevelService interface {
	AddLevel(req *request.AddLevelRequest) (*response.AddLevelResponse, error)
	AddCompleteLevel(req *request.AddCompleteLevelRequest) (*response.AddLevelResponse, error)
}

type QuestionHandler

type QuestionHandler interface {
	AddQuestion(c *fiber.Ctx) error
	GetHint(c *fiber.Ctx) error
}

type QuestionRepository

type QuestionRepository interface {
	AddQuestion(question model.Question) (string, error)
	GetQuestionById(questionId string) (*model.Question, error)
	GetHint(questionId string) (string, error)
	GetEvaluationByQuestionId(questionId string) (string, error)
}

type QuestionRoutes

type QuestionRoutes interface {
	QuestionRoutes(app *fiber.App)
}

type QuestionService

type QuestionService interface {
	AddQuestion(req *request.AddQuestionRequest) (*response.AddQuestionResponse, error)
	GetHint(questionId string) (*response.GetHintResponse, error)
}

type SectionHandler

type SectionHandler interface {
	AddSection(c *fiber.Ctx) error
	GetSection(c *fiber.Ctx) error
	UpdateSectionProgress(c *fiber.Ctx) error
}

type SectionRepository

type SectionRepository interface {
	AddSection(section model.Section) (string, error)
	AddQuestionToSection(sectionId string, questionId string) error
	AddLessonToSection(sectionId string, lessonId string) error
	GetQuestionsAndLessons(sectionId string) ([]string, []string, error)
	GetNoOfItems(sectionId string, itemType string) (int, error)
	StoreSectionProgress(userId string, sectionId string) (*model.SectionProgress, error)
	UpdateSectionProgress(userId string, sectionId string, xp int) (int, int, error)
	GetNextSectionId(sectionId string) (string, error)
	GetSectionById(sectionId string) (*response.Section, error)
	DeleteSectionProgress(userId string, sectionId string) error
	GetTimeStamp(userId string, sectionId string) (int64, error)
}

type SectionRoutes

type SectionRoutes interface {
	SectionRoutes(app *fiber.App)
}

type SectionService

type SectionService interface {
	AddSection(req *request.AddSectionRequest) (*response.AddSectionResponse, error)
	GetSectionData(userId string, sectionId string) (*response.SectionData, error)
	AddCompleteSection(section *request.SectionData, levelId string) error
	UpdateSectionProgress(userId string, lessonId string) error
	GetTestData(sectionId string) (*response.SectionData, error)
}

type SocketHandler

type SocketHandler interface {
	HandleWebSocket() func(c *fiber.Ctx) error
}

type SocketService

type SocketService interface {
	HandleConnection(kws *socketio.Websocket)
}

type TestHandler

type TestHandler interface {
	GetTestResult(c *fiber.Ctx) error
	UploadImage(c *fiber.Ctx) error
	UploadText(c *fiber.Ctx) error
	RetryQuestion(c *fiber.Ctx) error
}

type TestRepository

type TestRepository interface {
	StoreTestSession(sessionId string, sectionId string) error
	StoreQuestionResult(sessionId string, sectionId string, testEval *model.TestAnswerEval) error
	GetTestSession(sessionId string, sectionId string) (*model.TestSession, error)
	GetAllQuestionResults(sessionId string, sectionId string) ([]model.TestAnswerEval, error)
	ClearTestSession(sessionId string, sectionId string) error
}

type TestRoutes

type TestRoutes interface {
	TestRoutes(app *fiber.App)
}

type TestService

type TestService interface {
	EvaluateTestAnswer(message *request.TestData) (bool, error)
	EvaluateImageAnswer(message *request.TestData) error
	GetTestResult(userId string, sessionId string, sectionId string) (*response.TestResultResponse, error)
	RetryQuestion(sessionId string, questionId string) error
}

type UserCourseHandler

type UserCourseHandler interface {
	GetUserCourse(c *fiber.Ctx) error
}

type UserCourseRepository

type UserCourseRepository interface {
	AddUserCourse(userId string, levelsForUser *response.LevelsForUser) error
	GetUserCourse(userId string) (*model.UserCourse, error)
	UpdateUserProgress(userId string, levelInc bool) error
	GetUserProgress(userId string) (*model.UserProgress, error)
}

type UserCourseRoutes

type UserCourseRoutes interface {
	UserCourseRoutes(app *fiber.App)
}

type UserCourseService

type UserCourseService interface {
	TailorUserCourse(userId string, user model.User) error
	GetUserCourse(userId string) (*response.UserCourseResponse, error)
	UpdateUserProgress(userId string, sectionId string, xp int) error
	GetUserProgress(userId string) (*model.UserProgress, error)
}

type UserHandler

type UserHandler interface {
	GetXP(c *fiber.Ctx) error
}

type UserRepository

type UserRepository interface {
	CreateNewUser(user model.User) (string, error)
	GetUserDetailsFromEmail(email string) (*model.User, error)
	GetUserById(userId string) (*model.User, error)
	UpdateUserXP(userId string, xp int) error
	GetXP(userId string) (int, error)
}

type UserRoutes

type UserRoutes interface {
	UserRoutes(app *fiber.App)
}

type UserService

type UserService interface {
	GetXP(userId string) (*response.GetXP, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL