slack

package
v0.7.6-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseMessage

func ParseMessage(message domain.NotificationMessage, templates domain.NotificationMessages, defaultTemplateFiles embed.FS) (string, error)

Types

type Config

type Config struct {
	Workspaces []SlackWorkspace `mapstructure:"workspaces"`
	Messages   domain.NotificationMessages
}

type Notifier

type Notifier struct {
	Messages domain.NotificationMessages
	// contains filtered or unexported fields
}

func NewNotifier

func NewNotifier(config *Config, httpClient utils.HTTPClient) *Notifier

func (*Notifier) Notify

func (n *Notifier) Notify(items []domain.Notification) []error

type SlackWorkspace added in v0.7.6

type SlackWorkspace struct {
	WorkspaceName string `mapstructure:"workspace" validate:"required"`
	AccessToken   string `mapstructure:"access_token" validate:"required"`
	Criteria      string `mapstructure:"criteria" validate:"required"`
}

Jump to

Keyboard shortcuts

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