Documentation ¶
Index ¶
- type CourseRepository
- func (r CourseRepository) Course(courseUUID uuid.UUID) (domain.Course, error)
- func (r CourseRepository) Courses() ([]domain.Course, error)
- func (r CourseRepository) CreateCourse(course *domain.Course) error
- func (r CourseRepository) DeleteCourse(course *domain.DeletedCourse) error
- func (r CourseRepository) UpdateCourse(course *domain.Course) error
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) 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.
Click to show internal directories.
Click to hide internal directories.