// CreateNotifier creates a new notifier: slack, email, etc
CreateNotifier creates a new notifier: slack, email, etc
// CreateNotifier creates a new notifier : slack email etc
func CreateNotifier(request CreateNotifierRequest) (CreateNotifierResponse, error) {
	notifier, err := entities.NewNotifier(
		request.Name,
		request.Type,
		request.Metadata,
	)
	if err != nil {
		return CreateNotifierResponse{}, err
	}
	err = writer.CreateNotifier(&notifier)
	if err != nil {
		return CreateNotifierResponse{}, err
	}
	return CreateNotifierResponse{Msg: notifier.Name + " created"}, nil
}
func CreateNotifier ( request CreateNotifierRequest ) ( CreateNotifierResponse , error ) { notifier , err := entities . NewNotifier ( request . Name , request . Type , request . Metadata , ) if err != nil { return CreateNotifierResponse { } , err } err = writer . CreateNotifier ( & notifier ) if err != nil { return CreateNotifierResponse { } , err } return CreateNotifierResponse { Msg : notifier . Name + " " } , nil }
CreateNotifier creates a new notifier: slack, email, etc
CreateNotifier creates a new notifier : slack email etc