slack

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Admin    string `koanf:"admin"`
	BotToken string `koanf:"bot_token"`
	AppToken string `koanf:"app_token"`

	DisableFileUploads bool `koanf:"disable_file_uploads"`
}

func (Config) Validate

func (c Config) Validate() valid.Problems

type Slack

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

func New

func New(
	cfg *Config,
	log *slog.Logger,
	tel telemetry.Telemetry,
	svc service.ServerService,
	domain string,
) (*Slack, error)

func (*Slack) Name

func (s *Slack) Name() string

func (*Slack) Notify

func (s *Slack) Notify(ctx context.Context, n *modules.Notification) error

func (*Slack) NotifyBatch added in v1.26.0

func (s *Slack) NotifyBatch(ctx context.Context, ns []*modules.Notification) error

func (*Slack) RateLimit added in v1.26.0

func (s *Slack) RateLimit() (rate.Limit, int)

RateLimit follows https://docs.slack.dev/reference/methods/chat.postMessage: several hundred messages per minute per workspace.

func (*Slack) Start

func (s *Slack) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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