Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Day ¶
Day represents the school day (the row in the schedule table) that contains eight Lessons.
type IncorrectDateError ¶
type IncorrectDateError struct {
Date string
}
IncorrectDateError is returned when the date does not match the "dd.mm" format or does not exist.
func (*IncorrectDateError) Error ¶
func (e *IncorrectDateError) Error() string
type IncorrectLinkError ¶ added in v0.9.2
IncorrectLinkError is returned when when the schedule on the link does not match the expected schedule.
func (*IncorrectLinkError) Error ¶ added in v0.9.2
func (e *IncorrectLinkError) Error() string
type IncorrectWeekNumberError ¶
type IncorrectWeekNumberError struct {
WeekNum int
}
IncorrectWeekNumberError is returned when the value of the school week number is out of the acceptable range.
func (*IncorrectWeekNumberError) Error ¶
func (e *IncorrectWeekNumberError) Error() string
type Lesson ¶
type Lesson struct {
SubLessons []SubLesson `json:"sub_lessons"`
}
Lesson represents the lesson (the cell in the schedule table) that can contain one or more SubLessons.
func (Lesson) GetGroupsTeacherLesson ¶
func (Lesson) StringGroupLesson ¶
StringGroupLesson returns a string representation of Lesson based on the structure of the lesson display for groups.
func (Lesson) StringTeacherLesson ¶
type LessonType ¶
type LessonType int
LessonType is the type of the lesson. Can take 3 values: Lecture, Laboratory and Practice.
const ( Lecture LessonType = iota Laboratory Practice )
func (LessonType) String ¶
func (lt LessonType) String() string
type Schedule ¶
type Schedule struct {
Weeks [2]Week `json:"weeks"`
}
Schedule represents the full schedule that contains two school Weeks.
func (Schedule) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (*Schedule) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
type StatusCodeError ¶
StatusCodeError is returned when a http.Get returns a response with a status code other than 200.
func (*StatusCodeError) Error ¶
func (e *StatusCodeError) Error() string
type SubLesson ¶
type SubLesson struct { Duration Duration `json:"duration"` Type LessonType `json:"type"` Group string `json:"group"` Name string `json:"name"` Teacher string `json:"teacher"` Room string `json:"room"` }
SubLesson represents the nested lesson. During the time of one lesson, a group or teacher can have several SubLessons at the same time.
func (SubLesson) StringGroupSubLesson ¶
StringGroupSubLesson returns a string representation of SubLesson based on the structure of the lesson display for groups.
type UnavailableScheduleError ¶ added in v0.9.1
type UnavailableScheduleError struct {}
UnavailableScheduleError is returned when the week schedule is missing or not published.
func (*UnavailableScheduleError) Error ¶ added in v0.9.1
func (e *UnavailableScheduleError) Error() string