예제 #1
0
func getTargetType(t *pb.Target) drivers.NotificationType {
	switch t.GetBackend().(type) {
	case *pb.Target_Email:
		return drivers.TypeEmail
	case *pb.Target_Push:
		return drivers.TypePush
	case *pb.Target_Sms:
		return drivers.TypeSms
	default:
		return drivers.TypeUnknown
	}
}
예제 #2
0
func getTargetType(t *pb.Target) string {
	switch t.GetBackend().(type) {
	case *pb.Target_Email:
		return drivers.TypeEmail
	case *pb.Target_Push:
		return drivers.TypePush
	case *pb.Target_Sms:
		return drivers.TypeSms
	default:
		return ""
	}
}