web

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2025 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchGithubUserID added in v0.5.0

func FetchGithubUserID(client *http.Client) (string, error)

func FetchGoogleUserID added in v0.5.0

func FetchGoogleUserID(client *http.Client) (string, error)

func HandleAccountDeleteForm added in v0.4.0

func HandleAccountDeleteForm(repo *repository.Repository) http.Handler

func HandleAccountList added in v0.4.0

func HandleAccountList(repo *repository.Repository) http.Handler

func HandleBlogCreateForm added in v0.4.0

func HandleBlogCreateForm(repo *repository.Repository, find *finder.Finder, syncService *service.SyncService) http.Handler

func HandleBlogDeleteForm added in v0.4.0

func HandleBlogDeleteForm(repo *repository.Repository) http.Handler

func HandleBlogFollowForm added in v0.4.0

func HandleBlogFollowForm(repo *repository.Repository, find *finder.Finder) http.Handler

func HandleBlogList added in v0.4.0

func HandleBlogList(find *finder.Finder) http.Handler

func HandleBlogRead added in v0.4.0

func HandleBlogRead(repo *repository.Repository) http.Handler

func HandleBlogUnfollowForm added in v0.4.0

func HandleBlogUnfollowForm(repo *repository.Repository, find *finder.Finder) http.Handler

func HandleDebugSignIn added in v0.5.0

func HandleDebugSignIn(secretKey string, repo *repository.Repository) http.Handler

func HandleIndexPage added in v0.4.0

func HandleIndexPage(find *finder.Finder) http.Handler

TODO: Rename p / s to page / size.

func HandleOAuthCallback added in v0.5.0

func HandleOAuthCallback(
	secretKey string,
	repo *repository.Repository,
	conf *oauth2.Config,
	fetchUserID FetchUserID,
) http.Handler

func HandleOAuthSignIn added in v0.5.0

func HandleOAuthSignIn(conf *oauth2.Config) http.Handler

func HandlePageCreateForm added in v0.5.0

func HandlePageCreateForm(repo *repository.Repository, pageFetcher fetch.PageFetcher) http.Handler

Instantly return and show a toast. In a background goro, fetch the page, parse out the title, strip out HTML, and create the database rows (page and account_page).

func HandlePageList added in v0.5.0

func HandlePageList(repo *repository.Repository) http.Handler

func HandlePageUnfollowForm added in v0.5.0

func HandlePageUnfollowForm(repo *repository.Repository) http.Handler

Just delete the account_page entry for this account + page. This is because pages _could_ be added by multiple accounts and we wouldn't wanna delete them out from under other users. If necessarh, a service could be written that "garbage collects" dead pages.

func HandlePostDeleteForm added in v0.4.0

func HandlePostDeleteForm(repo *repository.Repository) http.Handler

func HandlePostRead added in v0.4.0

func HandlePostRead(repo *repository.Repository) http.Handler

func HandleSignIn added in v0.5.0

func HandleSignIn(enableDebugAuth bool) http.Handler

func HandleSignOutForm added in v0.5.0

func HandleSignOutForm(repo *repository.Repository) http.Handler

func Handler added in v0.3.6

func Handler(
	public fs.FS,
	conf config.Config,
	repo *repository.Repository,
	find *finder.Finder,
	pageFetcher fetch.PageFetcher,
	syncService *service.SyncService,
) http.Handler

func Run added in v0.3.6

func Run(ctx context.Context, handler http.Handler, addr string) error

Types

type FetchUserID added in v0.5.0

type FetchUserID func(client *http.Client) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL