slack

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 9 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 {
	Token    onepassword.Secret `yaml:"token"`
	Channels map[string]string  `yaml:"channels"`
}

type Option

type Option func(*Slack) error

func WithConfigKey

func WithConfigKey(v string) Option

type Slack

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

func New

func New(l log.Logger, op *onepassword.OnePassword, opts ...Option) (*Slack, error)

func (*Slack) Channel

func (s *Slack) Channel(id string) string

func (*Slack) Client

func (s *Slack) Client(ctx context.Context) (*slack.Client, error)

func (*Slack) DividerSection

func (s *Slack) DividerSection() *slack.DividerBlock

func (*Slack) MarkdownSection

func (s *Slack) MarkdownSection(text string) *slack.SectionBlock

func (*Slack) Send

func (s *Slack) Send(ctx context.Context, channel string, opts ...slack.MsgOption) error

func (*Slack) SendETCDUpdateMessage

func (s *Slack) SendETCDUpdateMessage(ctx context.Context, cluster string) error

func (*Slack) SendUserMessage

func (s *Slack) SendUserMessage(ctx context.Context, markdown, channel string, annotate bool) error

type WorkflowPayload

type WorkflowPayload struct {
	Msg string `json:"msg"`
}

Jump to

Keyboard shortcuts

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