template-monorepo/internal/model/notification/domain/enum/channel.go

25 lines
433 B
Go

package enum
// Channel is the outbound delivery channel.
type Channel string
const (
ChannelEmail Channel = "email"
ChannelSMS Channel = "sms"
ChannelPush Channel = "push"
ChannelWebhook Channel = "webhook"
)
func (c Channel) String() string {
return string(c)
}
func (c Channel) IsValid() bool {
switch c {
case ChannelEmail, ChannelSMS, ChannelPush, ChannelWebhook:
return true
default:
return false
}
}