Documentation ¶
Overview ¶
Package ui implements handlers to render to user interface.
Index ¶
- type Controller
- func (c *Controller) About(w http.ResponseWriter, r *http.Request)
- func (c *Controller) AddSubscription(w http.ResponseWriter, r *http.Request)
- func (c *Controller) AppIcon(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Bookmarklet(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CategoryEntries(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CategoryList(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CheckLogin(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ChooseSubscription(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CreateCategory(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CreateUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) EditCategory(w http.ResponseWriter, r *http.Request)
- func (c *Controller) EditFeed(w http.ResponseWriter, r *http.Request)
- func (c *Controller) EditUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Export(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Favicon(w http.ResponseWriter, r *http.Request)
- func (c *Controller) FetchContent(w http.ResponseWriter, r *http.Request)
- func (c *Controller) FlushHistory(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ImageProxy(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Import(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Javascript(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Logout(w http.ResponseWriter, r *http.Request)
- func (c *Controller) MarkAllAsRead(w http.ResponseWriter, r *http.Request)
- func (c *Controller) OAuth2Callback(w http.ResponseWriter, r *http.Request)
- func (c *Controller) OAuth2Redirect(w http.ResponseWriter, r *http.Request)
- func (c *Controller) OAuth2Unlink(w http.ResponseWriter, r *http.Request)
- func (c *Controller) PocketAuthorize(w http.ResponseWriter, r *http.Request)
- func (c *Controller) PocketCallback(w http.ResponseWriter, r *http.Request)
- func (c *Controller) RefreshAllFeeds(w http.ResponseWriter, r *http.Request)
- func (c *Controller) RefreshFeed(w http.ResponseWriter, r *http.Request)
- func (c *Controller) RemoveCategory(w http.ResponseWriter, r *http.Request)
- func (c *Controller) RemoveFeed(w http.ResponseWriter, r *http.Request)
- func (c *Controller) RemoveSession(w http.ResponseWriter, r *http.Request)
- func (c *Controller) RemoveUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SaveCategory(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SaveEntry(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SaveUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowCategoryEntry(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowFeedEntries(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowFeedEntry(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowFeedsPage(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowHistoryPage(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowIcon(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowIntegrations(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowLoginPage(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowReadEntry(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowSearchEntries(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowSearchEntry(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowSessions(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowSettings(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowStarredEntry(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowStarredPage(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowUnreadEntry(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowUnreadPage(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ShowUsers(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Stylesheet(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SubmitSubscription(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ToggleBookmark(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UpdateCategory(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UpdateEntriesStatus(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UpdateFeed(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UpdateIntegration(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UpdateSettings(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UpdateUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UploadOPML(w http.ResponseWriter, r *http.Request)
- func (c *Controller) WebManifest(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller contains all HTTP handlers for the user interface.
func NewController ¶
func NewController(cfg *config.Config, store *storage.Storage, pool *scheduler.WorkerPool, feedHandler *feed.Handler, tpl *template.Engine, translator *locale.Translator, router *mux.Router) *Controller
NewController returns a new Controller.
func (*Controller) About ¶
func (c *Controller) About(w http.ResponseWriter, r *http.Request)
About shows the about page.
func (*Controller) AddSubscription ¶
func (c *Controller) AddSubscription(w http.ResponseWriter, r *http.Request)
AddSubscription shows the form to add a new feed.
func (*Controller) AppIcon ¶
func (c *Controller) AppIcon(w http.ResponseWriter, r *http.Request)
AppIcon renders application icons.
func (*Controller) Bookmarklet ¶
func (c *Controller) Bookmarklet(w http.ResponseWriter, r *http.Request)
Bookmarklet prefill the form to add a subscription from the URL provided by the bookmarklet.
func (*Controller) CategoryEntries ¶
func (c *Controller) CategoryEntries(w http.ResponseWriter, r *http.Request)
CategoryEntries shows all entries for the given category.
func (*Controller) CategoryList ¶
func (c *Controller) CategoryList(w http.ResponseWriter, r *http.Request)
CategoryList shows the page with all categories.
func (*Controller) CheckLogin ¶
func (c *Controller) CheckLogin(w http.ResponseWriter, r *http.Request)
CheckLogin validates the username/password and redirects the user to the unread page.
func (*Controller) ChooseSubscription ¶
func (c *Controller) ChooseSubscription(w http.ResponseWriter, r *http.Request)
ChooseSubscription shows a page to choose a subscription.
func (*Controller) CreateCategory ¶
func (c *Controller) CreateCategory(w http.ResponseWriter, r *http.Request)
CreateCategory shows the form to create a new category.
func (*Controller) CreateUser ¶
func (c *Controller) CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser shows the user creation form.
func (*Controller) EditCategory ¶
func (c *Controller) EditCategory(w http.ResponseWriter, r *http.Request)
EditCategory shows the form to modify a category.
func (*Controller) EditFeed ¶
func (c *Controller) EditFeed(w http.ResponseWriter, r *http.Request)
EditFeed shows the form to modify a subscription.
func (*Controller) EditUser ¶
func (c *Controller) EditUser(w http.ResponseWriter, r *http.Request)
EditUser shows the form to edit a user.
func (*Controller) Export ¶
func (c *Controller) Export(w http.ResponseWriter, r *http.Request)
Export generates the OPML file.
func (*Controller) Favicon ¶
func (c *Controller) Favicon(w http.ResponseWriter, r *http.Request)
Favicon renders the application favicon.
func (*Controller) FetchContent ¶
func (c *Controller) FetchContent(w http.ResponseWriter, r *http.Request)
FetchContent downloads the original HTML page and returns relevant contents.
func (*Controller) FlushHistory ¶
func (c *Controller) FlushHistory(w http.ResponseWriter, r *http.Request)
FlushHistory changes all "read" items to "removed".
func (*Controller) ImageProxy ¶
func (c *Controller) ImageProxy(w http.ResponseWriter, r *http.Request)
ImageProxy fetch an image from a remote server and sent it back to the browser.
func (*Controller) Import ¶
func (c *Controller) Import(w http.ResponseWriter, r *http.Request)
Import shows the import form.
func (*Controller) Javascript ¶
func (c *Controller) Javascript(w http.ResponseWriter, r *http.Request)
Javascript renders application client side code.
func (*Controller) Logout ¶
func (c *Controller) Logout(w http.ResponseWriter, r *http.Request)
Logout destroy the session and redirects the user to the login page.
func (*Controller) MarkAllAsRead ¶
func (c *Controller) MarkAllAsRead(w http.ResponseWriter, r *http.Request)
MarkAllAsRead marks all unread entries as read.
func (*Controller) OAuth2Callback ¶
func (c *Controller) OAuth2Callback(w http.ResponseWriter, r *http.Request)
OAuth2Callback receives the authorization code and create a new session.
func (*Controller) OAuth2Redirect ¶
func (c *Controller) OAuth2Redirect(w http.ResponseWriter, r *http.Request)
OAuth2Redirect redirects the user to the consent page to ask for permission.
func (*Controller) OAuth2Unlink ¶
func (c *Controller) OAuth2Unlink(w http.ResponseWriter, r *http.Request)
OAuth2Unlink unlink an account from the external provider.
func (*Controller) PocketAuthorize ¶
func (c *Controller) PocketAuthorize(w http.ResponseWriter, r *http.Request)
PocketAuthorize redirects the end-user to Pocket website to authorize the application.
func (*Controller) PocketCallback ¶
func (c *Controller) PocketCallback(w http.ResponseWriter, r *http.Request)
PocketCallback saves the personal access token after the authorization step.
func (*Controller) RefreshAllFeeds ¶
func (c *Controller) RefreshAllFeeds(w http.ResponseWriter, r *http.Request)
RefreshAllFeeds refresh all feeds in the background for the current user.
func (*Controller) RefreshFeed ¶
func (c *Controller) RefreshFeed(w http.ResponseWriter, r *http.Request)
RefreshFeed refresh a subscription and redirect to the feed entries page.
func (*Controller) RemoveCategory ¶
func (c *Controller) RemoveCategory(w http.ResponseWriter, r *http.Request)
RemoveCategory deletes a category from the database.
func (*Controller) RemoveFeed ¶
func (c *Controller) RemoveFeed(w http.ResponseWriter, r *http.Request)
RemoveFeed deletes a subscription from the database and redirect to the list of feeds page.
func (*Controller) RemoveSession ¶
func (c *Controller) RemoveSession(w http.ResponseWriter, r *http.Request)
RemoveSession remove a user session.
func (*Controller) RemoveUser ¶
func (c *Controller) RemoveUser(w http.ResponseWriter, r *http.Request)
RemoveUser deletes a user from the database.
func (*Controller) SaveCategory ¶
func (c *Controller) SaveCategory(w http.ResponseWriter, r *http.Request)
SaveCategory validate and save the new category into the database.
func (*Controller) SaveEntry ¶
func (c *Controller) SaveEntry(w http.ResponseWriter, r *http.Request)
SaveEntry send the link to external services.
func (*Controller) SaveUser ¶
func (c *Controller) SaveUser(w http.ResponseWriter, r *http.Request)
SaveUser validate and save the new user into the database.
func (*Controller) ShowCategoryEntry ¶
func (c *Controller) ShowCategoryEntry(w http.ResponseWriter, r *http.Request)
ShowCategoryEntry shows a single feed entry in "category" mode.
func (*Controller) ShowFeedEntries ¶
func (c *Controller) ShowFeedEntries(w http.ResponseWriter, r *http.Request)
ShowFeedEntries shows all entries for the given feed.
func (*Controller) ShowFeedEntry ¶
func (c *Controller) ShowFeedEntry(w http.ResponseWriter, r *http.Request)
ShowFeedEntry shows a single feed entry in "feed" mode.
func (*Controller) ShowFeedsPage ¶
func (c *Controller) ShowFeedsPage(w http.ResponseWriter, r *http.Request)
ShowFeedsPage shows the page with all subscriptions.
func (*Controller) ShowHistoryPage ¶
func (c *Controller) ShowHistoryPage(w http.ResponseWriter, r *http.Request)
ShowHistoryPage renders the page with all read entries.
func (*Controller) ShowIcon ¶
func (c *Controller) ShowIcon(w http.ResponseWriter, r *http.Request)
ShowIcon shows the feed icon.
func (*Controller) ShowIntegrations ¶
func (c *Controller) ShowIntegrations(w http.ResponseWriter, r *http.Request)
ShowIntegrations renders the page with all external integrations.
func (*Controller) ShowLoginPage ¶
func (c *Controller) ShowLoginPage(w http.ResponseWriter, r *http.Request)
ShowLoginPage shows the login form.
func (*Controller) ShowReadEntry ¶
func (c *Controller) ShowReadEntry(w http.ResponseWriter, r *http.Request)
ShowReadEntry shows a single feed entry in "history" mode.
func (*Controller) ShowSearchEntries ¶
func (c *Controller) ShowSearchEntries(w http.ResponseWriter, r *http.Request)
ShowSearchEntries shows all entries for the given feed.
func (*Controller) ShowSearchEntry ¶
func (c *Controller) ShowSearchEntry(w http.ResponseWriter, r *http.Request)
ShowSearchEntry shows a single entry in "search" mode.
func (*Controller) ShowSessions ¶
func (c *Controller) ShowSessions(w http.ResponseWriter, r *http.Request)
ShowSessions shows the list of active user sessions.
func (*Controller) ShowSettings ¶
func (c *Controller) ShowSettings(w http.ResponseWriter, r *http.Request)
ShowSettings shows the settings page.
func (*Controller) ShowStarredEntry ¶
func (c *Controller) ShowStarredEntry(w http.ResponseWriter, r *http.Request)
ShowStarredEntry shows a single feed entry in "starred" mode.
func (*Controller) ShowStarredPage ¶
func (c *Controller) ShowStarredPage(w http.ResponseWriter, r *http.Request)
ShowStarredPage renders the page with all starred entries.
func (*Controller) ShowUnreadEntry ¶
func (c *Controller) ShowUnreadEntry(w http.ResponseWriter, r *http.Request)
ShowUnreadEntry shows a single feed entry in "unread" mode.
func (*Controller) ShowUnreadPage ¶
func (c *Controller) ShowUnreadPage(w http.ResponseWriter, r *http.Request)
ShowUnreadPage render the page with all unread entries.
func (*Controller) ShowUsers ¶
func (c *Controller) ShowUsers(w http.ResponseWriter, r *http.Request)
ShowUsers renders the list of users.
func (*Controller) Stylesheet ¶
func (c *Controller) Stylesheet(w http.ResponseWriter, r *http.Request)
Stylesheet renders the CSS.
func (*Controller) SubmitSubscription ¶
func (c *Controller) SubmitSubscription(w http.ResponseWriter, r *http.Request)
SubmitSubscription try to find a feed from the URL provided by the user.
func (*Controller) ToggleBookmark ¶
func (c *Controller) ToggleBookmark(w http.ResponseWriter, r *http.Request)
ToggleBookmark handles Ajax request to toggle bookmark value.
func (*Controller) UpdateCategory ¶
func (c *Controller) UpdateCategory(w http.ResponseWriter, r *http.Request)
UpdateCategory validates and updates a category.
func (*Controller) UpdateEntriesStatus ¶
func (c *Controller) UpdateEntriesStatus(w http.ResponseWriter, r *http.Request)
UpdateEntriesStatus updates the status for a list of entries.
func (*Controller) UpdateFeed ¶
func (c *Controller) UpdateFeed(w http.ResponseWriter, r *http.Request)
UpdateFeed update a subscription and redirect to the feed entries page.
func (*Controller) UpdateIntegration ¶
func (c *Controller) UpdateIntegration(w http.ResponseWriter, r *http.Request)
UpdateIntegration updates integration settings.
func (*Controller) UpdateSettings ¶
func (c *Controller) UpdateSettings(w http.ResponseWriter, r *http.Request)
UpdateSettings update the settings.
func (*Controller) UpdateUser ¶
func (c *Controller) UpdateUser(w http.ResponseWriter, r *http.Request)
UpdateUser validate and update a user.
func (*Controller) UploadOPML ¶
func (c *Controller) UploadOPML(w http.ResponseWriter, r *http.Request)
UploadOPML handles OPML file importation.
func (*Controller) WebManifest ¶
func (c *Controller) WebManifest(w http.ResponseWriter, r *http.Request)
WebManifest renders web manifest file.
Source Files ¶
- about.go
- bookmark_entries.go
- category_create.go
- category_edit.go
- category_entries.go
- category_list.go
- category_remove.go
- category_save.go
- category_update.go
- controller.go
- doc.go
- entry_bookmark.go
- entry_category.go
- entry_feed.go
- entry_read.go
- entry_save.go
- entry_scraper.go
- entry_search.go
- entry_toggle_bookmark.go
- entry_unread.go
- entry_update_status.go
- feed_edit.go
- feed_entries.go
- feed_icon.go
- feed_list.go
- feed_refresh.go
- feed_remove.go
- feed_update.go
- history_entries.go
- history_flush.go
- integration_pocket.go
- integration_show.go
- integration_update.go
- login_check.go
- login_show.go
- logout.go
- oauth2.go
- oauth2_callback.go
- oauth2_redirect.go
- oauth2_unlink.go
- opml_export.go
- opml_import.go
- opml_upload.go
- pagination.go
- payload.go
- proxy.go
- search_entries.go
- session_list.go
- session_remove.go
- settings_show.go
- settings_update.go
- static_app_icon.go
- static_favicon.go
- static_javascript.go
- static_manifest.go
- static_stylesheet.go
- subscription_add.go
- subscription_bookmarklet.go
- subscription_choose.go
- subscription_submit.go
- unread_entries.go
- unread_mark_all_read.go
- user_create.go
- user_edit.go
- user_list.go
- user_remove.go
- user_save.go
- user_update.go