Files
kurious/internal/kurious/adapters/memory_mapper.go
2024-01-08 18:31:35 +03:00

22 lines
524 B
Go

package adapters
type inMemoryMapper struct {
courseThematicsByID map[string]string
learningTypeByID map[string]string
}
func NewMemoryMapper(courseThematics, learningType map[string]string) inMemoryMapper {
return inMemoryMapper{
courseThematicsByID: courseThematics,
learningTypeByID: learningType,
}
}
func (m inMemoryMapper) CourseThematicNameByID(id string) string {
return m.courseThematicsByID[id]
}
func (m inMemoryMapper) LearningTypeNameByID(id string) string {
return m.learningTypeByID[id]
}