notifier

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Notify

func Notify(model config.ModelConfig, info config.ModelRunInfo) error

Types

type Base

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

Base notifier

type Context

type Context interface {
	// contains filtered or unexported methods
}

type Slack

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

type SlackAttachment

type SlackAttachment struct {
	Fallback string                 `json:"fallback"`
	Text     string                 `json:"text"`
	Color    string                 `json:"color"`
	Fields   []SlackAttachmentField `json:"fields,omitempty"`
}

type SlackAttachmentField

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

type SlackNotification

type SlackNotification struct {
	Text        string            `json:"text"`
	Channel     string            `json:"channel"`
	IconEmoji   string            `json:"icon_emoji"`
	Attachments []SlackAttachment `json:"attachments,omitempty"`
}

type StatusData

type StatusData struct {
	Message string `json:"message"`
	Key     string `json:"key"`
}

Jump to

Keyboard shortcuts

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