notify

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents the data for sending notifications to the user.

func New

func New(cfg *config.Config) *Client

New instantiates a new Notifier client.

func (*Client) Send

func (c *Client) Send(url, prev, now string) error

Send sends a notification to the services with a message indicating what URL and element has changed. Returns errors.INTERNAL if the message could not be sent.

type Notifier

type Notifier interface {
	// Send sends a notification to the services with
	// a message indicating what URL and element
	// has changed.
	// Returns errors.INTERNAL if the message could not be sent.
	Send(url, prev, now string) error
}

Notifier defines the behavior for notification services. The Send function sends a URL with previous and element that is now on the page.

Jump to

Keyboard shortcuts

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