Documentation ¶
Index ¶
- type Config
- type Option
- type Slack
- func (s *Slack) Channel(id string) string
- func (s *Slack) Client(ctx context.Context) (*slack.Client, error)
- func (s *Slack) DividerSection() *slack.DividerBlock
- func (s *Slack) MarkdownSection(text string) *slack.SectionBlock
- func (s *Slack) Send(ctx context.Context, channel string, opts ...slack.MsgOption) error
- func (s *Slack) SendETCDUpdateMessage(ctx context.Context, cluster string) error
- func (s *Slack) SendUserMessage(ctx context.Context, markdown, channel string, annotate bool) error
- type WorkflowPayload
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 ¶
func WithConfigKey ¶
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) DividerSection ¶
func (s *Slack) DividerSection() *slack.DividerBlock
func (*Slack) MarkdownSection ¶
func (s *Slack) MarkdownSection(text string) *slack.SectionBlock
func (*Slack) SendETCDUpdateMessage ¶
type WorkflowPayload ¶
type WorkflowPayload struct {
Msg string `json:"msg"`
}
Click to show internal directories.
Click to hide internal directories.