Documentation ¶
Index ¶
- func NewCourseService(userCli user.User, projectRepo spacerepo.Project, courseRepo repository.Course, ...) *courseService
- type AsgDTO
- type AsgGetCmd
- type AsgListCmd
- type AsgWorkDTO
- type CertInfoDTO
- type CourseAddRelatedProjectCmd
- type CourseDTO
- type CourseGetCmd
- type CourseListCmd
- type CourseService
- type CourseSummaryDTO
- type GetSubmissionCmd
- type LessonDTO
- type PlayerApplyCmd
- type PointDTO
- type ProjectSummuryDTO
- type RecordAddCmd
- type RelateProjectDTO
- type SectionDTO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCourseService ¶
func NewCourseService( userCli user.User, projectRepo spacerepo.Project, courseRepo repository.Course, playerRepo repository.Player, workRepo repository.Work, recordRepo repository.Record, producer message.MessageProducer, userRepo userrepo.User, ) *courseService
Types ¶
type AsgListCmd ¶
type AsgListCmd struct { User types.Account Cid string Status domain.WorkStatus }
Assignment
type AsgWorkDTO ¶
type CertInfoDTO ¶
type CourseAddRelatedProjectCmd ¶ added in v1.3.1
type CourseAddRelatedProjectCmd struct { Cid string User types.Account Project types.ResourceSummary }
type CourseDTO ¶
type CourseDTO struct { CourseSummaryDTO IsApply bool `json:"is_apply"` Teacher string `json:"teacher"` Doc string `json:"doc"` Forum string `json:"forum"` Sections []SectionDTO `json:"sections"` }
type CourseGetCmd ¶
type CourseListCmd ¶
type CourseListCmd struct { Status domain.CourseStatus Type domain.CourseType User types.Account }
course
type CourseService ¶
type CourseService interface { // player Apply(*PlayerApplyCmd) (code string, err error) // course List(*CourseListCmd) ([]CourseSummaryDTO, error) Get(*CourseGetCmd) (CourseDTO, error) AddRelatedProject(*CourseAddRelatedProjectCmd) (string, error) ListAssignments(*AsgListCmd) ([]AsgWorkDTO, error) GetSubmissions(*GetSubmissionCmd) (RelateProjectDTO, error) GetCertification(*CourseGetCmd) (CertInfoDTO, error) GetAssignment(*AsgGetCmd) (AsgDTO, error) AddPlayRecord(*RecordAddCmd) (string, error) }
type CourseSummaryDTO ¶
type CourseSummaryDTO struct { PlayerCount int `json:"count"` Id string `json:"id"` Name string `json:"name"` Hours int `json:"hours"` Host string `json:"host"` Desc string `json:"desc"` Status string `json:"status"` Poster string `json:"poster"` Duration string `json:"duration"` Type string `json:"type"` }
type GetSubmissionCmd ¶
type GetSubmissionCmd struct { User types.Account Cid string Status domain.WorkStatus }
type LessonDTO ¶
type LessonDTO struct { Id string `json:"id"` Name string `json:"name"` Desc string `json:"desc"` Video string `json:"video"` Points []PointDTO `json:"points"` }
Lesson
type PlayerApplyCmd ¶
player
func (*PlayerApplyCmd) Validate ¶
func (cmd *PlayerApplyCmd) Validate() error
type PointDTO ¶
type PointDTO struct { Id string `json:"id"` Name string `json:"name"` Video string `json:"video"` }
Point
type ProjectSummuryDTO ¶
type RecordAddCmd ¶
func (*RecordAddCmd) Validate ¶
func (cmd *RecordAddCmd) Validate() error
type RelateProjectDTO ¶
type RelateProjectDTO struct {
RelatedProject []ProjectSummuryDTO `json:"related_project"`
}
type SectionDTO ¶
type SectionDTO struct { Id string `json:"id"` Name string `json:"name"` Lessons []LessonDTO `json:"lessons"` }
Section
Click to show internal directories.
Click to hide internal directories.