slack

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewFxLoggerFactory

func NewFxLoggerFactory(fxLF di.FxLoggerFactory, slackClient *Client, lf *log.LoggerFactory) di.FxLoggerFactory

Types

type Client

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

func NewSlackClient

func NewSlackClient(conf config.Config, lf *log.LoggerFactory) *Client

func (*Client) Errorb

func (s *Client) Errorb(blocks []map[string]any) error

func (*Client) Errorf

func (s *Client) Errorf(message string, args ...any) error

func (*Client) Infob

func (s *Client) Infob(blocks []map[string]any) error

func (*Client) Infof

func (s *Client) Infof(message string, args ...any) error

func (*Client) Send

func (s *Client) Send(channelType WebhookChannelType, message string, args []any) error

func (*Client) SendWithBlocks

func (s *Client) SendWithBlocks(channelType WebhookChannelType, blocks []map[string]any) error

func (*Client) Warnb

func (s *Client) Warnb(blocks []map[string]any) error

func (*Client) Warnf

func (s *Client) Warnf(message string, args ...any) error

type FxLogger

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

func NewFxLogger

func NewFxLogger(slackClient *Client, fxLogger fxevent.Logger, logger log.Logger) *FxLogger

func (*FxLogger) LogEvent

func (l *FxLogger) LogEvent(event fxevent.Event)

type WebhookChannelType

type WebhookChannelType string
const (
	WebhookChannelTypeInfo  WebhookChannelType = "ℹ️ Info"
	WebhookChannelTypeWarn  WebhookChannelType = "⚠️ Warn"
	WebhookChannelTypeError WebhookChannelType = "❗️Error"
)

Jump to

Keyboard shortcuts

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