smtp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package smtp implements an email notification handler for kubewatch.

See example configuration in the ConfigExample constant.

Index

Constants

View Source
const (

	// ConfigExample is an example configuration.
	ConfigExample = `` /* 239-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func LoginAuth

func LoginAuth(username, password string) smtp.Auth

Types

type SMTP

type SMTP struct {
	// contains filtered or unexported fields
}

SMTP handler implements handler.Handler interface, Notify event via email.

func (*SMTP) Init

func (s *SMTP) Init(c *config.Config) error

Init prepares Webhook configuration

func (*SMTP) ObjectCreated

func (s *SMTP) ObjectCreated(obj interface{})

ObjectCreated calls notifyWebhook on event creation

func (*SMTP) ObjectDeleted

func (s *SMTP) ObjectDeleted(obj interface{})

ObjectDeleted calls notifyWebhook on event creation

func (*SMTP) ObjectUpdated

func (s *SMTP) ObjectUpdated(oldObj, newObj interface{})

ObjectUpdated calls notifyWebhook on event creation

func (*SMTP) TestHandler

func (s *SMTP) TestHandler()

TestHandler tests the handler configurarion by sending test messages.

Jump to

Keyboard shortcuts

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