notification

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v1.5.0

func Init(uri string) (err error)

Init creates the notifier singleton regarding the URI.

func Notify added in v1.5.0

func Notify(result HookResult)

Notify is the global method to notify hook result

func Register added in v1.16.0

func Register(scheme string, creator NotifierCreator)

Register a Notifier to the registry

Types

type HookResult added in v1.15.0

type HookResult interface {
	ID() uint64
	Name() string
	Logs(filter string) string
	StatusLabel() string
	Err() error
}

HookResult is the result of a hook execution

type Notifier

type Notifier interface {
	Notify(result HookResult) error
}

Notifier is able to send a notification.

func NewNotifier added in v1.16.0

func NewNotifier(uri string) (Notifier, error)

NewNotifier create new Notifier

type NotifierCreator added in v1.16.0

type NotifierCreator func(uri *url.URL) (Notifier, error)

NotifierCreator function for create a notifier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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