slack

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT 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

func GetSlackBlock

func GetSlackBlock(generalMessage string, jobURL string, color string, datasetName string) Request

func GetSlackErrorMessage

func GetSlackErrorMessage(message string, bundle string, color 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