notifications

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.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 Event

type Event struct {
	Jenkins           v1alpha2.Jenkins
	ConfigurationType string
	LogLevel          v1alpha2.NotificationLogLevel
	Message           string
	MessageVerbose    string
}

Event contains event details which will be sent as a notification

type LoggingLevel

type LoggingLevel string

LoggingLevel is type for selecting different logging levels

type MailGun

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

MailGun is a sending emails notification service

func (MailGun) Send

func (m MailGun) Send(event Event, config v1alpha2.Notification) error

Send is function for sending directly to API

type Slack

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

Slack is a Slack notification service

func (Slack) Send

func (s Slack) Send(event Event, config v1alpha2.Notification) error

Send is function for sending directly to API

type SlackAttachment

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

SlackAttachment is representation of json attachment

type SlackField

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

SlackField is representation of json field.

type SlackMessage

type SlackMessage struct {
	Text        string            `json:"text"`
	Attachments []SlackAttachment `json:"attachments"`
}

SlackMessage is representation of json message

type StatusColor

type StatusColor string

StatusColor is useful for better UX

type Teams

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

Teams is a Microsoft MicrosoftTeams notification service

func (Teams) Send

func (t Teams) Send(event Event, config v1alpha2.Notification) error

Send is function for sending directly to API

type TeamsFact

type TeamsFact struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

TeamsFact is field where we can put content

type TeamsMessage

type TeamsMessage struct {
	Type       string         `json:"@type"`
	Context    string         `json:"@context"`
	ThemeColor StatusColor    `json:"themeColor"`
	Title      string         `json:"title"`
	Sections   []TeamsSection `json:"sections"`
}

TeamsMessage is representation of json message structure

type TeamsSection

type TeamsSection struct {
	Facts []TeamsFact `json:"facts"`
	Text  string      `json:"text"`
}

TeamsSection is MS Teams message section

Jump to

Keyboard shortcuts

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