notification

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMastodonRepository

func NewMastodonRepository(l log.Logger, c *mastodon.Client) *mastodonRepository

NewMastodonRepository initializes a new Mastodon notifier repository

func NewMockRepository added in v0.0.10

func NewMockRepository(l log.Logger, serviceName string) *mockRepository

NewMockRepository initializes a new mock notifier repository to test notifications locally

func NewTwitterRepository

func NewTwitterRepository(l log.Logger, c *twitter.Client, tu *twitter.User) *twitterRepository

NewTwitterRepository initializes a new Twitter notifier repository

Types

type Notifiers added in v0.0.10

type Notifiers []Repository

func (Notifiers) String added in v0.0.10

func (n Notifiers) String() string

type Repository

type Repository interface {
	Post(ctx context.Context, text string, author string, url string) error
	String() string
}

Repository is an interface for a notifier repository

Jump to

Keyboard shortcuts

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