notifier

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier interface {
	Notify(state ScheduleType, action action.Action)
}

type Notifiers

type Notifiers []Notifier

func (Notifiers) Notify

func (n Notifiers) Notify(state ScheduleType, action action.Action)

type SLogNotifier

type SLogNotifier struct {
	Logger *slog.Logger
}

func (SLogNotifier) Notify

func (s SLogNotifier) Notify(state ScheduleType, action action.Action)

type ScheduleType

type ScheduleType int
const (
	Queued ScheduleType = iota
	Done
	Canceled
)

type SlackNotifier

type SlackNotifier struct {
	Logger *slog.Logger
	SlackSender
	// contains filtered or unexported fields
}

func (*SlackNotifier) Notify

func (s *SlackNotifier) Notify(action ScheduleType, state action.Action)

type SlackSender

type SlackSender interface {
	PostMessage(string, ...slack.MsgOption) (string, string, error)
	GetConversations(*slack.GetConversationsParameters) ([]slack.Channel, string, error)
	AuthTest() (*slack.AuthTestResponse, error)
	GetUsersInConversation(params *slack.GetUsersInConversationParameters) ([]string, string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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