notifications

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrNotificationNotPresent error is caused when there isn't any notification present in the config
	ErrNotificationNotPresent = fmt.Errorf("no notification specified in the config")
)

Functions

func IsNotifierSupported

func IsNotifierSupported(notifierType string) bool

IsNotifierSupported returns true/false depending on whether the notifier is supported in terrascan or not

func RegisterNotifier

func RegisterNotifier(notifierType supportedNotifierType, notifierProvider reflect.Type)

RegisterNotifier registers an notifier provider for terrascan

Types

type Notifier

type Notifier interface {
	Init(interface{}) error
	SendNotification(interface{}) error
}

Notifier defines the interface which every type of notification provider needs to implement to claim support in terrascan

func NewNotifier

func NewNotifier(notifierType string) (notifier Notifier, err error)

NewNotifier returns a new notifier

func NewNotifiers

func NewNotifiers() ([]Notifier, error)

NewNotifiers returns a list of notifiers configured in the config file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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