database

package
v0.0.0-...-cd399ba Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CourseRepository

type CourseRepository struct {
	// contains filtered or unexported fields
}

func NewCourseRepository

func NewCourseRepository(db *sqlx.DB) (CourseRepository, error)

func (CourseRepository) Course

func (r CourseRepository) Course(courseUUID uuid.UUID) (domain.Course, error)

Course get the Course by given uuid.

func (CourseRepository) Courses

func (r CourseRepository) Courses() ([]domain.Course, error)

Courses list all courses.

func (CourseRepository) CreateCourse

func (r CourseRepository) CreateCourse(course *domain.Course) error

CreateCourse creates a new course.

func (CourseRepository) DeleteCourse

func (r CourseRepository) DeleteCourse(course *domain.DeletedCourse) error

DeleteCourse soft delete the course by given uuid.

func (CourseRepository) UpdateCourse

func (r CourseRepository) UpdateCourse(course *domain.Course) error

UpdateCourse update the given course by ID.

Jump to

Keyboard shortcuts

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