handlers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeedType

type FeedType int
const (
	FeedTypeAtom FeedType = iota
	FeedTypeRSS
	FeedTypeJSON
)

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(db *sql.DB, appConf *config.AppConfig, auth *auth.Authenticator) *Handler

func (*Handler) HandleAPIMetadata

func (h *Handler) HandleAPIMetadata(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleAPITags

func (h *Handler) HandleAPITags(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleBookmarkAdd

func (h *Handler) HandleBookmarkAdd(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleBookmarkDelete

func (h *Handler) HandleBookmarkDelete(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleBookmarkEdit

func (h *Handler) HandleBookmarkEdit(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleBrokenBookmarks

func (h *Handler) HandleBrokenBookmarks(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleFeed

func (h *Handler) HandleFeed(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleIndex

func (h *Handler) HandleIndex(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleLogin

func (h *Handler) HandleLogin(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleLogout

func (h *Handler) HandleLogout(w http.ResponseWriter, r *http.Request)

func (*Handler) HandlePrivateBookmarks

func (h *Handler) HandlePrivateBookmarks(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleRobotsTxt

func (h *Handler) HandleRobotsTxt(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleTags

func (h *Handler) HandleTags(w http.ResponseWriter, r *http.Request)

func (*Handler) ServeFiles

func (h *Handler) ServeFiles(r chi.Router, path string, root http.FileSystem)

type Page

type Page struct {
	Number   int
	IsActive bool
}

type TemplateData

type TemplateData struct {
	SiteName             string
	Description          string
	BaseURL              string
	Title                string
	CurrentURL           string
	IsAuthenticated      bool
	Bookmarks            []*bookmarks.Bookmark
	Tags                 []string
	TagFilter            string
	TextFilter           string
	Pages                []Page
	BrokenBookmarksExist bool
	AppVersion           string
}

Jump to

Keyboard shortcuts

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