slack

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Slack

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

Slack holds all necessary information require to communicate with the Slack API.

func GetSlackClient

func GetSlackClient(ctx context.Context, logger log.Logger, client SlackClient, slackConfig *config.SlackConfig) *Slack

func NewClient

func NewClient(ctx context.Context, logger log.Logger, slackConfig *config.SlackConfig) (*Slack, error)

NewClient will return Slack with the initialized configuration.

func (*Slack) Notify

func (s *Slack) Notify(msg string) error

Notify sends a message to the slack channel.

type SlackClient

type SlackClient interface {
	PostMessageContext(ctx context.Context, channelID string, options ...slack.MsgOption) (string, string, error)
}

Jump to

Keyboard shortcuts

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