slack

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: EUPL-1.2 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendSlackRequest

func SendSlackRequest(slackRequest Request, slackURL string) error

Types

type Block

type Block struct {
	Type   string       `json:"type"`
	Text   ValueBlock   `json:"text"`
	Fields []ValueBlock `json:"fields"`
}

type Element

type Element struct {
	Color  string  `json:"color"`
	Blocks []Block `json:"blocks"`
}

type Request

type Request struct {
	Attachments []Element `json:"attachments"`
	Text        *string   `json:"text,omitempty"`
}

func GetSimpleSlackErrorMessage

func GetSimpleSlackErrorMessage(message string) Request

type ValueBlock

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

type ZapWriter

type ZapWriter struct {
	OperatorName    string
	SlackWebhookURL string
}

func (*ZapWriter) Sync

func (slackWriter *ZapWriter) Sync() error

func (*ZapWriter) Write

func (slackWriter *ZapWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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