func (s *Slack) Alert(expiration time.Time, ingress *source.Ingress, tls *source.IngressTLS, opt notifier.Option) error {
	params := newPostParameters(expiration, ingress, tls, opt.AlertLevel)
	return s.postWithRateLimiter(s.ChannelName, "", params)
}
Alert defined by notifier.Notifier interface.
This implementation post message that includes infromation about ingress and TLS and those deadline.
package slack
import (
	"errors"
	"time"
	libSlack "github.com/nlopes/slack"
	"go.uber.org/ratelimit"
	"github.com/mercari/certificate-expiry-monitor-controller/notifier"
	"github.com/mercari/certificate-expiry-monitor-controller/source"
)
const (
	sendPerSecond = 1
	notifierName = "slack"
)
type API interface {
	PostMessage(string, string, libSlack.PostMessageParameters) (string, string, error)
}
type Slack struct {
	APIClient   API
	ChannelName string
	RateLimiter ratelimit.Limiter
}
func NewNotifier(token string, channel string) (notifier.Notifier, error) {
	if token == "" {
		return nil, errors.New("token is missing")
	}
	if channel == "" {
		return nil, errors.New("channel is missing")
	}
	return &Slack{
		APIClient:   libSlack.New(token),
		ChannelName: channel,
		RateLimiter: ratelimit.New(sendPerSecond),
	}, nil
}
func String() string {
	return notifierName
}