linstrom/storage/userIdentType.go

22 lines
506 B
Go
Raw Permalink Normal View History

2024-05-31 09:54:39 +00:00
package storage
2024-12-18 14:24:56 +00:00
import "git.mstar.dev/mstar/goutils/sliceutils"
2024-06-06 11:54:50 +00:00
// What kind of being a user identifies as
2024-05-31 09:54:39 +00:00
type Being string
const (
BEING_HUMAN = Being("human")
BEING_CAT = Being("cat")
BEING_FOX = Being("fox")
BEING_DOG = Being("dog")
BEING_ROBOT = Being("robot")
BEING_DOLL = Being("doll")
)
var allBeings = []Being{BEING_HUMAN, BEING_CAT, BEING_FOX, BEING_DOG, BEING_ROBOT, BEING_DOLL}
func IsValidBeing(toCheck string) bool {
return sliceutils.Contains(allBeings, Being(toCheck))
}