me

package
v0.0.0-...-96288a7 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

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 (x *EnrolledCourse) Link() string

Link returns course link

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

func GetOwnCourses

func GetOwnCourses(ctx context.Context, userID string) ([]*OwnCourse, error)
func (x *OwnCourse) Link() string

Link returns course link

func (*OwnCourse) ShowStart

func (x *OwnCourse) ShowStart() bool

ShowStart returns true if course should show start date

type UpdateProfileArgs

type UpdateProfileArgs struct {
	Username string
	Name     string
	AboutMe  string
	Image    *multipart.FileHeader
}

Jump to

Keyboard shortcuts

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