slack

package
v1.0.1-0...-fe66d50 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Type = "slack"

Type should match the package name

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier struct {
	Username string `json:"username"`
	Channel  string `json:"channel"`
	Webhook  string `json:"webhook"`
}

Notifier consist of all the sub components required to use Slack API

func New

func New(config json.RawMessage) (Notifier, error)

New creates a new Notifier instance based on json config

func (Notifier) Notify

func (s Notifier) Notify(results []types.Result) error

Notify implements notifier interface

func (Notifier) Send

func (s Notifier) Send(result types.Result) error

Send request via Slack API to create incident

func (Notifier) Type

func (Notifier) Type() string

Type returns the notifier package name

Jump to

Keyboard shortcuts

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