notifier

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field added in v0.9.0

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

type LogNotifier

type LogNotifier struct {
	Logger *log.Logger
}

func (*LogNotifier) Notify

func (c *LogNotifier) Notify(diff model.DiffCache, wg *sync.WaitGroup)

type Notifier

type Notifier interface {
	Notify(cache model.DiffCache, waitGroup *sync.WaitGroup)
}

type SlackNotifier added in v0.9.0

type SlackNotifier struct {
	Logger     *log.Logger
	HTTPClient internal.HTTPClient
	WebhookURL url.URL
}

func NewSlackNotifier added in v0.9.0

func NewSlackNotifier(logger *log.Logger, httpClient internal.HTTPClient, webhookURL string) SlackNotifier

func (*SlackNotifier) Notify added in v0.9.0

func (c *SlackNotifier) Notify(diff model.DiffCache, wg *sync.WaitGroup)

type WebhookNotifier

type WebhookNotifier struct {
	Logger      *log.Logger
	HTTPClient  internal.HTTPClient
	EndpointURL url.URL
	Secret      string
	Meta        map[string]string
}

func NewWebhookNotifier added in v0.9.0

func NewWebhookNotifier(logger *log.Logger,
	httpClient internal.HTTPClient,
	endpointURL string,
	secret string,
	meta map[string]string,
) (WebhookNotifier, error)

func (*WebhookNotifier) Notify

func (c *WebhookNotifier) Notify(diff model.DiffCache, wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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