Documentation ¶
Overview ¶
Package render handles template parsing and execution for services.
Index ¶
- func Digest(cols []wayback.Collect, rdx reduxer.Reduxer) (dgst string)
- func Title(cols []wayback.Collect, rdx reduxer.Reduxer) (title string)
- type Collect
- type Collects
- type Discord
- type GitHub
- type Mastodon
- type Matrix
- type Nostr
- type Notion
- type Relaychat
- type Render
- type Renderer
- type Slack
- type Telegram
- type Twitter
- type XMPP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collect ¶
Collect represents a render data collection. Arc is name of the archive service, Dst mapping the original URL and archived destination URL, Ext is extra descriptions.
type Discord ¶ added in v0.15.1
Discord represents a Discord template data for render.
func (*Discord) ForPublish ¶ added in v0.15.1
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` and `reduxer.Reduxer` from the Discord and returns a *Render.
type GitHub ¶
GitHub represents a GitHub template data for render.
func (*GitHub) ForPublish ¶
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` and `reduxer.Reduxer` from the GitHub and returns a *Render.
type Mastodon ¶
Mastodon represents a Mastodon template data for render.
func (*Mastodon) ForPublish ¶
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` and `reduxer.Reduxer` from the Mastodon and returns a *Render.
type Matrix ¶
Matrix represents a Matrix template data for render.
func (*Matrix) ForPublish ¶
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` and `reduxer.Reduxer` from the Matrix and returns a *Render.
type Nostr ¶ added in v0.19.0
Nostr represents a Nostr template data for render.
func (*Nostr) ForPublish ¶ added in v0.19.0
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` and `reduxer.Reduxer` from the Nostr and returns a *Render.
ForPublish generate tweet of given wayback collects in Nostr struct. It excluded telegra.ph, because this link has been identified by Nostr.
type Notion ¶ added in v0.18.0
Notion represents a Notion template data for render.
func (*Notion) ForPublish ¶ added in v0.18.0
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` and `reduxer.Reduxer` from the Notion and returns a *Render.
type Relaychat ¶
Relaychat represents a Relaychat template data for render.
func (*Relaychat) ForPublish ¶
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` from the Relaychat and returns a *Render.
type Render ¶
type Render struct {
// contains filtered or unexported fields
}
Render represents a Render result.
func ForPublish ¶
ForPublish handles render template for publishing, it returns a Render.
type Renderer ¶
type Renderer interface { // ForReply render text for reply to user. ForReply() *Render // ForPublish render text for publish. ForPublish() *Render }
Renderer is the interface that wraps the ForReply and ForPublish method.
type Slack ¶ added in v0.15.1
Slack represents a Slack template data for render.
func (*Slack) ForPublish ¶ added in v0.15.1
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` and `reduxer.Reduxer` from the Slack and returns a *Render.
type Telegram ¶
Telegram represents a Telegram template data for render.
func (*Telegram) ForPublish ¶
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` and `reduxer.Reduxer` from the Telegram and returns a *Render.
type Twitter ¶
Twitter represents a Twitter template data for render.
func (*Twitter) ForPublish ¶
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` and `reduxer.Reduxer` from the Twitter and returns a *Render.
ForPublish generate tweet of given wayback collects in Twitter struct. It excluded telegra.ph, because this link has been identified by Twitter.
type XMPP ¶ added in v0.20.0
XMPP represents a XMPP template data for render.
func (*XMPP) ForPublish ¶ added in v0.20.0
ForPublish implements the standard Renderer interface: it reads `[]wayback.Collect` from the XMPP and returns a *Render.