publish

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagWeb      = "web"
	FlagTelegram = "telegram"
	FlagTwitter  = "twitter"
	FlagMastodon = "mastodon"
	FlagDiscord  = "discord"
	FlagMatrix   = "matrix"
	FlagSlack    = "slack"
	FlagIRC      = "irc"

	PubBundle = "reduxer-bundle"
)

Variables

This section is empty.

Functions

func NewDiscord added in v0.15.1

func NewDiscord(bot *discord.Session) *discordBot

NewDiscord returns Discord bot client

func NewGitHub added in v0.7.0

func NewGitHub(httpClient *http.Client) *gitHub

func NewIRC added in v0.9.0

func NewIRC(conn *irc.Connection) *ircBot

func NewMastodon added in v0.8.0

func NewMastodon(client *mstdn.Client) *mastodon

func NewMatrix added in v0.9.0

func NewMatrix(client *matrix.Client) *matrixBot

func NewSlack added in v0.15.1

func NewSlack(bot *slack.Client) *slackBot

NewSlack returns Slack bot client

func NewTelegram added in v0.10.0

func NewTelegram(bot *telegram.Bot) *telegramBot

NewTelegram returns Telegram bot client

func NewTwitter added in v0.8.0

func NewTwitter(client *twitter.Client) *twitterBot

func To added in v0.8.3

func To(ctx context.Context, cols []wayback.Collect, args ...string)

nolint:gocyclo

func UploadToDiscord added in v0.15.1

func UploadToDiscord(bundle *reduxer.Bundle) (files []*discord.File)

func UploadToSlack added in v0.15.1

func UploadToSlack(client *slack.Client, bundle *reduxer.Bundle, channel, timestamp string) (err error)

UploadToSlack upload files to channel and attach as a reply by the given bundle

func UploadToTelegram added in v0.15.1

func UploadToTelegram(bundle *reduxer.Bundle) telegram.Album

Types

type Publisher added in v0.14.0

type Publisher interface {
	Publish(ctx context.Context, cols []wayback.Collect, args ...string)
}

Publisher is the interface that wraps the basic Publish method.

Publish publish message to serveral media platforms, e.g. Telegram channel, GitHub Issues, etc. The cols must either be a []wayback.Collect, args use for specific service.

Jump to

Keyboard shortcuts

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