Documentation ¶
Overview ¶
Package ui implements handlers to render to user interface.
Index ¶
- type Controller
- func (c *Controller) AboutPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) AddSubscription(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) AppIcon(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) Bookmarklet(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) CheckLogin(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ChooseSubscription(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) CreateCategory(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) CreateUser(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) EditCategory(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) EditFeed(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) EditUser(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) Export(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) Favicon(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) FetchContent(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) FlushHistory(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ImageProxy(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) Import(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) Javascript(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) Logout(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) MarkAllAsRead(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) OAuth2Callback(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) OAuth2Redirect(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) OAuth2Unlink(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) RefreshAllFeeds(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) RefreshFeed(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) RemoveCategory(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) RemoveFeed(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) RemoveSession(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) RemoveUser(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) SaveCategory(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) SaveEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) SaveUser(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowCategories(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowCategoryEntries(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowCategoryEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowFeedEntries(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowFeedEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowFeedsPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowHistoryPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowIcon(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowIntegrations(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowLoginPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowReadEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowSessions(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowSettings(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowStarredEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowStarredPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowUnreadEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowUnreadPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ShowUsers(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) Stylesheet(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) SubmitSubscription(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) ToggleBookmark(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) UpdateCategory(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) UpdateEntriesStatus(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) UpdateFeed(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) UpdateIntegration(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) UpdateSettings(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) UpdateUser(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) UploadOPML(ctx *handler.Context, request *handler.Request, response *handler.Response)
- func (c *Controller) WebManifest(ctx *handler.Context, request *handler.Request, response *handler.Response)
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, opmlHandler *opml.Handler) *Controller
NewController returns a new Controller.
func (*Controller) AboutPage ¶
func (c *Controller) AboutPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
AboutPage shows the about page.
func (*Controller) AddSubscription ¶
func (c *Controller) AddSubscription(ctx *handler.Context, request *handler.Request, response *handler.Response)
AddSubscription shows the form to add a new feed.
func (*Controller) AppIcon ¶
func (c *Controller) AppIcon(ctx *handler.Context, request *handler.Request, response *handler.Response)
AppIcon returns application icons.
func (*Controller) Bookmarklet ¶
func (c *Controller) Bookmarklet(ctx *handler.Context, request *handler.Request, response *handler.Response)
Bookmarklet prefill the form to add a subscription from the URL provided by the bookmarklet.
func (*Controller) CheckLogin ¶
func (c *Controller) CheckLogin(ctx *handler.Context, request *handler.Request, response *handler.Response)
CheckLogin validates the username/password and redirects the user to the unread page.
func (*Controller) ChooseSubscription ¶
func (c *Controller) ChooseSubscription(ctx *handler.Context, request *handler.Request, response *handler.Response)
ChooseSubscription shows a page to choose a subscription.
func (*Controller) CreateCategory ¶
func (c *Controller) CreateCategory(ctx *handler.Context, request *handler.Request, response *handler.Response)
CreateCategory shows the form to create a new category.
func (*Controller) CreateUser ¶
func (c *Controller) CreateUser(ctx *handler.Context, request *handler.Request, response *handler.Response)
CreateUser shows the user creation form.
func (*Controller) EditCategory ¶
func (c *Controller) EditCategory(ctx *handler.Context, request *handler.Request, response *handler.Response)
EditCategory shows the form to modify a category.
func (*Controller) EditFeed ¶
func (c *Controller) EditFeed(ctx *handler.Context, request *handler.Request, response *handler.Response)
EditFeed shows the form to modify a subscription.
func (*Controller) EditUser ¶
func (c *Controller) EditUser(ctx *handler.Context, request *handler.Request, response *handler.Response)
EditUser shows the form to edit a user.
func (*Controller) Export ¶
func (c *Controller) Export(ctx *handler.Context, request *handler.Request, response *handler.Response)
Export generates the OPML file.
func (*Controller) Favicon ¶
func (c *Controller) Favicon(ctx *handler.Context, request *handler.Request, response *handler.Response)
Favicon renders the application favicon.
func (*Controller) FetchContent ¶
func (c *Controller) FetchContent(ctx *handler.Context, request *handler.Request, response *handler.Response)
FetchContent downloads the original HTML page and returns relevant contents.
func (*Controller) FlushHistory ¶
func (c *Controller) FlushHistory(ctx *handler.Context, request *handler.Request, response *handler.Response)
FlushHistory changes all "read" items to "removed".
func (*Controller) ImageProxy ¶
func (c *Controller) ImageProxy(ctx *handler.Context, request *handler.Request, response *handler.Response)
ImageProxy fetch an image from a remote server and sent it back to the browser.
func (*Controller) Import ¶
func (c *Controller) Import(ctx *handler.Context, request *handler.Request, response *handler.Response)
Import shows the import form.
func (*Controller) Javascript ¶
func (c *Controller) Javascript(ctx *handler.Context, request *handler.Request, response *handler.Response)
Javascript renders application client side code.
func (*Controller) Logout ¶
func (c *Controller) Logout(ctx *handler.Context, request *handler.Request, response *handler.Response)
Logout destroy the session and redirects the user to the login page.
func (*Controller) MarkAllAsRead ¶
func (c *Controller) MarkAllAsRead(ctx *handler.Context, request *handler.Request, response *handler.Response)
MarkAllAsRead marks all unread entries as read.
func (*Controller) OAuth2Callback ¶
func (c *Controller) OAuth2Callback(ctx *handler.Context, request *handler.Request, response *handler.Response)
OAuth2Callback receives the authorization code and create a new session.
func (*Controller) OAuth2Redirect ¶
func (c *Controller) OAuth2Redirect(ctx *handler.Context, request *handler.Request, response *handler.Response)
OAuth2Redirect redirects the user to the consent page to ask for permission.
func (*Controller) OAuth2Unlink ¶
func (c *Controller) OAuth2Unlink(ctx *handler.Context, request *handler.Request, response *handler.Response)
OAuth2Unlink unlink an account from the external provider.
func (*Controller) RefreshAllFeeds ¶
func (c *Controller) RefreshAllFeeds(ctx *handler.Context, request *handler.Request, response *handler.Response)
RefreshAllFeeds refresh all feeds in the background for the current user.
func (*Controller) RefreshFeed ¶
func (c *Controller) RefreshFeed(ctx *handler.Context, request *handler.Request, response *handler.Response)
RefreshFeed refresh a subscription and redirect to the feed entries page.
func (*Controller) RemoveCategory ¶
func (c *Controller) RemoveCategory(ctx *handler.Context, request *handler.Request, response *handler.Response)
RemoveCategory delete a category from the database.
func (*Controller) RemoveFeed ¶
func (c *Controller) RemoveFeed(ctx *handler.Context, request *handler.Request, response *handler.Response)
RemoveFeed delete a subscription from the database and redirect to the list of feeds page.
func (*Controller) RemoveSession ¶
func (c *Controller) RemoveSession(ctx *handler.Context, request *handler.Request, response *handler.Response)
RemoveSession remove a user session.
func (*Controller) RemoveUser ¶
func (c *Controller) RemoveUser(ctx *handler.Context, request *handler.Request, response *handler.Response)
RemoveUser deletes a user from the database.
func (*Controller) SaveCategory ¶
func (c *Controller) SaveCategory(ctx *handler.Context, request *handler.Request, response *handler.Response)
SaveCategory validate and save the new category into the database.
func (*Controller) SaveEntry ¶
func (c *Controller) SaveEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
SaveEntry send the link to external services.
func (*Controller) SaveUser ¶
func (c *Controller) SaveUser(ctx *handler.Context, request *handler.Request, response *handler.Response)
SaveUser validate and save the new user into the database.
func (*Controller) ShowCategories ¶
func (c *Controller) ShowCategories(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowCategories shows the page with all categories.
func (*Controller) ShowCategoryEntries ¶
func (c *Controller) ShowCategoryEntries(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowCategoryEntries shows all entries for the given category.
func (*Controller) ShowCategoryEntry ¶
func (c *Controller) ShowCategoryEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowCategoryEntry shows a single feed entry in "category" mode.
func (*Controller) ShowFeedEntries ¶
func (c *Controller) ShowFeedEntries(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowFeedEntries shows all entries for the given feed.
func (*Controller) ShowFeedEntry ¶
func (c *Controller) ShowFeedEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowFeedEntry shows a single feed entry in "feed" mode.
func (*Controller) ShowFeedsPage ¶
func (c *Controller) ShowFeedsPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowFeedsPage shows the page with all subscriptions.
func (*Controller) ShowHistoryPage ¶
func (c *Controller) ShowHistoryPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowHistoryPage renders the page with all read entries.
func (*Controller) ShowIcon ¶
func (c *Controller) ShowIcon(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowIcon shows the feed icon.
func (*Controller) ShowIntegrations ¶
func (c *Controller) ShowIntegrations(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowIntegrations renders the page with all external integrations.
func (*Controller) ShowLoginPage ¶
func (c *Controller) ShowLoginPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowLoginPage shows the login form.
func (*Controller) ShowReadEntry ¶
func (c *Controller) ShowReadEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowReadEntry shows a single feed entry in "history" mode.
func (*Controller) ShowSessions ¶
func (c *Controller) ShowSessions(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowSessions shows the list of active user sessions.
func (*Controller) ShowSettings ¶
func (c *Controller) ShowSettings(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowSettings shows the settings page.
func (*Controller) ShowStarredEntry ¶
func (c *Controller) ShowStarredEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowStarredEntry shows a single feed entry in "starred" mode.
func (*Controller) ShowStarredPage ¶
func (c *Controller) ShowStarredPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowStarredPage renders the page with all starred entries.
func (*Controller) ShowUnreadEntry ¶
func (c *Controller) ShowUnreadEntry(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowUnreadEntry shows a single feed entry in "unread" mode.
func (*Controller) ShowUnreadPage ¶
func (c *Controller) ShowUnreadPage(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowUnreadPage render the page with all unread entries.
func (*Controller) ShowUsers ¶
func (c *Controller) ShowUsers(ctx *handler.Context, request *handler.Request, response *handler.Response)
ShowUsers shows the list of users.
func (*Controller) Stylesheet ¶
func (c *Controller) Stylesheet(ctx *handler.Context, request *handler.Request, response *handler.Response)
Stylesheet renders the CSS.
func (*Controller) SubmitSubscription ¶
func (c *Controller) SubmitSubscription(ctx *handler.Context, request *handler.Request, response *handler.Response)
SubmitSubscription try to find a feed from the URL provided by the user.
func (*Controller) ToggleBookmark ¶
func (c *Controller) ToggleBookmark(ctx *handler.Context, request *handler.Request, response *handler.Response)
ToggleBookmark handles Ajax request to toggle bookmark value.
func (*Controller) UpdateCategory ¶
func (c *Controller) UpdateCategory(ctx *handler.Context, request *handler.Request, response *handler.Response)
UpdateCategory validate and update a category.
func (*Controller) UpdateEntriesStatus ¶
func (c *Controller) UpdateEntriesStatus(ctx *handler.Context, request *handler.Request, response *handler.Response)
UpdateEntriesStatus handles Ajax request to update the status for a list of entries.
func (*Controller) UpdateFeed ¶
func (c *Controller) UpdateFeed(ctx *handler.Context, request *handler.Request, response *handler.Response)
UpdateFeed update a subscription and redirect to the feed entries page.
func (*Controller) UpdateIntegration ¶
func (c *Controller) UpdateIntegration(ctx *handler.Context, request *handler.Request, response *handler.Response)
UpdateIntegration updates integration settings.
func (*Controller) UpdateSettings ¶
func (c *Controller) UpdateSettings(ctx *handler.Context, request *handler.Request, response *handler.Response)
UpdateSettings update the settings.
func (*Controller) UpdateUser ¶
func (c *Controller) UpdateUser(ctx *handler.Context, request *handler.Request, response *handler.Response)
UpdateUser validate and update a user.
func (*Controller) UploadOPML ¶
func (c *Controller) UploadOPML(ctx *handler.Context, request *handler.Request, response *handler.Response)
UploadOPML handles OPML file importation.
func (*Controller) WebManifest ¶
func (c *Controller) WebManifest(ctx *handler.Context, request *handler.Request, response *handler.Response)
WebManifest renders web manifest file.