slacknotifier

package
v1.64.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 12 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

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

Notifier is a slack notifier

To use this notifier, you need to setup the slack app permissions: - channels:read - chat:write

When using "pins", you will need permission: "pins:write"

func New

func New(client *slack.Client, channel string, options ...NotifyOption) *Notifier

func (*Notifier) Notify

func (n *Notifier) Notify(obj interface{}, args ...interface{})

func (*Notifier) NotifyTo

func (n *Notifier) NotifyTo(channel string, obj interface{}, args ...interface{})

func (*Notifier) PostLiveNote added in v1.61.0

func (n *Notifier) PostLiveNote(obj livenote.Object, opts ...livenote.Option) error

func (*Notifier) Upload added in v1.63.0

func (n *Notifier) Upload(upload *types.UploadFile)

Upload is used to upload a file to the configured slack channel. This is a blocking function, it will wait until the file is uploaded.

type NotifyOption

type NotifyOption func(notifier *Notifier)

func OptionContext added in v1.61.0

func OptionContext(baseCtx context.Context) NotifyOption

func OptionQueueSize added in v1.61.0

func OptionQueueSize(size int) NotifyOption

type SlackAttachmentCreator

type SlackAttachmentCreator interface {
	SlackAttachment() slack.Attachment
}

type SlackBlocksCreator added in v1.61.0

type SlackBlocksCreator interface {
	SlackBlocks() []slack.Block
}

Jump to

Keyboard shortcuts

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