service

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFoundEntity      = errors.New("not found")
	AlreadyExistsEntity = errors.New("already exist")
)

Functions

func IsAlreadyExistEntity

func IsAlreadyExistEntity(err error) bool

func IsNotFoundEntity

func IsNotFoundEntity(err error) bool

Types

type CompetencyRepository

type CompetencyRepository interface {
	AddCompetency(ctx context.Context, competency *competencies.Competency) error
	GetCompetency(ctx context.Context, id string) (*competencies.Competency, error)
	Update(ctx context.Context, id string, update CompetencyUpdate) error
	Delete(ctx context.Context, id string) error
}

type CompetencyUpdate

type CompetencyUpdate func(ctx context.Context, competency *competencies.Competency) (*competencies.Competency, error)

type IndicatorRepository

type IndicatorRepository interface {
	AddIndicator(ctx context.Context, indicator *competencies.Indicator) error
	GetIndicator(ctx context.Context, id string) (*competencies.Indicator, error)
	Update(ctx context.Context, id string, updater IndicatorUpdate) error
	Delete(ctx context.Context, id string) error
}

type IndicatorUpdate

type IndicatorUpdate func(ctx context.Context, level *competencies.Indicator) (*competencies.Indicator, error)

type LevelRepository

type LevelRepository interface {
	AddLevel(ctx context.Context, level *education.Level) error
	GetLevel(ctx context.Context, id string) (*education.Level, error)
	UpdateLevel(ctx context.Context, id string, updater LevelUpdate) error
	Delete(ctx context.Context, id string) error
}

type LevelUpdate

type LevelUpdate func(ctx context.Context, level *education.Level) (*education.Level, error)

type Logger

type Logger interface {
	With(args ...interface{}) Logger
	Debug(msg string, args ...interface{})
	Info(msg string, args ...interface{})
	Warn(msg string, args ...interface{})
	Error(msg string, args ...interface{})
	Fatal(msg string, args ...interface{})
}

type ProgramRepository

type ProgramRepository interface {
	AddProgram(ctx context.Context, program *education.Program) error
	GetProgram(ctx context.Context, id string) (*education.Program, error)
	Update(ctx context.Context, id string, update ProgramUpdate) error
	Delete(ctx context.Context, id string) error
}

type ProgramUpdate

type ProgramUpdate func(ctx context.Context, program *education.Program) (*education.Program, error)

type SpecialtyRepository

type SpecialtyRepository interface {
	AddSpecialty(ctx context.Context, level *education.Speciality) error
	GetSpecialty(ctx context.Context, id string) (*education.Speciality, error)
	Update(ctx context.Context, id string, update SpecialtyUpdate) error
	Delete(ctx context.Context, id string) error
}

type SpecialtyUpdate

type SpecialtyUpdate func(ctx context.Context, specialty *education.Speciality) (*education.Speciality, error)

type UgsnRepository

type UgsnRepository interface {
	AddUgsn(ctx context.Context, ugsn *education.Ugsn) error
	GetUgsn(ctx context.Context, id string) (*education.Ugsn, error)
	Update(ctx context.Context, id string, update UgsnUpdate) error
	Delete(ctx context.Context, id string) error
}

type UgsnUpdate

type UgsnUpdate func(ctx context.Context, ugsn *education.Ugsn) (*education.Ugsn, error)

Jump to

Keyboard shortcuts

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