handler

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WS_ID_QUERY     = "wid"
	CL_ID_QUERY     = "cid"
	AUTHORIZE_QUERY = "authorize"
)

Variables

This section is empty.

Functions

func FeedToChangelogURL

func FeedToChangelogURL(r *http.Request) string

Turns the rss feed request into the changelog url. Done by stripping away the request path (/feed)

func GetFeedURL added in v0.4.0

func GetFeedURL(r *http.Request) string

Turns the changelog request into the feed url of the changelog

func GetFullURL added in v0.4.0

func GetFullURL(r *http.Request) string

Returns the full url of the current request. If request is htmx request (password submit) will use HX-Current-URL

func GetQueryIDs added in v0.3.0

func GetQueryIDs(r *http.Request) (wID string, cID string)

func LoadChangelog added in v0.3.0

func LoadChangelog(loader *changelog.Loader, isDBMode bool, r *http.Request, page changelog.Pagination) (changelog.LoadedChangelog, error)

If in db-mode => load changelog by query ids or host.

If in config mode => load changelog from config.

func ParsePagination added in v0.3.0

func ParsePagination(q url.Values) (page int, size int)

func ValidatePassword added in v0.3.0

func ValidatePassword(hash, plaintext string) error

Types

This section is empty.

Directories

Path Synopsis
web
icons
templ: version: v0.2.771
templ: version: v0.2.771
views
templ: version: v0.2.771
templ: version: v0.2.771
views/layout
templ: version: v0.2.771
templ: version: v0.2.771

Jump to

Keyboard shortcuts

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