Documentation ¶
Overview ¶
Package render handles template parsing and execution for services.
Index ¶
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 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.