notify

package
v0.0.0-...-eeef5bb Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Message      string
	Channel      string
	IsAttachment bool
}

type Notifier

type Notifier interface {
	SendMessage(ctx context.Context, message string, targetChannel string) error
	SendAttachmentMessage(ctx context.Context, attachment slack.Attachment, targetChannel string) error
	SendDialog(ctx context.Context, dialog slack.Dialog, triggerId string) error
	PublishView(userID string, view slack.HomeTabViewRequest, hash string) error
}

type SlackNotifier

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

Slack contains Token for authentication with slack and Channel name to send notification to

func NewSlackNotifier

func NewSlackNotifier(log logger.Logger, token string, channel string) *SlackNotifier

func (*SlackNotifier) PublishView

func (s *SlackNotifier) PublishView(userID string, view slack.HomeTabViewRequest, hash string) error

func (*SlackNotifier) SendAttachmentMessage

func (s *SlackNotifier) SendAttachmentMessage(ctx context.Context, attachment slack.Attachment, targetChannel string) error

func (*SlackNotifier) SendDialog

func (s *SlackNotifier) SendDialog(ctx context.Context, dialog slack.Dialog, triggerId string) error

func (*SlackNotifier) SendMessage

func (s *SlackNotifier) SendMessage(ctx context.Context, message string, targetChannel string) error

Jump to

Keyboard shortcuts

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