router

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	CommonExtNoNSH  = blackfriday.NoIntraEmphasis | blackfriday.Tables | blackfriday.FencedCode | blackfriday.Autolink | blackfriday.Strikethrough | blackfriday.HeadingIDs | blackfriday.BackslashLineBreak | blackfriday.DefinitionLists

	JSCookie      = "JSEnabled"
	INFCookie     = "INFScroll"
	NSFWCookie    = "NSFWAllowed"
	ResCookie     = "PreferredResolution"
	ThemeCookie   = "PreferredTheme"
	GalleryCookie = "GalleryNav"
	USRCCookie    = "TrustUSrc"
	MathCookie    = "UseAdvMath"
	AwardCookie   = "DisableAwards"
	CommentCookie = "DisableComments"

	JSCookieValue      = "js_enabled"
	INFCookieValue     = "infscroll_enabled"
	NSFWCookieValue    = "nsfw_allowed"
	ResCookieValue     = "preferred_resolution"
	ThemeCookieValue   = "preferred_theme"
	GalleryCookieValue = "gallery_navigation"
	USRCCookieValue    = "trust_unknownsources"
	MathCookieValue    = "advanced_math"
	AwardCookieValue   = "disable_awards"
	CommentCookieValue = "disable_comments"

	MaxResolution = 11037

	CleanTimer = 2 * time.Minute
)

Variables

This section is empty.

Functions

func FmtEpochDate

func FmtEpochDate(input float64) string

func FmtHumanDate

func FmtHumanDate(input float64) string

func Incrementbyone

func Incrementbyone(input int) int

func Incrementbyonefloat

func Incrementbyonefloat(input float64) float64

func QualifiesAsImg

func QualifiesAsImg(input string) bool

func RewriteURL

func RewriteURL(input string) string

func Sanitize

func Sanitize(input string) template.HTML

func SetcfgCookie

func SetcfgCookie(ctx *fiber.Ctx, cookiename, cookievalue string)

func SetupServer added in v1.6.0

func SetupServer() *fiber.App

func SortPostData

func SortPostData(posts *types.Posts, resolutionToUse int)

func ToPercentage

func ToPercentage(input float64) string

func UGIDGen

func UGIDGen() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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