notification

package
v0.0.0-...-e99a25f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MSG_DATA_TEMPLATE = "```%s```\n------------------------------------------------------------"
)

Functions

This section is empty.

Types

type Notifications

type Notifications struct {
	Engines []certainly.Notification
	Config  *certainly.CertainlyCFG
	Logger  *zap.SugaredLogger
}

func Initialize

func Initialize(config *certainly.CertainlyCFG, logger *zap.SugaredLogger) *Notifications

func (*Notifications) Notify

func (n *Notifications) Notify(protocol string, message string)

type Slack

type Slack struct {
	SlackToken          string
	SlackDefaultChannel string
	SlackHTTP           bool
	SlackHTTPChannel    string
	SlackHTTPFilters    []string
	SlackDNS            bool
	SlackDNSChannel     string
	SlackDNSFilters     []string
	SlackSMTP           bool
	SlackSMTPChannel    string
	SlackSMTPFilters    []string
	SlackIMAP           bool
	SlackIMAPChannel    string
	SlackIMAPFilters    []string
	Client              *slack.Client
	Logger              *zap.SugaredLogger
}

func NewSlack

func NewSlack(config *certainly.CertainlyCFG, logger *zap.SugaredLogger) (*Slack, error)

func (*Slack) Notify

func (s *Slack) Notify(protocol string, message string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL