database

package
v0.0.0-...-31c068b Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(config *models.DBConfig) (*sql.DB, error)

func InsertCourseData

func InsertCourseData(db *sql.DB, course *NewCourse, lang string, courseData *models.Course) error

InsertCourseData stores all translated course data

Types

type NewCourse

type NewCourse struct {
	CourseID int64
	Lessons  []NewLesson
}

func InsertCourse

func InsertCourse(db *sql.DB, course *models.Course) (*NewCourse, error)

type NewLesson

type NewLesson struct {
	LessonID int64
	Sections []int64
	QuizID   int64
}

Jump to

Keyboard shortcuts

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