22 lines
524 B
Go
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]
|
|
}
|