slack

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: Apache-2.0, CC-BY-4.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Fallback string            `json:"fallback"`
	Color    event.StatusColor `json:"color"`
	Pretext  string            `json:"pretext"`
	Title    string            `json:"title"`
	Text     string            `json:"text"`
	Fields   []Field           `json:"fields"`
	Footer   string            `json:"footer"`
}

Attachment is representation of json attachment.

type Field

type Field struct {
	Title string `json:"title"`
	Value string `json:"value"`
	Short bool   `json:"short"`
}

Field is representation of json field.

type Message

type Message struct {
	Text        string       `json:"text"`
	Attachments []Attachment `json:"attachments"`
}

Message is representation of json message.

type Slack

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

Slack is a Slack notification service.

func New

func New(k8sClient k8sclient.Client, config v1alpha2.Notification, httpClient http.Client) *Slack

New returns instance of Slack.

func (Slack) Send

func (s Slack) Send(e event.Event) error

Send is function for sending directly to API.

Jump to

Keyboard shortcuts

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