Documentation
¶
Overview ¶
Package handlers contains chainable handlers/middleware for routing.
Index ¶
- Variables
- func AddSubscriptionFilter() http.HandlerFunc
- func DocumentationHandler() http.HandlerFunc
- func FavoriteArticle() http.HandlerFunc
- func GetSubscriptionActionSuggestions() http.HandlerFunc
- func GetSubscriptionFilterSuggestions() http.HandlerFunc
- func HandleAbout() http.HandlerFunc
- func HandleAccountCancel() http.HandlerFunc
- func HandleAccountIssue() http.HandlerFunc
- func HandleAccountSuccess() http.HandlerFunc
- func HandleAddFeedset(static embed.FS) http.HandlerFunc
- func HandleAddGroupSubscription() http.HandlerFunc
- func HandleAddNewFeedSubscription() http.HandlerFunc
- func HandleAddSearchSubscription() http.HandlerFunc
- func HandleAddSubscription() http.HandlerFunc
- func HandleAddSubscriptionToGroup() http.HandlerFunc
- func HandleAddSubscriptionToSearch() http.HandlerFunc
- func HandleChangePassword() http.HandlerFunc
- func HandleChangelog() http.HandlerFunc
- func HandleChangelogFeed() http.HandlerFunc
- func HandleChooseSubscription() http.HandlerFunc
- func HandleComparison() http.HandlerFunc
- func HandleContact() http.HandlerFunc
- func HandleDeactivateAccount() http.HandlerFunc
- func HandleEditSubscription() http.HandlerFunc
- func HandleExportSubscriptions() http.HandlerFunc
- func HandleExternalError(err error) http.HandlerFunc
- func HandleFavoriteSubscription() http.HandlerFunc
- func HandleFeatures() http.HandlerFunc
- func HandleFeaturesCollect() http.HandlerFunc
- func HandleFeaturesConsume() http.HandlerFunc
- func HandleFeaturesCurate() http.HandlerFunc
- func HandleFindSimilarArticles() http.HandlerFunc
- func HandleForgetMe() http.HandlerFunc
- func HandleGenerateSubscriptionEmail() http.HandlerFunc
- func HandleHome() http.HandlerFunc
- func HandleImportSubscriptions() http.HandlerFunc
- func HandleInternalError(referer string, err error) http.HandlerFunc
- func HandleLanding() http.HandlerFunc
- func HandleListArticles() http.HandlerFunc
- func HandleListArticlesUpdates() http.HandlerFunc
- func HandleListFavorites() http.HandlerFunc
- func HandleListSubscriptions() http.HandlerFunc
- func HandleListSubscriptionsUpdates() http.HandlerFunc
- func HandleLogin(res http.ResponseWriter, req *http.Request)
- func HandleLoginCallback(res http.ResponseWriter, req *http.Request)
- func HandleLoginError(res http.ResponseWriter, req *http.Request)
- func HandleManageAccountSubscription() http.HandlerFunc
- func HandleMarkSubscription() http.HandlerFunc
- func HandleMarkSubscriptions() http.HandlerFunc
- func HandleNotFound() http.HandlerFunc
- func HandlePaddleWebhook(res http.ResponseWriter, req *http.Request)
- func HandlePosts() http.HandlerFunc
- func HandlePostsFeed() http.HandlerFunc
- func HandlePurchaseSubscription() http.HandlerFunc
- func HandlePurchaseSubscriptionSuccess() http.HandlerFunc
- func HandleRefreshToken(res http.ResponseWriter, req *http.Request)
- func HandleRemoveSubscription() http.HandlerFunc
- func HandleReportIssue() http.HandlerFunc
- func HandleResendWebhook(res http.ResponseWriter, req *http.Request)
- func HandleSaveAccountSettings() http.HandlerFunc
- func HandleSaveDisplaySettings() http.HandlerFunc
- func HandleSaveSubscription() http.HandlerFunc
- func HandleSearchResults() http.HandlerFunc
- func HandleSearchSuggestions() http.HandlerFunc
- func HandleSearchUpdates() http.HandlerFunc
- func HandleShowAccountSettings() http.HandlerFunc
- func HandleShowDisplaySettings() http.HandlerFunc
- func HandleShowSubscriptionsSettings() http.HandlerFunc
- func HandleSitemap() http.Handler
- func HandleSubmitContact() http.HandlerFunc
- func HandleSubmitForgetMe() http.HandlerFunc
- func HandleSubmitIssue() http.HandlerFunc
- func HandleSubscriptionCategories() http.HandlerFunc
- func HandleSuggestFeeds() http.HandlerFunc
- func HandleSuggestSubscriptionForSearch() http.HandlerFunc
- func HandleUserUnsubscribe() http.HandlerFunc
- func HandleViewArticle() http.HandlerFunc
- func HandleViewer() http.HandlerFunc
- func ImageProxy(proxyURLBase string) http.HandlerFunc
- func ListCategories() http.HandlerFunc
- func LoadCachedImage(res http.ResponseWriter, req *http.Request)
- func Logout(res http.ResponseWriter, req *http.Request)
- func MarkArticle() http.HandlerFunc
- func MarkArticles() http.HandlerFunc
- func PolicyDocsHandler() http.HandlerFunc
- func RenderExternalPage(content ExternalPage) http.HandlerFunc
- func RenderInternalPage(content InternalPage) http.HandlerFunc
- func RenderPartial(content PartialResponseHandler) http.HandlerFunc
- func ShareArticle() http.HandlerFunc
- func ShowSettings() http.HandlerFunc
- func StaticFileHandler(fs http.FileSystem) http.Handler
- func ValidateSubscriptionLimits(next http.Handler) http.Handler
- type About
- type AccountIssue
- type AddSubscription
- type ArticleContent
- type Changelog
- type ChooseSubscription
- type ComparisonPage
- type Contact
- type EditSubscription
- type ExportSubscriptions
- type ExternalError
- type ExternalPage
- type Favorites
- type Features
- type FeaturesCollect
- type FeaturesConsume
- type FeaturesCurate
- type ForgetMe
- type FullResponseHandler
- type Help
- type Home
- type ImportSubscriptions
- type ImportSubscriptionsResults
- type InternalError
- type InternalPage
- type Landing
- type ListArticles
- type ListSubscriptions
- type Login
- type Modal
- type NotFoundPage
- type Notification
- type PageIssue
- type PartialResponseHandler
- type PartialTemplate
- type Post
- type PostsIndex
- type PurchaseSubscriptionSuccess
- type Route
- type SearchResults
- type SearchSuggestions
- type SimilarArticles
- type Unsubscribe
- type UnsubscribeResult
- type UserSettings
- type Viewer
- type ViewerError
- type ViewerResponse
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidContent indicates that the content for rendering is invalid. ErrInvalidContent = errors.New("invalid content") // ErrInvalidRequestParams indicates that the request parameters received were invalid. ErrInvalidRequestParams = errors.New("invalid request parameters") )
Functions ¶
func AddSubscriptionFilter ¶
func AddSubscriptionFilter() http.HandlerFunc
AddSubscriptionFilter handles adding a subscription as a search filter.
func DocumentationHandler ¶
func DocumentationHandler() http.HandlerFunc
DocumentationHandler handles serving Markdown documents for help/documentation from directory in the embedded fs.
func FavoriteArticle ¶ added in v0.31.0
func FavoriteArticle() http.HandlerFunc
FavoriteArticle handles adding an article favorite.
func GetSubscriptionActionSuggestions ¶ added in v0.73.0
func GetSubscriptionActionSuggestions() http.HandlerFunc
GetSubscriptionActionSuggestions handles showing a list of subscriptions as suggestions when building a search query.
func GetSubscriptionFilterSuggestions ¶
func GetSubscriptionFilterSuggestions() http.HandlerFunc
GetSubscriptionFilterSuggestions handles showing a list of subscriptions as suggestions when building a search query.
func HandleAbout ¶ added in v0.38.0
func HandleAbout() http.HandlerFunc
func HandleAccountCancel ¶ added in v0.39.0
func HandleAccountCancel() http.HandlerFunc
func HandleAccountIssue ¶ added in v0.39.0
func HandleAccountIssue() http.HandlerFunc
HandleAccountIssue handles showing a page with a message indicating the user needs to contact support, as there is a critical issue with their account blocking access to the service.
func HandleAccountSuccess ¶ added in v0.39.0
func HandleAccountSuccess() http.HandlerFunc
func HandleAddFeedset ¶ added in v0.39.0
func HandleAddFeedset(static embed.FS) http.HandlerFunc
HandleAddFeedset handles adding a feedset as subscriptions.
func HandleAddGroupSubscription ¶ added in v0.39.0
func HandleAddGroupSubscription() http.HandlerFunc
HandleAddGroupSubscription handles adding a new group subscription.
func HandleAddNewFeedSubscription ¶ added in v0.110.0
func HandleAddNewFeedSubscription() http.HandlerFunc
HandleAddNewFeedSubscription handles adding a new feed subscription for a user.
func HandleAddSearchSubscription ¶ added in v0.39.0
func HandleAddSearchSubscription() http.HandlerFunc
HandleAddSearchSubscription handles adding a new search subscription.
func HandleAddSubscription ¶ added in v0.110.0
func HandleAddSubscription() http.HandlerFunc
HandleAddSubscription handles showing a form for adding a new subscription.
func HandleAddSubscriptionToGroup ¶ added in v0.54.0
func HandleAddSubscriptionToGroup() http.HandlerFunc
func HandleAddSubscriptionToSearch ¶ added in v0.54.0
func HandleAddSubscriptionToSearch() http.HandlerFunc
func HandleChangePassword ¶ added in v0.39.0
func HandleChangePassword() http.HandlerFunc
HandleChangePassword handles a change password request from the user.
func HandleChangelog ¶ added in v0.153.0
func HandleChangelog() http.HandlerFunc
func HandleChangelogFeed ¶ added in v0.153.0
func HandleChangelogFeed() http.HandlerFunc
func HandleChooseSubscription ¶ added in v0.143.0
func HandleChooseSubscription() http.HandlerFunc
func HandleComparison ¶ added in v0.95.0
func HandleComparison() http.HandlerFunc
func HandleContact ¶ added in v0.129.0
func HandleContact() http.HandlerFunc
func HandleDeactivateAccount ¶ added in v0.39.0
func HandleDeactivateAccount() http.HandlerFunc
HandleDeactivateAccount handles a user request to deactivate their account. Their subscription in Stripe will be cancelled at the end of the current billing period. They can continue to log in and use the service during the current billing period, after which a scheduled job will delete their account.
func HandleEditSubscription ¶ added in v0.39.0
func HandleEditSubscription() http.HandlerFunc
HandleEditSubscription handles presenting the user with a form for editing a subscription.
func HandleExportSubscriptions ¶ added in v0.39.0
func HandleExportSubscriptions() http.HandlerFunc
HandleExportSubscriptions handles configuring and performing an export of user subscriptions.
func HandleExternalError ¶ added in v0.36.0
func HandleExternalError(err error) http.HandlerFunc
HandleExternalError handles display errors on external pages.
func HandleFavoriteSubscription ¶ added in v0.39.0
func HandleFavoriteSubscription() http.HandlerFunc
HandleFavoriteSubscription handles managing a favorite subscription for a user.
func HandleFeatures ¶ added in v0.101.0
func HandleFeatures() http.HandlerFunc
func HandleFeaturesCollect ¶ added in v0.101.0
func HandleFeaturesCollect() http.HandlerFunc
func HandleFeaturesConsume ¶ added in v0.101.0
func HandleFeaturesConsume() http.HandlerFunc
func HandleFeaturesCurate ¶ added in v0.101.0
func HandleFeaturesCurate() http.HandlerFunc
func HandleFindSimilarArticles ¶ added in v0.39.0
func HandleFindSimilarArticles() http.HandlerFunc
HandleFindSimilarArticles handles finding articles similar to the given article and showing the results.
func HandleForgetMe ¶ added in v0.158.0
func HandleForgetMe() http.HandlerFunc
func HandleGenerateSubscriptionEmail ¶ added in v0.39.0
func HandleGenerateSubscriptionEmail() http.HandlerFunc
func HandleHome ¶ added in v0.37.0
func HandleHome() http.HandlerFunc
HandleHome handles displaying the user's home page.
func HandleImportSubscriptions ¶ added in v0.39.0
func HandleImportSubscriptions() http.HandlerFunc
HandleImportSubscriptions handles assisting the user with importing subscriptions from an external source.
func HandleInternalError ¶ added in v0.36.0
func HandleInternalError(referer string, err error) http.HandlerFunc
HandleInternalError handles display errors on internal pages (pages accessible to logged in users).
func HandleLanding ¶ added in v0.38.0
func HandleLanding() http.HandlerFunc
func HandleListArticles ¶ added in v0.39.0
func HandleListArticles() http.HandlerFunc
HandleListArticles handles fetching articles based on the given page filters and displaying them.
func HandleListArticlesUpdates ¶ added in v0.105.0
func HandleListArticlesUpdates() http.HandlerFunc
HandleListArticlesUpdates handles checking for any updates and notifying the user.
func HandleListFavorites ¶ added in v0.39.0
func HandleListFavorites() http.HandlerFunc
HandleListFavorites handles fetching the favorite subscriptions and articles of a user and showing them in a grid layout.
func HandleListSubscriptions ¶ added in v0.36.0
func HandleListSubscriptions() http.HandlerFunc
HandleListSubscriptions handles displaying a list of subscriptions.
func HandleListSubscriptionsUpdates ¶ added in v0.105.0
func HandleListSubscriptionsUpdates() http.HandlerFunc
HandleListSubscriptionsUpdates handles checking for any updates and notifying the user.
func HandleLogin ¶ added in v0.36.0
func HandleLogin(res http.ResponseWriter, req *http.Request)
HandleLogin handles user login or sign-up requests.
func HandleLoginCallback ¶ added in v0.36.0
func HandleLoginCallback(res http.ResponseWriter, req *http.Request)
HandleLoginCallback handles processing the response from the login provider.
func HandleLoginError ¶ added in v0.36.0
func HandleLoginError(res http.ResponseWriter, req *http.Request)
HandleLoginError handles login errors, including invalid login callback URL, missing parameters, expired password reset links.
func HandleManageAccountSubscription ¶ added in v0.39.0
func HandleManageAccountSubscription() http.HandlerFunc
func HandleMarkSubscription ¶ added in v0.39.0
func HandleMarkSubscription() http.HandlerFunc
HandleMarkSubscription handles marking a subscription as read/unread and updates the UI accordingly.
func HandleMarkSubscriptions ¶ added in v0.39.0
func HandleMarkSubscriptions() http.HandlerFunc
HandleMarkSubscriptions handles marking subscriptions as read/unread.
func HandleNotFound ¶ added in v0.36.0
func HandleNotFound() http.HandlerFunc
HandleNotFound handles showing a page for a 404 response.
func HandlePaddleWebhook ¶ added in v0.143.0
func HandlePaddleWebhook(res http.ResponseWriter, req *http.Request)
HandlePaddleWebhook handles incoming webhooks from paddle.
func HandlePosts ¶ added in v0.39.0
func HandlePosts() http.HandlerFunc
HandlePosts handles showing the posts index or individual posts.
func HandlePostsFeed ¶ added in v0.51.0
func HandlePostsFeed() http.HandlerFunc
HandlePostsFeed handles showing an RSS file for posts.
func HandlePurchaseSubscription ¶ added in v0.143.0
func HandlePurchaseSubscription() http.HandlerFunc
HandlePurchaseSubscription returns a JSON payload consumed by Paddle.js on the client. The actual checkout is opened via Paddle.Checkout.open() in the browser; this endpoint validates the price ID and returns it for client-side use.
func HandlePurchaseSubscriptionSuccess ¶ added in v0.143.0
func HandlePurchaseSubscriptionSuccess() http.HandlerFunc
func HandleRefreshToken ¶ added in v0.104.0
func HandleRefreshToken(res http.ResponseWriter, req *http.Request)
HandleRefreshToken handles refreshing the user's access token (using a refresh token) when it is about to expire.
func HandleRemoveSubscription ¶ added in v0.39.0
func HandleRemoveSubscription() http.HandlerFunc
HandleRemoveSubscription handles removing (unsubscribing) from a subscription.
func HandleReportIssue ¶ added in v0.126.0
func HandleReportIssue() http.HandlerFunc
HandleReportIssue handles presenting a form for the user to submit issues about the app.
func HandleResendWebhook ¶ added in v0.143.0
func HandleResendWebhook(res http.ResponseWriter, req *http.Request)
HandleResendWebhook will handle incoming webhook requests from Resend.
func HandleSaveAccountSettings ¶ added in v0.39.0
func HandleSaveAccountSettings() http.HandlerFunc
HandleSaveAccountSettings handles processing and saving new account settings.
func HandleSaveDisplaySettings ¶ added in v0.39.0
func HandleSaveDisplaySettings() http.HandlerFunc
HandleSaveDisplaySettings handles saving user settings after user submitted changes.
func HandleSaveSubscription ¶ added in v0.39.0
func HandleSaveSubscription() http.HandlerFunc
HandleSaveSubscription handles saving the edits made by a user to a subscription.
func HandleSearchResults ¶ added in v0.39.0
func HandleSearchResults() http.HandlerFunc
HandleSearchResults performs a search with the user input and renders a page with the search results.
func HandleSearchSuggestions ¶ added in v0.39.0
func HandleSearchSuggestions() http.HandlerFunc
HandleSearchSuggestions performs a search with the user input and presents suggestions back to the user.
func HandleSearchUpdates ¶ added in v0.105.0
func HandleSearchUpdates() http.HandlerFunc
HandleSearchUpdates handles checking for any new results for the search request and notifying the user.
func HandleShowAccountSettings ¶ added in v0.39.0
func HandleShowAccountSettings() http.HandlerFunc
HandleShowAccountSettings handles showing the settings related to user accounts.
func HandleShowDisplaySettings ¶ added in v0.39.0
func HandleShowDisplaySettings() http.HandlerFunc
HandleShowDisplaySettings handles showing the settings related to the application display.
func HandleShowSubscriptionsSettings ¶ added in v0.150.0
func HandleShowSubscriptionsSettings() http.HandlerFunc
HandleShowSubscriptionsSettings handles showing the user's subscriptions for bulk management.
func HandleSitemap ¶ added in v0.37.0
HandleSitemap handles requests for sitemap.xml. In the future, it may handle more requests from non natural human clients...
func HandleSubmitContact ¶ added in v0.129.0
func HandleSubmitContact() http.HandlerFunc
func HandleSubmitForgetMe ¶ added in v0.158.0
func HandleSubmitForgetMe() http.HandlerFunc
func HandleSubmitIssue ¶ added in v0.126.0
func HandleSubmitIssue() http.HandlerFunc
HandleSubmitIssue handles processing the user submitted subscription issues form.
func HandleSubscriptionCategories ¶ added in v0.39.0
func HandleSubscriptionCategories() http.HandlerFunc
HandleSubscriptionCategories handles adding and removing categories from a subscription, either when editing or adding.
func HandleSuggestFeeds ¶ added in v0.133.0
func HandleSuggestFeeds() http.HandlerFunc
func HandleSuggestSubscriptionForSearch ¶ added in v0.54.0
func HandleSuggestSubscriptionForSearch() http.HandlerFunc
func HandleUserUnsubscribe ¶ added in v0.87.0
func HandleUserUnsubscribe() http.HandlerFunc
HandleUserUnsubscribe handles requests from users to unsubscribe from promotional emails. It handles both interactive (user manually goes to page) and non-interactive (as per RFC 8058).
func HandleViewArticle ¶ added in v0.39.0
func HandleViewArticle() http.HandlerFunc
HandleViewArticle handles showing an article's content.
func HandleViewer ¶ added in v0.36.0
func HandleViewer() http.HandlerFunc
HandleViewer handles powering the feed viewer page.
func ImageProxy ¶
func ImageProxy(proxyURLBase string) http.HandlerFunc
func ListCategories ¶ added in v0.27.0
func ListCategories() http.HandlerFunc
ListCategories handles returning a list of categories that can be used for filtering subscriptions or articles.
func LoadCachedImage ¶
func LoadCachedImage(res http.ResponseWriter, req *http.Request)
LoadCachedImage handles fetching and displaying an image from one of the image caches.
func Logout ¶
func Logout(res http.ResponseWriter, req *http.Request)
Logout handles logout requests.
func MarkArticle ¶
func MarkArticle() http.HandlerFunc
MarkArticle handles marking an article as read/unread and updates the UI accordingly.
func MarkArticles ¶
func MarkArticles() http.HandlerFunc
MarkArticles handles marking multiple articles as read/unread and updating the UI appropriately.
func PolicyDocsHandler ¶
func PolicyDocsHandler() http.HandlerFunc
PolicyDocsHandler handles serving policy Markdown documents from directory in the embedded fs.
func RenderExternalPage ¶ added in v0.38.0
func RenderExternalPage(content ExternalPage) http.HandlerFunc
RenderExternalPage is a handler that renders a full external page.
func RenderInternalPage ¶ added in v0.38.0
func RenderInternalPage(content InternalPage) http.HandlerFunc
RenderInternalPage is a handler that chooses the appropriate rendering for an internal page (full or partial), based on the request.
func RenderPartial ¶ added in v0.36.0
func RenderPartial(content PartialResponseHandler) http.HandlerFunc
RenderPartial is a handler that renders a partial response.
func ShareArticle ¶ added in v0.34.1
func ShareArticle() http.HandlerFunc
ShareArticle handles sharing an article.
func ShowSettings ¶
func ShowSettings() http.HandlerFunc
ShowSettings handles retrieving and rendering the user settings page.
func StaticFileHandler ¶
func StaticFileHandler(fs http.FileSystem) http.Handler
StaticFileHandler handles serving content from the embedded filesystem containing static assets (i.e., images, etc.).
Types ¶
type About ¶ added in v0.21.0
type About struct {
// contains filtered or unexported fields
}
func (*About) FullResponse ¶ added in v0.38.0
func (p *About) FullResponse(w http.ResponseWriter, r *http.Request)
type AccountIssue ¶ added in v0.39.0
type AccountIssue struct{}
AccountIssue contains data for rendering a page to present the user when there is an issue with their account.
func (*AccountIssue) FullResponse ¶ added in v0.39.0
func (t *AccountIssue) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders the page for the user to choose a subscription plan.
type AddSubscription ¶ added in v0.39.0
type AddSubscription struct {
// contains filtered or unexported fields
}
AddSubscription contains the data for rendering a page for editing a subscription.
func (*AddSubscription) FullResponse ¶ added in v0.39.0
func (h *AddSubscription) FullResponse(res http.ResponseWriter, req *http.Request)
func (*AddSubscription) PartialResponse ¶ added in v0.39.0
func (h *AddSubscription) PartialResponse(res http.ResponseWriter, req *http.Request)
type ArticleContent ¶ added in v0.39.0
type ArticleContent struct {
// contains filtered or unexported fields
}
ArticleContent contains the data to view article content.
func (*ArticleContent) FullResponse ¶ added in v0.39.0
func (t *ArticleContent) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders a full page (headers, footers and content).
func (*ArticleContent) PartialResponse ¶ added in v0.39.0
func (t *ArticleContent) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse renders just the content and performs OOB swaps to update the title (if set) and sidebar/dock.
type Changelog ¶ added in v0.153.0
type Changelog struct {
Releases []templates.Release `toml:"releases"`
// contains filtered or unexported fields
}
func (*Changelog) FullResponse ¶ added in v0.153.0
func (p *Changelog) FullResponse(res http.ResponseWriter, req *http.Request)
func (*Changelog) PartialResponse ¶ added in v0.153.0
func (p *Changelog) PartialResponse(res http.ResponseWriter, req *http.Request)
type ChooseSubscription ¶ added in v0.143.0
type ChooseSubscription struct {
// contains filtered or unexported fields
}
func (*ChooseSubscription) FullResponse ¶ added in v0.143.0
func (t *ChooseSubscription) FullResponse(res http.ResponseWriter, req *http.Request)
type ComparisonPage ¶ added in v0.95.0
type ComparisonPage struct{}
func (*ComparisonPage) FullResponse ¶ added in v0.95.0
func (p *ComparisonPage) FullResponse(res http.ResponseWriter, req *http.Request)
type Contact ¶ added in v0.129.0
type Contact struct{}
func (*Contact) FullResponse ¶ added in v0.129.0
func (p *Contact) FullResponse(res http.ResponseWriter, req *http.Request)
type EditSubscription ¶
type EditSubscription struct {
// contains filtered or unexported fields
}
EditSubscription contains the data for rendering a page for editing a subscription.
func (*EditSubscription) FullResponse ¶ added in v0.39.0
func (p *EditSubscription) FullResponse(res http.ResponseWriter, req *http.Request)
func (*EditSubscription) PartialResponse ¶ added in v0.39.0
func (p *EditSubscription) PartialResponse(res http.ResponseWriter, req *http.Request)
type ExportSubscriptions ¶
type ExportSubscriptions struct {
// contains filtered or unexported fields
}
ExportSubscriptions contains the data for rendering a page for exporting subscriptions.
func (*ExportSubscriptions) FullResponse ¶ added in v0.39.0
func (h *ExportSubscriptions) FullResponse(res http.ResponseWriter, req *http.Request)
func (*ExportSubscriptions) PartialResponse ¶ added in v0.39.0
func (h *ExportSubscriptions) PartialResponse(res http.ResponseWriter, req *http.Request)
type ExternalError ¶ added in v0.36.0
type ExternalError struct {
// contains filtered or unexported fields
}
ExternalError represents errors shown on external (public) pages.
func (*ExternalError) FullResponse ¶ added in v0.36.0
func (p *ExternalError) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders the error on a full page.
type ExternalPage ¶ added in v0.38.0
type ExternalPage interface {
FullResponseHandler
}
ExternalPage is a handler for external pages. External pages only support rendering full responses.
type Favorites ¶ added in v0.39.0
type Favorites struct {
// contains filtered or unexported fields
}
func (*Favorites) FullResponse ¶ added in v0.39.0
func (p *Favorites) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders a full page (headers, footers and list of subscriptions).
func (*Favorites) PartialResponse ¶ added in v0.39.0
func (p *Favorites) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse will either render the list of subscriptions, the controls and update the title/dock/sidebar or, when paginating, just the list of subscriptions.
type Features ¶ added in v0.101.0
type Features struct{}
func (*Features) FullResponse ¶ added in v0.101.0
func (p *Features) FullResponse(res http.ResponseWriter, req *http.Request)
type FeaturesCollect ¶ added in v0.155.0
type FeaturesCollect struct{}
func (*FeaturesCollect) FullResponse ¶ added in v0.155.0
func (p *FeaturesCollect) FullResponse(res http.ResponseWriter, req *http.Request)
type FeaturesConsume ¶ added in v0.155.0
type FeaturesConsume struct{}
func (*FeaturesConsume) FullResponse ¶ added in v0.155.0
func (p *FeaturesConsume) FullResponse(res http.ResponseWriter, req *http.Request)
type FeaturesCurate ¶ added in v0.155.0
type FeaturesCurate struct{}
func (*FeaturesCurate) FullResponse ¶ added in v0.155.0
func (p *FeaturesCurate) FullResponse(res http.ResponseWriter, req *http.Request)
type ForgetMe ¶ added in v0.158.0
type ForgetMe struct{}
func (*ForgetMe) FullResponse ¶ added in v0.158.0
func (p *ForgetMe) FullResponse(res http.ResponseWriter, req *http.Request)
type FullResponseHandler ¶ added in v0.36.0
type FullResponseHandler interface {
FullResponse(w http.ResponseWriter, r *http.Request)
}
FullResponseHandler is a handler that handles full responses.
type Help ¶ added in v0.83.1
type Help struct {
// contains filtered or unexported fields
}
func (*Help) FullResponse ¶ added in v0.83.1
func (p *Help) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders a full page (headers, footers and list of subscriptions).
func (*Help) PartialResponse ¶ added in v0.83.1
func (p *Help) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse will either render the list of subscriptions, the controls and update the title/dock/sidebar or, when paginating, just the list of subscriptions.
type Home ¶
type Home struct {
// contains filtered or unexported fields
}
Home contains data for generating a user home page.
func (*Home) FullResponse ¶ added in v0.37.0
func (p *Home) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders a full page (headers, footers and data).
func (*Home) PartialResponse ¶ added in v0.37.0
func (p *Home) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse will render just the data.
type ImportSubscriptions ¶
type ImportSubscriptions struct {
// contains filtered or unexported fields
}
ImportSubscriptions contains the data for rendering a page for importing subscriptions.
func (*ImportSubscriptions) FullResponse ¶ added in v0.39.0
func (h *ImportSubscriptions) FullResponse(res http.ResponseWriter, req *http.Request)
func (*ImportSubscriptions) PartialResponse ¶ added in v0.39.0
func (h *ImportSubscriptions) PartialResponse(res http.ResponseWriter, req *http.Request)
type ImportSubscriptionsResults ¶ added in v0.39.0
type ImportSubscriptionsResults struct {
// contains filtered or unexported fields
}
func (*ImportSubscriptionsResults) PartialResponse ¶ added in v0.39.0
func (h *ImportSubscriptionsResults) PartialResponse(res http.ResponseWriter, req *http.Request)
type InternalError ¶ added in v0.36.0
type InternalError struct {
// contains filtered or unexported fields
}
InternalError represents errors shown on internal (pages accessible to logged in users) pages.
func (*InternalError) FullResponse ¶ added in v0.36.0
func (p *InternalError) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders the error message on a full page.
func (*InternalError) PartialResponse ¶ added in v0.36.0
func (p *InternalError) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse will render the error in the content area for GET requests, as a notification otherwise.
type InternalPage ¶ added in v0.38.0
type InternalPage interface {
PartialResponseHandler
FullResponseHandler
}
InternalPage is a handler for internal pages. Internal pages support rendering either full or partial responses.
type Landing ¶
type Landing struct {
// contains filtered or unexported fields
}
func (*Landing) FullResponse ¶ added in v0.38.0
func (p *Landing) FullResponse(res http.ResponseWriter, req *http.Request)
type ListArticles ¶
type ListArticles struct {
// contains filtered or unexported fields
}
ListArticles holds data for generating the articles list page.
func (*ListArticles) FullResponse ¶ added in v0.39.0
func (p *ListArticles) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders a full page (headers, footers and list of articles).
func (*ListArticles) PartialResponse ¶ added in v0.39.0
func (p *ListArticles) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse will either render the list of articles, the controls and update the title/dock/sidebar or, when paginating, just the list of articles.
type ListSubscriptions ¶
type ListSubscriptions struct {
// contains filtered or unexported fields
}
ListSubscriptions holds data for generating the subscriptions list page.
func (*ListSubscriptions) FullResponse ¶ added in v0.36.0
func (p *ListSubscriptions) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders a full page (headers, footers and list of subscriptions).
func (*ListSubscriptions) PartialResponse ¶ added in v0.36.0
func (p *ListSubscriptions) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse will either render the list of subscriptions, the controls and update the title/dock/sidebar or, when paginating, just the list of subscriptions.
type Login ¶
type Login struct {
// contains filtered or unexported fields
}
func (*Login) FullResponse ¶ added in v0.36.0
func (p *Login) FullResponse(w http.ResponseWriter, r *http.Request)
func (*Login) PartialResponse ¶ added in v0.36.0
func (p *Login) PartialResponse(w http.ResponseWriter, r *http.Request)
type Modal ¶ added in v0.39.0
type Modal struct {
// contains filtered or unexported fields
}
func (*Modal) PartialResponse ¶ added in v0.39.0
func (m *Modal) PartialResponse(res http.ResponseWriter, req *http.Request)
type NotFoundPage ¶ added in v0.36.0
type NotFoundPage struct {
// contains filtered or unexported fields
}
func (*NotFoundPage) FullResponse ¶ added in v0.36.0
func (p *NotFoundPage) FullResponse(w http.ResponseWriter, r *http.Request)
func (*NotFoundPage) PartialResponse ¶ added in v0.36.0
func (p *NotFoundPage) PartialResponse(w http.ResponseWriter, r *http.Request)
type Notification ¶ added in v0.39.0
type Notification struct {
// contains filtered or unexported fields
}
Notification contains a message that will be displayed to the user as a notification.
func (*Notification) PartialResponse ¶ added in v0.39.0
func (n *Notification) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse renders the notification into the notification container on the page as an OOB response.
type PageIssue ¶ added in v0.39.0
type PageIssue struct {
// contains filtered or unexported fields
}
func (*PageIssue) FullResponse ¶ added in v0.39.0
func (t *PageIssue) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders a full page (headers, footers and content).
func (*PageIssue) PartialResponse ¶ added in v0.39.0
func (t *PageIssue) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse renders just the content and performs OOB swaps to update the title (if set) and sidebar/dock.
type PartialResponseHandler ¶ added in v0.36.0
type PartialResponseHandler interface {
PartialResponse(w http.ResponseWriter, r *http.Request)
}
PartialResponseHandler is a handler that handles partial responses.
type PartialTemplate ¶ added in v0.39.0
type PartialTemplate struct {
// contains filtered or unexported fields
}
PartialTemplate is a template that only supports being rendered in a partial response.
func (*PartialTemplate) PartialResponse ¶ added in v0.39.0
func (t *PartialTemplate) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse renders the template.
type Post ¶ added in v0.39.0
type Post struct {
*models.MarkdownFile
}
Post is an individual post.
func (*Post) FullResponse ¶ added in v0.39.0
func (p *Post) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders an individual post.
type PostsIndex ¶ added in v0.39.0
type PostsIndex struct {
// contains filtered or unexported fields
}
PostsIndex is the index of all posts.
func (*PostsIndex) FullResponse ¶ added in v0.39.0
func (p *PostsIndex) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders the posts index.
type PurchaseSubscriptionSuccess ¶ added in v0.143.0
type PurchaseSubscriptionSuccess struct {
// contains filtered or unexported fields
}
func (*PurchaseSubscriptionSuccess) FullResponse ¶ added in v0.143.0
func (t *PurchaseSubscriptionSuccess) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders the page for the user to choose a subscription plan.
type SearchResults ¶ added in v0.39.0
type SearchResults struct {
// contains filtered or unexported fields
}
func (*SearchResults) FullResponse ¶ added in v0.39.0
func (h *SearchResults) FullResponse(res http.ResponseWriter, req *http.Request)
func (*SearchResults) PartialResponse ¶ added in v0.39.0
func (h *SearchResults) PartialResponse(res http.ResponseWriter, req *http.Request)
type SearchSuggestions ¶ added in v0.39.0
type SearchSuggestions struct {
// contains filtered or unexported fields
}
func (*SearchSuggestions) PartialResponse ¶ added in v0.39.0
func (h *SearchSuggestions) PartialResponse(res http.ResponseWriter, req *http.Request)
type SimilarArticles ¶ added in v0.39.0
type SimilarArticles struct {
// contains filtered or unexported fields
}
func (*SimilarArticles) FullResponse ¶ added in v0.39.0
func (h *SimilarArticles) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders a full page (headers, footers and list of subscriptions).
func (*SimilarArticles) PartialResponse ¶ added in v0.39.0
func (h *SimilarArticles) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse will either render the list of subscriptions, the controls and update the title/dock/sidebar or, when paginating, just the list of subscriptions.
type Unsubscribe ¶ added in v0.87.0
type Unsubscribe struct {
Token string
}
Unsubscribe represents an unsubscribe request.
func (*Unsubscribe) FullResponse ¶ added in v0.87.0
func (p *Unsubscribe) FullResponse(res http.ResponseWriter, req *http.Request)
type UnsubscribeResult ¶ added in v0.87.0
type UnsubscribeResult struct {
Msg *models.UserMessage
}
UnsubscribeResult represents an unsubscribe result.
func (*UnsubscribeResult) FullResponse ¶ added in v0.87.0
func (p *UnsubscribeResult) FullResponse(res http.ResponseWriter, req *http.Request)
func (*UnsubscribeResult) PartialResponse ¶ added in v0.87.0
func (p *UnsubscribeResult) PartialResponse(res http.ResponseWriter, req *http.Request)
type UserSettings ¶ added in v0.39.0
type UserSettings struct{}
UserSettings contains the data for rendering the user settings page.
func (*UserSettings) FullResponse ¶ added in v0.39.0
func (t *UserSettings) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders a full page (headers, footers and content).
func (*UserSettings) PartialResponse ¶ added in v0.39.0
func (t *UserSettings) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse renders just the content and performs OOB swaps to update the title (if set) and sidebar/dock.
type Viewer ¶ added in v0.21.0
type Viewer struct {
// contains filtered or unexported fields
}
func (*Viewer) FullResponse ¶ added in v0.36.0
func (p *Viewer) FullResponse(res http.ResponseWriter, req *http.Request)
FullResponse renders the full viewer page.
type ViewerError ¶ added in v0.36.0
type ViewerError struct {
// contains filtered or unexported fields
}
ViewerError holds an error when the viewer failed to parse a url.
func (*ViewerError) PartialResponse ¶ added in v0.36.0
func (p *ViewerError) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse renders an error as the viewer response.
type ViewerResponse ¶ added in v0.38.0
type ViewerResponse struct {
// contains filtered or unexported fields
}
func (*ViewerResponse) PartialResponse ¶ added in v0.38.0
func (p *ViewerResponse) PartialResponse(res http.ResponseWriter, req *http.Request)
PartialResponse returns no content for the viewer as partials are unsupported.
Source Files
¶
- about.go
- account.go
- actions.go
- articles.go
- cache.go
- categories.go
- changelog.go
- compare.go
- contact.go
- error.go
- favorites.go
- features.go
- forget-me.go
- handlers.go
- help.go
- home.go
- images.go
- issues.go
- landing.go
- login.go
- logout.go
- notfound.go
- notification.go
- paddle.go
- policies.go
- posts.go
- render.go
- resend.go
- search.go
- sitemap.go
- subscriptions.go
- user.go
- viewer.go