service

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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGeminiService

func NewGeminiService(client *genai.Client) interfaces.GeminiService

func NewUserService

func NewUserService(userRepo interfaces.UserRepository) interfaces.UserService

Types

type AppointmentService

type AppointmentService struct {
	// contains filtered or unexported fields
}

func NewAppointmentService

func NewAppointmentService(appointmentRepository interfaces.AppointmentRepository, userRepo interfaces.UserRepository, expertRepo interfaces.ExpertRepository) *AppointmentService

func (*AppointmentService) CreateAppointment

func (s *AppointmentService) CreateAppointment(timeSlotId string, userId string) (*response.CreateAppointmentResponse, error)

func (*AppointmentService) GetAllAppointments

func (s *AppointmentService) GetAllAppointments(userId string) ([]response.GetAllAppointmentsResponse, error)

func (*AppointmentService) GetAppointmentById

func (s *AppointmentService) GetAppointmentById(appointmentId string) (*response.GetAppointmentByIdResponse, error)

type AuthService

type AuthService struct {
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(authRepository interfaces.AuthRepository, userCourseService interfaces.UserCourseService, userRepo interfaces.UserRepository) *AuthService

func (*AuthService) Login

func (c *AuthService) Login(reqBody *request.LoginRequest) (*response.AuthResponse, error)

func (*AuthService) Register

func (c *AuthService) Register(reqBody *request.RegisterRequest) (*response.AuthResponse, error)

type EvaluationService

type EvaluationService struct {
	// contains filtered or unexported fields
}

func NewEvaluationService

func NewEvaluationService(evaluationRepo interfaces.EvaluationRepository,
	questionRepo interfaces.QuestionRepository,
	geminiService interfaces.GeminiService,
	sectionRepo interfaces.SectionRepository,
	userCourseService interfaces.UserCourseService,
	userRepo interfaces.UserRepository,
	testRepo interfaces.TestRepository,
) *EvaluationService

func (*EvaluationService) EvaluateObjectiveAnswer

func (*EvaluationService) EvaluateSubjectiveAnswer

func (*EvaluationService) EvaluateVoiceAnswer

func (s *EvaluationService) EvaluateVoiceAnswer(userId string, req *request.EvaluateVoiceAnswerReq, buf []byte) (*response.EvaluateVoiceAnswerResponse, error)

type ExpertService

type ExpertService struct {
	// contains filtered or unexported fields
}

func NewExpertService

func NewExpertService(expertRepo interfaces.ExpertRepository, appointmentRepo interfaces.AppointmentRepository) *ExpertService

func (*ExpertService) AddExpert

func (*ExpertService) GetAllExperts

func (s *ExpertService) GetAllExperts() ([]*response.GetExpertResponse, error)

func (*ExpertService) GetExpertById

func (s *ExpertService) GetExpertById(expertId string) (*response.GetExpertResponse, error)

func (*ExpertService) GetExpertSchedule

func (s *ExpertService) GetExpertSchedule(expertId string) (*response.GetExpertScheduleResponse, error)

type LessonService

type LessonService struct {
	// contains filtered or unexported fields
}

func NewLessonService

func NewLessonService(lessonRepo interfaces.LessonRepository, sectionRepo interfaces.SectionRepository) *LessonService

func (*LessonService) AddLesson

type LevelService

type LevelService struct {
	// contains filtered or unexported fields
}

func NewLevelService

func NewLevelService(levelRepo interfaces.LevelRepository, sectionService interfaces.SectionService) *LevelService

func (*LevelService) AddCompleteLevel

func (*LevelService) AddLevel

type QuestionService

type QuestionService struct {
	UserCourseService interfaces.UserCourseService
	// contains filtered or unexported fields
}

func NewQuestionService

func NewQuestionService(
	questionRepo interfaces.QuestionRepository,
	sectionRepo interfaces.SectionRepository,
	geminiService interfaces.GeminiService,
	userRepo interfaces.UserRepository,
	UserCourseService interfaces.UserCourseService,
	evaluationRepo interfaces.EvaluationRepository) *QuestionService

func (*QuestionService) AddQuestion

func (*QuestionService) GetHint

func (s *QuestionService) GetHint(questionId string) (*response.GetHintResponse, error)

type SectionService

type SectionService struct {
	// contains filtered or unexported fields
}

func (*SectionService) AddCompleteSection

func (s *SectionService) AddCompleteSection(req *request.SectionData, levelId string) error

func (*SectionService) AddSection

func (*SectionService) GetSectionData

func (s *SectionService) GetSectionData(userId string, sectionId string) (*response.SectionData, error)

func (*SectionService) GetTestData

func (s *SectionService) GetTestData(sectionId string) (*response.SectionData, error)

func (*SectionService) UpdateSectionProgress

func (s *SectionService) UpdateSectionProgress(userId string, lessonId string) error

type TestService

type TestService struct {
	// contains filtered or unexported fields
}

func NewTestService

func NewTestService(geminiService interfaces.GeminiService,
	testRepo interfaces.TestRepository,
	sectionRepo interfaces.SectionRepository,
	questionRepo interfaces.QuestionRepository,
	evaluationRepo interfaces.EvaluationRepository,
	userCourseService interfaces.UserCourseService) *TestService

func (*TestService) EvaluateImageAnswer

func (s *TestService) EvaluateImageAnswer(message *request.TestData) error

func (*TestService) EvaluateTestAnswer

func (s *TestService) EvaluateTestAnswer(message *request.TestData) (bool, error)

func (*TestService) GetTestResult

func (s *TestService) GetTestResult(userId string, sessionId string, sectionId string) (*response.TestResultResponse, error)

func (*TestService) RetryQuestion

func (s *TestService) RetryQuestion(sessionId string, questionId string) error

type UserCourseService

type UserCourseService struct {
	// contains filtered or unexported fields
}

func (*UserCourseService) GetUserCourse

func (s *UserCourseService) GetUserCourse(userId string) (*response.UserCourseResponse, error)

func (*UserCourseService) GetUserProgress

func (s *UserCourseService) GetUserProgress(userId string) (*model.UserProgress, error)

func (*UserCourseService) TailorUserCourse

func (s *UserCourseService) TailorUserCourse(userId string, user model.User) error

func (*UserCourseService) UpdateUserProgress

func (s *UserCourseService) UpdateUserProgress(userId string, sectionId string, xp int) error

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

func (*UserService) GetXP

func (s *UserService) GetXP(userId string) (*response.GetXP, error)

Jump to

Keyboard shortcuts

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