notifications

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMailService

func GenerateMailService(senderAddress string, smtpHostAddr string, smtpHostPort int, smtpAuthUser string, smtpAuthPassword string, receiverAddresses []string) (*mail.Mail, error)

GenerateMailService generates a mail service

func GenerateMsteamsService

func GenerateMsteamsService(webHooks []string) (*msteams.MSTeams, error)

GenerateMailService generates a mail service

func GenerateSlackService

func GenerateSlackService(token string, channels []string) (*slack.Slack, error)

Types

type MailSettings

type MailSettings struct {
	Name              string         `mapstructure:"name,omitempty"`
	Type              string         `mapstructure:"type,omitempty"`
	Enabled           *bool          `mapstructure:"enabled,omitempty"`
	SendResolved      *bool          `mapstructure:"sendResolved,omitempty"`
	Subject           string         `mapstructure:"subject,omitempty"`
	Message           string         `mapstructure:"message,omitempty"`
	Notifier          *notify.Notify `mapstructure:"-,omitempty" deepcopier:"skip"`
	SenderAddress     string         `mapstructure:"senderAddress,omitempty"`
	SmtpHostAddr      string         `mapstructure:"smtpHostAddr,omitempty"`
	SmtpHostPort      int            `mapstructure:"smtpHostPort,omitempty"`
	SmtpAuthUser      string         `mapstructure:"smtpAuthUser,omitempty"`
	SmtpAuthPassword  string         `mapstructure:"smtpAuthPassword,omitempty" redacted:"true"`
	ReceiverAddresses []string       `mapstructure:"receiverAddresses,omitempty"`
}

type MsteamsSettings

type MsteamsSettings struct {
	Name         string         `mapstructure:"name,omitempty"`
	Type         string         `mapstructure:"type,omitempty"`
	Enabled      *bool          `mapstructure:"enabled,omitempty"`
	SendResolved *bool          `mapstructure:"sendResolved,omitempty"`
	Subject      string         `mapstructure:"subject,omitempty"`
	Message      string         `mapstructure:"message,omitempty"`
	Notifier     *notify.Notify `mapstructure:"-,omitempty" deepcopier:"skip"`
	WebHooks     []string       `mapstructure:"webhooks,omitempty" redacted:"true"`
}

type SlackSettings

type SlackSettings struct {
	Name         string         `mapstructure:"name,omitempty"`
	Type         string         `mapstructure:"type,omitempty"`
	Enabled      *bool          `mapstructure:"enabled,omitempty"`
	SendResolved *bool          `mapstructure:"sendResolved,omitempty"`
	Notifier     *notify.Notify `mapstructure:"-,omitempty" deepcopier:"skip"`
	Subject      string         `mapstructure:"subject,omitempty"`
	Message      string         `mapstructure:"message,omitempty"`
	OauthToken   string         `mapstructure:"oauthToken,omitempty" redacted:"true"`
	Channels     []string       `mapstructure:"channels,omitempty"`
}

Jump to

Keyboard shortcuts

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