Documentation ¶
Index ¶
- func NewClassRepository(sqlHandler SqlHandler) (repository.ClassRepository, error)
- func NewCommentRepository(sqlHandler SqlHandler) repository.CommentRepository
- func NewHelpRepository(sqlHandler SqlHandler) (repository.HelpRepository, error)
- func NewLectureRepository(sqlHandler SqlHandler) (repository.LectureRepository, error)
- func NewParticipationRepository(sqlHandler SqlHandler) (repository.ParticipationRepository, error)
- func NewTaskRepository(sqlHandler SqlHandler) (repository.TaskRepository, error)
- func NewUserRepository(sqlHandler SqlHandler) (repository.UserRepository, error)
- type ClassRepository
- func (repo *ClassRepository) CreateClass(class *model.Class) (*model.Class, error)
- func (repo *ClassRepository) DeleteClass(id int64, lectureID int64) (int64, error)
- func (repo *ClassRepository) GetClassById(id int64) (class *model.Class, err error)
- func (repo *ClassRepository) GetClassesByLectureID(lectureID int64, limit int, offset int) (model.Classes, error)
- func (repo *ClassRepository) UpdateClass(class *model.Class) (*model.Class, error)
- type CommentRepository
- func (repo *CommentRepository) CreateComment(comment *model.Comment) (*model.Comment, error)
- func (repo *CommentRepository) DeleteComment(id int64, userType model.UserType, userID int64) (int64, error)
- func (repo *CommentRepository) GetCommentsByHelpID(helpID int64, limit int, offset int) (model.Comments, error)
- func (repo *CommentRepository) GetCommentsByUserTypeAndUserID(userType model.UserType, userID int64, limit int, offset int) (model.Comments, error)
- func (repo *CommentRepository) UpdateComment(comment *model.Comment) (*model.Comment, error)
- type HelpRepository
- func (repo *HelpRepository) CreateHelp(help *model.Help) (*model.Help, error)
- func (repo *HelpRepository) DeleteHelp(id int64, lectureID int64, studentID int64) (int64, error)
- func (repo *HelpRepository) DeleteHelpWithoutStudentId(id int64, lectureID int64) (int64, error)
- func (repo *HelpRepository) GetHelpsByLectureID(lectureID int64, limit int, offset int) (model.Helps, error)
- func (repo *HelpRepository) GetHelpsByStudentID(studentID int64, limit int, offset int) (model.Helps, error)
- func (repo *HelpRepository) UpdateHelp(help *model.Help) (*model.Help, error)
- type LectureRepository
- func (repo *LectureRepository) CreateLecture(lecture *model.Lecture) (*model.Lecture, error)
- func (repo *LectureRepository) DeleteLecture(id int64) (int64, error)
- func (repo *LectureRepository) GetLectureById(id int64) (lecture *model.Lecture, err error)
- func (repo *LectureRepository) GetLectures(limit int, offset int) (total int64, lectures model.Lectures, err error)
- func (repo *LectureRepository) GetParticipatedLecturesOfAssistant(studentID int64, limit int, offset int) (total int64, lectures model.Lectures, err error)
- func (repo *LectureRepository) GetParticipatedLecturesOfStudent(studentID int64, limit int, offset int) (total int64, lectures model.Lectures, err error)
- func (repo *LectureRepository) GetParticipatedLecturesOfTeacher(teacherID int64, limit int, offset int) (total int64, lectures model.Lectures, err error)
- func (repo *LectureRepository) UpdateLecture(lecture *model.Lecture) (*model.Lecture, error)
- type ParticipationRepository
- func (repo *ParticipationRepository) CreateAssistantLecture(assistantLecture *model.AssistantLecture) (*model.AssistantLecture, error)
- func (repo *ParticipationRepository) CreateStudentLecture(studentLecture *model.StudentLecture) (*model.StudentLecture, error)
- func (repo *ParticipationRepository) CreateTeacherLecture(teacherLecture *model.TeacherLecture) (*model.TeacherLecture, error)
- func (repo *ParticipationRepository) DeleteAssistantLecture(studentID int64, lectureID int64) (int64, error)
- func (repo *ParticipationRepository) DeleteStudentLecture(studentID int64, lectureID int64) (int64, error)
- func (repo *ParticipationRepository) DeleteTeacherLecture(teacherID int64, lectureID int64) (int64, error)
- type Result
- type Row
- type SqlHandler
- type TaskRepository
- func (repo *TaskRepository) CreateTask(task *model.Task) (*model.Task, error)
- func (repo *TaskRepository) DeleteTask(id int64, classID int64) (int64, error)
- func (repo *TaskRepository) GetTasksByClassId(classID int64, limit int, offset int) (model.Tasks, error)
- func (repo *TaskRepository) UpdateTask(task *model.Task) (*model.Task, error)
- type UserRepository
- func (repo *UserRepository) GetAdminByEmail(email string) (admin *model.Admin, err error)
- func (repo *UserRepository) GetAdminById(adminId int64) (admin *model.Admin, err error)
- func (repo *UserRepository) GetAssistantById(assistantId int64) (assistant *model.Assistant, err error)
- func (repo *UserRepository) GetAssistantByStudentNo(studentNo string) (assistant *model.Assistant, err error)
- func (repo *UserRepository) GetAssistants(limit, offset int) (assistants model.Assistants, err error)
- func (repo *UserRepository) GetParticipatingAssistantsOfLecture(lectureID int64, limit int, offset int) (assistants model.Assistants, err error)
- func (repo *UserRepository) GetParticipatingStudentsOfLecture(lectureID int64, limit int, offset int) (students model.Students, err error)
- func (repo *UserRepository) GetParticipatingTeachersOfLecture(lectureID int64, limit int, offset int) (teachers model.Teachers, err error)
- func (repo *UserRepository) GetStudentById(studentId int64) (student *model.Student, err error)
- func (repo *UserRepository) GetStudentByStudentNo(studentNo string) (student *model.Student, err error)
- func (repo *UserRepository) GetStudents(limit, offset int) (students model.Students, err error)
- func (repo *UserRepository) GetTeacherByEmail(email string) (teacher *model.Teacher, err error)
- func (repo *UserRepository) GetTeacherById(teacherId int64) (teacher *model.Teacher, err error)
- func (repo *UserRepository) GetTeachers(limit, offset int) (teachers model.Teachers, err error)
- func (repo *UserRepository) InsertAdmin(admin *model.Admin) (*model.Admin, error)
- func (repo *UserRepository) InsertAssistant(assistant *model.Assistant) (*model.Assistant, error)
- func (repo *UserRepository) InsertStudent(student *model.Student) (*model.Student, error)
- func (repo *UserRepository) InsertTeacher(teacher *model.Teacher) (*model.Teacher, error)
- func (repo *UserRepository) UpdateAssistant(assistant *model.Assistant) (*model.Assistant, error)
- func (repo *UserRepository) UpdateStudent(student *model.Student) (*model.Student, error)
- func (repo *UserRepository) UpdateTeacher(teacher *model.Teacher) (*model.Teacher, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClassRepository ¶
func NewClassRepository(sqlHandler SqlHandler) (repository.ClassRepository, error)
func NewCommentRepository ¶
func NewCommentRepository(sqlHandler SqlHandler) repository.CommentRepository
func NewHelpRepository ¶
func NewHelpRepository(sqlHandler SqlHandler) (repository.HelpRepository, error)
func NewLectureRepository ¶
func NewLectureRepository(sqlHandler SqlHandler) (repository.LectureRepository, error)
func NewParticipationRepository ¶
func NewParticipationRepository(sqlHandler SqlHandler) (repository.ParticipationRepository, error)
func NewTaskRepository ¶
func NewTaskRepository(sqlHandler SqlHandler) (repository.TaskRepository, error)
func NewUserRepository ¶
func NewUserRepository(sqlHandler SqlHandler) (repository.UserRepository, error)
Types ¶
type ClassRepository ¶
type ClassRepository struct {
SqlHandler
}
func (*ClassRepository) CreateClass ¶
func (*ClassRepository) DeleteClass ¶
func (repo *ClassRepository) DeleteClass(id int64, lectureID int64) (int64, error)
func (*ClassRepository) GetClassById ¶
func (repo *ClassRepository) GetClassById(id int64) (class *model.Class, err error)
func (*ClassRepository) GetClassesByLectureID ¶
func (*ClassRepository) UpdateClass ¶
type CommentRepository ¶
type CommentRepository struct {
SqlHandler
}
func (*CommentRepository) CreateComment ¶
func (*CommentRepository) DeleteComment ¶
func (*CommentRepository) GetCommentsByHelpID ¶
func (*CommentRepository) GetCommentsByUserTypeAndUserID ¶
func (*CommentRepository) UpdateComment ¶
type HelpRepository ¶
type HelpRepository struct {
SqlHandler
}
func (*HelpRepository) CreateHelp ¶
func (*HelpRepository) DeleteHelp ¶
func (*HelpRepository) DeleteHelpWithoutStudentId ¶
func (repo *HelpRepository) DeleteHelpWithoutStudentId(id int64, lectureID int64) (int64, error)
func (*HelpRepository) GetHelpsByLectureID ¶
func (*HelpRepository) GetHelpsByStudentID ¶
func (*HelpRepository) UpdateHelp ¶
type LectureRepository ¶
type LectureRepository struct {
SqlHandler
}
func (*LectureRepository) CreateLecture ¶
func (*LectureRepository) DeleteLecture ¶
func (repo *LectureRepository) DeleteLecture(id int64) (int64, error)
func (*LectureRepository) GetLectureById ¶
func (repo *LectureRepository) GetLectureById(id int64) (lecture *model.Lecture, err error)
func (*LectureRepository) GetLectures ¶
func (*LectureRepository) GetParticipatedLecturesOfAssistant ¶
func (*LectureRepository) GetParticipatedLecturesOfStudent ¶
func (*LectureRepository) GetParticipatedLecturesOfTeacher ¶
func (*LectureRepository) UpdateLecture ¶
type ParticipationRepository ¶
type ParticipationRepository struct {
SqlHandler
}
func (*ParticipationRepository) CreateAssistantLecture ¶
func (repo *ParticipationRepository) CreateAssistantLecture(assistantLecture *model.AssistantLecture) (*model.AssistantLecture, error)
func (*ParticipationRepository) CreateStudentLecture ¶
func (repo *ParticipationRepository) CreateStudentLecture(studentLecture *model.StudentLecture) (*model.StudentLecture, error)
func (*ParticipationRepository) CreateTeacherLecture ¶
func (repo *ParticipationRepository) CreateTeacherLecture(teacherLecture *model.TeacherLecture) (*model.TeacherLecture, error)
func (*ParticipationRepository) DeleteAssistantLecture ¶
func (repo *ParticipationRepository) DeleteAssistantLecture(studentID int64, lectureID int64) (int64, error)
func (*ParticipationRepository) DeleteStudentLecture ¶
func (repo *ParticipationRepository) DeleteStudentLecture(studentID int64, lectureID int64) (int64, error)
func (*ParticipationRepository) DeleteTeacherLecture ¶
func (repo *ParticipationRepository) DeleteTeacherLecture(teacherID int64, lectureID int64) (int64, error)
type SqlHandler ¶
type TaskRepository ¶
type TaskRepository struct {
SqlHandler
}
func (*TaskRepository) CreateTask ¶
func (*TaskRepository) DeleteTask ¶
func (repo *TaskRepository) DeleteTask(id int64, classID int64) (int64, error)
func (*TaskRepository) GetTasksByClassId ¶
func (*TaskRepository) UpdateTask ¶
type UserRepository ¶
type UserRepository struct {
SqlHandler
}
func (*UserRepository) GetAdminByEmail ¶
func (repo *UserRepository) GetAdminByEmail(email string) (admin *model.Admin, err error)
func (*UserRepository) GetAdminById ¶
func (repo *UserRepository) GetAdminById(adminId int64) (admin *model.Admin, err error)
func (*UserRepository) GetAssistantById ¶
func (repo *UserRepository) GetAssistantById(assistantId int64) (assistant *model.Assistant, err error)
func (*UserRepository) GetAssistantByStudentNo ¶
func (repo *UserRepository) GetAssistantByStudentNo(studentNo string) (assistant *model.Assistant, err error)
func (*UserRepository) GetAssistants ¶
func (repo *UserRepository) GetAssistants(limit, offset int) (assistants model.Assistants, err error)
func (*UserRepository) GetParticipatingAssistantsOfLecture ¶
func (repo *UserRepository) GetParticipatingAssistantsOfLecture(lectureID int64, limit int, offset int) (assistants model.Assistants, err error)
func (*UserRepository) GetParticipatingStudentsOfLecture ¶
func (*UserRepository) GetParticipatingTeachersOfLecture ¶
func (*UserRepository) GetStudentById ¶
func (repo *UserRepository) GetStudentById(studentId int64) (student *model.Student, err error)
func (*UserRepository) GetStudentByStudentNo ¶
func (repo *UserRepository) GetStudentByStudentNo(studentNo string) (student *model.Student, err error)
func (*UserRepository) GetStudents ¶
func (repo *UserRepository) GetStudents(limit, offset int) (students model.Students, err error)
func (*UserRepository) GetTeacherByEmail ¶
func (repo *UserRepository) GetTeacherByEmail(email string) (teacher *model.Teacher, err error)
func (*UserRepository) GetTeacherById ¶
func (repo *UserRepository) GetTeacherById(teacherId int64) (teacher *model.Teacher, err error)
func (*UserRepository) GetTeachers ¶
func (repo *UserRepository) GetTeachers(limit, offset int) (teachers model.Teachers, err error)
func (*UserRepository) InsertAdmin ¶
func (*UserRepository) InsertAssistant ¶
func (*UserRepository) InsertStudent ¶
func (*UserRepository) InsertTeacher ¶
func (*UserRepository) UpdateAssistant ¶
func (*UserRepository) UpdateStudent ¶
func (*UserRepository) UpdateTeacher ¶
Click to show internal directories.
Click to hide internal directories.