slack

package
v0.0.0-...-a96911d Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGlobalHelper

func NewGlobalHelper(opts ...Option) error

Types

type Client

type Client interface {
	PostMessage(string, ...slack.MsgOption) (string, string, error)
}

type Helper

type Helper struct {
	Client
	PostWebhook func(string, *slack.WebhookMessage) error
	Options
}

func GetGlobalHelper

func GetGlobalHelper() *Helper

func NewHelper

func NewHelper(opts ...Option) (*Helper, error)

func (*Helper) SendTextMsg

func (h *Helper) SendTextMsg(channel, msg string) error

func (*Helper) SendWebhookMsg

func (h *Helper) SendWebhookMsg(url string, msg string) error

func (*Helper) SetClients

func (h *Helper) SetClients() error

type Option

type Option func(*Options)

func Token

func Token(token string) Option

type Options

type Options struct {
	Token string
}

Jump to

Keyboard shortcuts

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