Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrImageRequired = errors.New("me: image required")
)
Functions ¶
func Enroll ¶
func Enroll(ctx context.Context, courseID string, price float64, paymentImage *multipart.FileHeader) error
Enroll enrolls a course
func UpdateProfile ¶
func UpdateProfile(ctx context.Context, m *UpdateProfileArgs) error
Types ¶
type EnrolledCourse ¶
type EnrolledCourse struct { ID string Title string Desc string Image string Start time.Time URL string Type int }
EnrolledCourse type
func GetEnrolledCourses ¶
func GetEnrolledCourses(ctx context.Context, userID string) ([]*EnrolledCourse, error)
func (*EnrolledCourse) ShowStart ¶
func (x *EnrolledCourse) ShowStart() bool
ShowStart returns true if course should show start date
type OwnCourse ¶
type OwnCourse struct { ID string Title string Desc string Image string Start time.Time URL string Type int EnrollCount int }
OwnCourse type
type UpdateProfileArgs ¶
type UpdateProfileArgs struct { Username string Name string AboutMe string Image *multipart.FileHeader }
Click to show internal directories.
Click to hide internal directories.