slacknotifier

package
v1.61.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: AGPL-3.0 Imports: 13 Imported by: 2

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) SendPhoto added in v1.39.0

func (n *Notifier) SendPhoto(buffer *bytes.Buffer)

func (*Notifier) SendPhotoTo added in v1.39.0

func (n *Notifier) SendPhotoTo(channel string, buffer *bytes.Buffer)

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.Blocks
}

Jump to

Keyboard shortcuts

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