slack

package
v0.0.0-...-e0e0b42 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SlackNotifierType spec.NotifierType = "SlackNotifier"

SlackNotifierType is an Notifier that uses Slack.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsSlackError

func IsSlackError(err error) bool

IsSlackError asserts slackError.

Types

type Config

type Config struct {
	// Dependencies.
	Logger      micrologger.Logger
	SlackClient slackspec.Client

	// Settings.
	Channel     string
	Emoji       string
	Environment string
	Username    string
}

Config represents the configuration used to create a Slack Notifier..

func DefaultConfig

func DefaultConfig() Config

DefaultConfig provides a default configuration to create a new Slack Notifier by best effort.

type SlackNotifier

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

SlackNotifier is an implementation of the Notifier interface, that uses Slack.

func New

func New(config Config) (*SlackNotifier, error)

New creates a new configured Slack Notifier.

func (*SlackNotifier) Failed

func (n *SlackNotifier) Failed(event eventerspec.DeploymentEvent, errorMessage string) error

func (*SlackNotifier) Success

func (n *SlackNotifier) Success(event eventerspec.DeploymentEvent) error

Jump to

Keyboard shortcuts

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