Documentation
¶
Index ¶
- func GetCourseJson(courseID, coursesPath string) (string, error)
- func ResetProgress(courseID, progressPath string) error
- func SaveCourse(response, coursesPath string) (string, error)
- func SaveProgress(courseID, completedLessonID, currentLessonID, progressPath string, ...) error
- type Course
- type Lesson
- type Progress
- type ProgressStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCourseJson ¶
func ResetProgress ¶
func SaveCourse ¶
func SaveProgress ¶
Types ¶
type Course ¶
type Course struct {
ID string `json:"course_id"`
Title string `json:"title"`
Description string `json:"description"`
ProgrammingLanguage string `json:"programming_language"`
Lessons []Lesson `json:"lessons"`
}
func GetCourseStruct ¶
func GetCourses ¶
type Progress ¶
type Progress struct {
CourseID string `json:"course_id"`
CompletedLessons []string `json:"completed_lessons"`
CurrentLesson string `json:"current_lesson"`
LastAccessed time.Time `json:"last_accessed"`
TotalLessons int `json:"total_lessons"`
}
func LoadProgresses ¶
type ProgressStatus ¶
type ProgressStatus int
const ( NotStarted ProgressStatus = iota InProgress Completed )
func LoadProgressStatus ¶
func LoadProgressStatus(courseID, progressPath string) (ProgressStatus, string, error)
Click to show internal directories.
Click to hide internal directories.