formatters

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadTemplates added in v0.6.0

func ReadTemplates() map[string]string

ReadTemplates reads the body, title and commit templates from files.

Types

type DefaultFormatter

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

The default formatter formats a message for a chat webhook

func NewDefaultFormatter

func NewDefaultFormatter(config config.Config) (*DefaultFormatter, error)

Create a DefaultFormatter

func (DefaultFormatter) FormatEvent

func (d DefaultFormatter) FormatEvent(event fluxevent.Event, exporter exporters.Exporter) msg.Message

Format plaintext message for an exporter for Flux event

type Formatter

type Formatter interface {
	FormatEvent(event fluxevent.Event, exporter exporters.Exporter) msg.Message
}

Formats a flux event for an exporter

Jump to

Keyboard shortcuts

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