23 lines
459 B
Go
23 lines
459 B
Go
|
|
package enum
|
||
|
|
|
||
|
|
// RegistrationChannel identifies how a member registered.
|
||
|
|
type RegistrationChannel string
|
||
|
|
|
||
|
|
const (
|
||
|
|
RegistrationChannelEmail RegistrationChannel = "email"
|
||
|
|
RegistrationChannelGoogle RegistrationChannel = "google"
|
||
|
|
)
|
||
|
|
|
||
|
|
func (c RegistrationChannel) String() string {
|
||
|
|
return string(c)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c RegistrationChannel) Valid() bool {
|
||
|
|
switch c {
|
||
|
|
case RegistrationChannelEmail, RegistrationChannelGoogle:
|
||
|
|
return true
|
||
|
|
default:
|
||
|
|
return false
|
||
|
|
}
|
||
|
|
}
|