mongodb

package
v0.0.0-...-8597337 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompetencyRepository

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

func NewCompetencyRepository

func NewCompetencyRepository(db *mongo.Database) *CompetencyRepository

func (*CompetencyRepository) AddCompetency

func (r *CompetencyRepository) AddCompetency(ctx context.Context, competency *competencies.Competency) error

func (*CompetencyRepository) FilterCompetencies

func (r *CompetencyRepository) FilterCompetencies(
	ctx context.Context,
	levelID,
	ugsnID,
	specialtyID,
	programID string,
) ([]query.CompetencyModel, error)

func (*CompetencyRepository) GetCompetency

func (r *CompetencyRepository) GetCompetency(ctx context.Context, id string) (*competencies.Competency, error)

type LevelRepository

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

func NewLevelRepository

func NewLevelRepository(db *mongo.Database) *LevelRepository

func (*LevelRepository) AddLevel

func (r *LevelRepository) AddLevel(ctx context.Context, level *education.Level) error

func (*LevelRepository) FindLevels

func (r *LevelRepository) FindLevels(ctx context.Context) ([]query.LevelModel, error)

func (*LevelRepository) GetLevel

func (r *LevelRepository) GetLevel(ctx context.Context, id string) (*education.Level, error)

func (*LevelRepository) UpdateLevel

func (r *LevelRepository) UpdateLevel(ctx context.Context, id string, updater service.LevelUpdate) error

type ProgramRepository

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

func NewProgramRepository

func NewProgramRepository(db *mongo.Database) *ProgramRepository

func (*ProgramRepository) AddProgram

func (p *ProgramRepository) AddProgram(ctx context.Context, program *education.Program) error

func (*ProgramRepository) FindAllPrograms

func (p *ProgramRepository) FindAllPrograms(ctx context.Context, sid string) ([]query.ProgramModel, error)

func (*ProgramRepository) GetProgram

func (p *ProgramRepository) GetProgram(ctx context.Context, id string) (*education.Program, error)

type SpecialtyRepository

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

func NewSpecialtyRepository

func NewSpecialtyRepository(db *mongo.Database) *SpecialtyRepository

func (*SpecialtyRepository) AddSpecialty

func (s *SpecialtyRepository) AddSpecialty(ctx context.Context, specialty *education.Speciality) (err error)

func (*SpecialtyRepository) FindAllSpecialties

func (s *SpecialtyRepository) FindAllSpecialties(ctx context.Context, uid string) ([]query.SpecialtyModel, error)

func (*SpecialtyRepository) GetSpecialty

func (s *SpecialtyRepository) GetSpecialty(ctx context.Context, id string) (*education.Speciality, error)

type SubjectRepository

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

func NewSubjectRepository

func NewSubjectRepository(db *mongo.Database) *SubjectRepository

func (*SubjectRepository) AddSubject

func (r *SubjectRepository) AddSubject(ctx context.Context, subject *competencies.Subject) error

func (*SubjectRepository) AddSubjects

func (r *SubjectRepository) AddSubjects(ctx context.Context, subjects []*competencies.Subject) error

func (*SubjectRepository) FilterSubjectsByName

func (r *SubjectRepository) FilterSubjectsByName(ctx context.Context, name string) []query.SubjectModel

type UgsnRepository

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

func NewUgsnRepository

func NewUgsnRepository(db *mongo.Database) *UgsnRepository

func (*UgsnRepository) AddUgsn

func (u *UgsnRepository) AddUgsn(ctx context.Context, ugsn *education.Ugsn) error

func (*UgsnRepository) FindAllUgsn

func (u *UgsnRepository) FindAllUgsn(ctx context.Context, levelID string) ([]query.UgsnModel, error)

func (*UgsnRepository) GetUgsn

func (u *UgsnRepository) GetUgsn(ctx context.Context, id string) (*education.Ugsn, error)

Jump to

Keyboard shortcuts

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