implementations

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoursesPostgresRepository

type CoursesPostgresRepository struct {
	Connection *sql.DB
	Randomizer *rand.Rand
}

func GetCoursesPgRepository

func GetCoursesPgRepository() *CoursesPostgresRepository

func (*CoursesPostgresRepository) AddStudentToCourse added in v0.11.0

func (repository *CoursesPostgresRepository) AddStudentToCourse(studentUUID, courseUUID string) error

func (*CoursesPostgresRepository) DoesTeacherOwnsCourse added in v0.29.0

func (repository *CoursesPostgresRepository) DoesTeacherOwnsCourse(teacherUUID, courseUUID string) (bool, error)

func (*CoursesPostgresRepository) GetCourseActiveLaboratories added in v0.31.0

func (repository *CoursesPostgresRepository) GetCourseActiveLaboratories(courseUUID string) ([]*dtos.BaseLaboratoryDTO, error)

func (*CoursesPostgresRepository) GetCourseByInvitationCode

func (repository *CoursesPostgresRepository) GetCourseByInvitationCode(invitationCode string) (*entities.Course, error)

func (*CoursesPostgresRepository) GetCourseByUUID

func (repository *CoursesPostgresRepository) GetCourseByUUID(uuid string) (*entities.Course, error)

func (*CoursesPostgresRepository) GetCourseLaboratories added in v0.31.0

func (repository *CoursesPostgresRepository) GetCourseLaboratories(courseUUID string) ([]*dtos.BaseLaboratoryDTO, error)

func (*CoursesPostgresRepository) GetEnrolledCourses added in v0.12.0

func (repository *CoursesPostgresRepository) GetEnrolledCourses(studentUUID string) (*dtos.EnrolledCoursesDto, error)

func (*CoursesPostgresRepository) GetEnrolledStudents added in v0.17.0

func (repository *CoursesPostgresRepository) GetEnrolledStudents(courseUUID string) ([]*dtos.EnrolledStudentDTO, error)

func (*CoursesPostgresRepository) GetInvitationCode added in v0.10.0

func (repository *CoursesPostgresRepository) GetInvitationCode(courseUUID string) (string, error)

func (*CoursesPostgresRepository) GetRandomColor

func (repository *CoursesPostgresRepository) GetRandomColor() (*entities.Color, error)

Methods

func (*CoursesPostgresRepository) IsUserInCourse added in v0.18.0

func (repository *CoursesPostgresRepository) IsUserInCourse(userUUID, courseUUID string) (bool, error)

func (*CoursesPostgresRepository) SaveCourse

func (repository *CoursesPostgresRepository) SaveCourse(dto *dtos.CreateCourseDTO) (*entities.Course, error)

func (*CoursesPostgresRepository) SaveInvitationCode added in v0.10.0

func (repository *CoursesPostgresRepository) SaveInvitationCode(courseUUID string, invitationCode string) error

func (*CoursesPostgresRepository) SetStudentStatus added in v0.38.0

func (repository *CoursesPostgresRepository) SetStudentStatus(dto *dtos.SetUserStatusDTO) error

func (*CoursesPostgresRepository) ToggleCourseVisibility added in v0.13.0

func (repository *CoursesPostgresRepository) ToggleCourseVisibility(courseUUID, studentUUID string) (isHiddenAfterUpdate bool, err error)

func (*CoursesPostgresRepository) UpdateCourseName added in v0.14.0

func (repository *CoursesPostgresRepository) UpdateCourseName(dto dtos.RenameCourseDTO) error

type NanoIdInvitationCodeGenerator

type NanoIdInvitationCodeGenerator struct{}

func GetNanoIdInvitationCodeGenerator

func GetNanoIdInvitationCodeGenerator() *NanoIdInvitationCodeGenerator

func (*NanoIdInvitationCodeGenerator) Generate

func (generator *NanoIdInvitationCodeGenerator) Generate() (string, error)

Methods

Jump to

Keyboard shortcuts

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