nquest/api/mapper.go

25 lines
389 B
Go

package api
import (
"gitrepo.ru/neonxp/nquest/pkg/models"
)
func MapGameType(typ GameType) models.GameType {
switch typ {
case City:
return models.CityGame
case Virtual:
return models.VirtualGame
}
return 0
}
func MapGameTypeReverse(typ models.GameType) GameType {
switch typ {
case models.CityGame:
return City
case models.VirtualGame:
return Virtual
}
return ""
}