handlers

package
v0.0.0-...-56bfa2c Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPermission

func CheckPermission(c *gin.Context, jwtKey []byte, username string) (*models.User, bool)

func CreateUserProgress

func CreateUserProgress(c *gin.Context, jwtKey []byte)

func GetChapterDetail

func GetChapterDetail(c *gin.Context)

func GetCourseById

func GetCourseById(c *gin.Context)

func GetCourses

func GetCourses(c *gin.Context, page int, searchQuery string)

func GetCoursesByIdCollection

func GetCoursesByIdCollection(c *gin.Context)

func GetSubchaptersFromChapter

func GetSubchaptersFromChapter(c *gin.Context)

func GetUserCourseInteractions

func GetUserCourseInteractions(c *gin.Context, jwtKey []byte)

func HandleDashboard

func HandleDashboard(c *gin.Context, jwtKey []byte)

func HandleLogin

func HandleLogin(c *gin.Context, jwtKey []byte)

func HandleProfile

func HandleProfile(c *gin.Context, jwtKey []byte)

func HandleRegister

func HandleRegister(c *gin.Context)

func HandleUpdateProfile

func HandleUpdateProfile(c *gin.Context, jwtKey []byte)

func HandleUserCourseInteractions

func HandleUserCourseInteractions(c *gin.Context, jwtKey []byte)

func HandleVerifyToken

func HandleVerifyToken(c *gin.Context, jwtKey []byte)

func SetCompleted

func SetCompleted(c *gin.Context)

Types

type Dashboard

type Dashboard struct {
	FullName          string  `json:"name"`
	CompletedCourses  int     `json:"completed_courses"`
	InProgressCourses int     `json:"in_progress_courses"`
	CompletionRate    float64 `json:"completion_rate"`
	LatestCourseName  string  `json:"latest_course_name"`
}

type RequestBody

type RequestBody struct {
	CoursesID []int `json:"courses_id"`
}

type SubchapterResponse

type SubchapterResponse struct {
	models.Subchapter
	ChapterID   uint   `json:"chapter_id"`
	ChapterName string `json:"chapter_name"`
	CourseID    uint   `json:"course_id"`
	CourseName  string `json:"course_name"`
}

Jump to

Keyboard shortcuts

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