repository

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

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

func (*Mongo) AddSchedules

func (repo *Mongo) AddSchedules(ctx context.Context, group string, schedules ...entity.Schedule) error

func (*Mongo) DeactivatePlan

func (repo *Mongo) DeactivatePlan(ctx context.Context, group string) error

func (*Mongo) GetLatestSchedule

func (repo *Mongo) GetLatestSchedule(ctx context.Context, group string) (*entity.Schedule, error)

func (*Mongo) GetPlansInfo

func (repo *Mongo) GetPlansInfo(ctx context.Context) ([]entity.PlanInfo, error)

func (*Mongo) GetSchedules

func (repo *Mongo) GetSchedules(ctx context.Context, group string) ([]entity.Schedule, error)

type Moodle

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

func (*Moodle) GetFiles

func (repo *Moodle) GetFiles(filesInfo []moodle.Content) ([]entity.File, error)

func (*Moodle) GetFilesInfo

func (repo *Moodle) GetFilesInfo(courseId int) ([]moodle.Content, error)

type PlanDatabase

type PlanDatabase interface {
	AddSchedules(ctx context.Context, group string, schedules ...entity.Schedule) error
	GetSchedules(ctx context.Context, group string) ([]entity.Schedule, error)
	GetLatestSchedule(ctx context.Context, group string) (*entity.Schedule, error)
	GetPlansInfo(ctx context.Context) ([]entity.PlanInfo, error)
	DeactivatePlan(ctx context.Context, group string) error
}

func NewMongo

func NewMongo(db *mongo.Database) PlanDatabase

type PlanWeb

type PlanWeb interface {
	GetFilesInfo(courseId int) ([]moodle.Content, error)
	GetFiles(filesInfo []moodle.Content) ([]entity.File, error)
}

func NewMoodle

func NewMoodle(client *moodle.Client) PlanWeb

Jump to

Keyboard shortcuts

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