postgres

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(pool *pgxpool.Pool) *CompetencyRepository

func (*CompetencyRepository) AddCompetency

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

func (*CompetencyRepository) Delete

func (r *CompetencyRepository) Delete(ctx context.Context, id string) 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)

func (*CompetencyRepository) Update

type IndicatorEntity

type IndicatorEntity struct {
	ID           string
	Title        string
	Code         string
	SubjectID    string
	CompetencyID string
}

type IndicatorRepository

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

func NewIndicatorRepository

func NewIndicatorRepository(db *pgxpool.Pool) *IndicatorRepository

func (*IndicatorRepository) AddIndicator

func (r *IndicatorRepository) AddIndicator(ctx context.Context, ind *competencies.Indicator) error

func (*IndicatorRepository) Delete

func (r *IndicatorRepository) Delete(ctx context.Context, id string) error

func (*IndicatorRepository) FindAllByCompetencyID

func (r *IndicatorRepository) FindAllByCompetencyID(ctx context.Context, competencyID string) ([]query.IndicatorModel, error)

func (*IndicatorRepository) GetIndicator

func (r *IndicatorRepository) GetIndicator(ctx context.Context, id string) (*competencies.Indicator, error)

func (*IndicatorRepository) Update

type LevelRepository

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

func NewLevelRepository

func NewLevelRepository(pool *pgxpool.Pool) *LevelRepository

func (*LevelRepository) AddLevel

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

func (*LevelRepository) Delete

func (r *LevelRepository) Delete(ctx context.Context, id string) 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 *pgxpool.Pool) *ProgramRepository

func (*ProgramRepository) AddProgram

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

func (*ProgramRepository) Delete

func (r *ProgramRepository) Delete(
	ctx context.Context,
	id string,
) error

func (*ProgramRepository) FindAllPrograms

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

func (*ProgramRepository) GetProgram

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

func (*ProgramRepository) Update

func (r *ProgramRepository) Update(
	ctx context.Context,
	id string,
	updater service.ProgramUpdate,
) error

type SpecialtyRepository

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

func NewSpecialtyRepository

func NewSpecialtyRepository(db *pgxpool.Pool) *SpecialtyRepository

func (*SpecialtyRepository) AddSpecialty

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

func (*SpecialtyRepository) Delete

func (r *SpecialtyRepository) Delete(ctx context.Context, id string) error

func (*SpecialtyRepository) FindAllSpecialties

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

func (*SpecialtyRepository) GetSpecialty

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

func (*SpecialtyRepository) Update

type SubjectRepository

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

func NewSubjectRepo

func NewSubjectRepo(db *pgxpool.Pool) *SubjectRepository

func (*SubjectRepository) AddSubject

func (r *SubjectRepository) AddSubject(ctx context.Context, entity *subjectEntity) error

func (*SubjectRepository) Delete

func (r *SubjectRepository) Delete(ctx context.Context, id string) error

func (*SubjectRepository) FilterSubjectsByName

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

func (*SubjectRepository) Update

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

type UgsnRepository

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

func NewUgsnRepository

func NewUgsnRepository(pool *pgxpool.Pool) *UgsnRepository

func (*UgsnRepository) AddUgsn

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

func (*UgsnRepository) Delete

func (r *UgsnRepository) Delete(ctx context.Context, id string) error

func (*UgsnRepository) FindAllUgsn

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

func (*UgsnRepository) GetUgsn

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

func (*UgsnRepository) Update

func (r *UgsnRepository) Update(ctx context.Context, id string, update service.UgsnUpdate) error

Jump to

Keyboard shortcuts

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