notification

package
Version: v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Notifiers = map[string]Creator{}

Functions

func Add

func Add(name string, creator Creator)

Types

type Creator

type Creator func() Notifier

type Notification

type Notification struct {
	Type      Type
	Operation Operation

	StartTime time.Time
	EndTime   time.Time
	Error     error
}

type Notifier

type Notifier interface {
	Name() string
	Init() error
	Send(*context.Context, Notification) error
}

type Operation

type Operation int

Operation is the operation that triggers the notification

const (
	Backup  Operation = iota
	Restore Operation = iota
)

type Type

type Type int

Type represents a type of notification

const (
	Success Type = iota
	Failure Type = iota
	Timeout Type = iota
)

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL