Documentation
¶
Index ¶
- Variables
- func ParseDateOrNow(dateStr string) (time.Time, error)
- type NotFoundError
- type ScheduleService
- func (s *ScheduleService) AddEmptyLessons(schedule *models.NumeratorDenominator[models.StudentWeek], times []string)
- func (s *ScheduleService) GetAllTeachers(ctx context.Context) (*models.TeachersList, error)
- func (s *ScheduleService) GetAuditorium(ctx context.Context, auditoriumID int) (*models.Auditorium, error)
- func (s *ScheduleService) GetAuditoriumSchedule(ctx context.Context, auditoriumID int, dateStr string) (*models.AuditoriumSchedule, error)
- func (s *ScheduleService) GetAuditoriumsList(ctx context.Context, buildingID int) ([]*models.Auditorium, error)
- func (s *ScheduleService) GetBuilding(ctx context.Context, buildingID int) (*models.Building, error)
- func (s *ScheduleService) GetBuildingsList(ctx context.Context) ([]*models.Building, error)
- func (s *ScheduleService) GetCourseFaculties(ctx context.Context, course int) (*models.CourseFaculties, error)
- func (s *ScheduleService) GetDay(ctx context.Context) (*models.Day, error)
- func (s *ScheduleService) GetFaculties(ctx context.Context) (*models.Faculties, error)
- func (s *ScheduleService) GetFacultiesWithCourses(ctx context.Context) (*models.FacultiesCourses, error)
- func (s *ScheduleService) GetFacultyCourses(ctx context.Context, facultyName string) (*models.FacultyCourses, error)
- func (s *ScheduleService) GetGroups(ctx context.Context, facultyName string, course int) (*models.CourseFacultyGroups, error)
- func (s *ScheduleService) GetLessonTypes() []models.LessonType
- func (s *ScheduleService) GetScheduleByGroup(ctx context.Context, group string, addEmptyLessons bool, dateStr string) (*models.StudentSchedule, error)
- func (s *ScheduleService) GetSchedulesByGroups(ctx context.Context, dateStr string, groups []string) ([]*models.StudentSchedule, error)
- func (s *ScheduleService) GetTeacherSchedule(ctx context.Context, teacherID int, dateStr string) (*models.TeacherSchedule, error)
- func (s *ScheduleService) GetTeachersDepartments(ctx context.Context, facultyID int) ([]*models.Department, error)
- func (s *ScheduleService) GetTeachersFaculties(ctx context.Context, departmentID int) ([]*models.Faculty, error)
- func (s *ScheduleService) GetTeachersList(ctx context.Context, facultyID, departmentID int) (*models.TeachersList, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidDateFormat = errors.New("invalid date format, expected YYYY-MM-DD")
Functions ¶
Types ¶
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type ScheduleService ¶
type ScheduleService struct {
Repo *repo.ScheduleRepo
}
func NewScheduleService ¶
func NewScheduleService(scheduleRepo *repo.ScheduleRepo) *ScheduleService
func (*ScheduleService) AddEmptyLessons ¶
func (s *ScheduleService) AddEmptyLessons(schedule *models.NumeratorDenominator[models.StudentWeek], times []string)
func (*ScheduleService) GetAllTeachers ¶
func (s *ScheduleService) GetAllTeachers(ctx context.Context) (*models.TeachersList, error)
func (*ScheduleService) GetAuditorium ¶
func (s *ScheduleService) GetAuditorium(ctx context.Context, auditoriumID int) (*models.Auditorium, error)
func (*ScheduleService) GetAuditoriumSchedule ¶
func (s *ScheduleService) GetAuditoriumSchedule(ctx context.Context, auditoriumID int, dateStr string) (*models.AuditoriumSchedule, error)
func (*ScheduleService) GetAuditoriumsList ¶
func (s *ScheduleService) GetAuditoriumsList(ctx context.Context, buildingID int) ([]*models.Auditorium, error)
func (*ScheduleService) GetBuilding ¶
func (*ScheduleService) GetBuildingsList ¶
func (*ScheduleService) GetCourseFaculties ¶
func (s *ScheduleService) GetCourseFaculties(ctx context.Context, course int) (*models.CourseFaculties, error)
func (*ScheduleService) GetFaculties ¶
func (*ScheduleService) GetFacultiesWithCourses ¶
func (s *ScheduleService) GetFacultiesWithCourses(ctx context.Context) (*models.FacultiesCourses, error)
func (*ScheduleService) GetFacultyCourses ¶
func (s *ScheduleService) GetFacultyCourses(ctx context.Context, facultyName string) (*models.FacultyCourses, error)
func (*ScheduleService) GetGroups ¶
func (s *ScheduleService) GetGroups(ctx context.Context, facultyName string, course int) (*models.CourseFacultyGroups, error)
func (*ScheduleService) GetLessonTypes ¶
func (s *ScheduleService) GetLessonTypes() []models.LessonType
func (*ScheduleService) GetScheduleByGroup ¶
func (s *ScheduleService) GetScheduleByGroup(ctx context.Context, group string, addEmptyLessons bool, dateStr string) (*models.StudentSchedule, error)
func (*ScheduleService) GetSchedulesByGroups ¶
func (s *ScheduleService) GetSchedulesByGroups(ctx context.Context, dateStr string, groups []string) ([]*models.StudentSchedule, error)
func (*ScheduleService) GetTeacherSchedule ¶
func (s *ScheduleService) GetTeacherSchedule(ctx context.Context, teacherID int, dateStr string) (*models.TeacherSchedule, error)
func (*ScheduleService) GetTeachersDepartments ¶
func (s *ScheduleService) GetTeachersDepartments(ctx context.Context, facultyID int) ([]*models.Department, error)
func (*ScheduleService) GetTeachersFaculties ¶
func (*ScheduleService) GetTeachersList ¶
func (s *ScheduleService) GetTeachersList(ctx context.Context, facultyID, departmentID int) (*models.TeachersList, error)
Click to show internal directories.
Click to hide internal directories.