slack

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SlackAgent

type SlackAgent struct {
	notification.WebhookAgent
}

func NewSlackAgent

func NewSlackAgent(config *viper.Viper, logger *zerolog.Logger, restyClient *resty.Client) *SlackAgent

func (*SlackAgent) Name

func (g *SlackAgent) Name() string

func (*SlackAgent) SendEvent

func (a *SlackAgent) SendEvent(event notification.Event)

type SlackBlock

type SlackBlock struct {
	Type     string     `json:"type"`
	Text     *SlackText `json:"text,omitempty"`
	ImageURL string     `json:"image_url,omitempty"`
	AltText  string     `json:"alt_text,omitempty"`
}

type SlackMessage

type SlackMessage struct {
	Blocks []SlackBlock `json:"blocks"`
}

type SlackText

type SlackText struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

Jump to

Keyboard shortcuts

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